How I built the game: Blender 2.66a Game Engine software

This tutorial is derivative of Jonathan Williamson’s tutorial on Building a Basic Game using Blender Game Engine available on the Blender Cookie website…Please go there, sign up as a “Citizen” for the 10 dollars a month, & watch the video tutorials there…I am not going to repeat them here…But I am writing down my notes, both for myself & also to share with those who may be able to learn from written notes…I have tried out his teachings several times(see previous post to download a full game I made), & his teaching works! Ok here goes…

Open Blender 2.66a

Go to Blender Game Engine (instead of Blender render, the default menu setting)…Look at the top of the screen for that menu, right side-ish…

In the far right panel, scroll down to where it says GLSL…Click that…

In the middle menu, near to the bottom, there is a teeny menu that is hard to find…Find the one that has the choice TEXTURED & click that…

Add a plane…(go to add, add mesh, plane…) Make it bigger by either tapping Scale & resizing it, or hitting S on your keyboard then a number like 7…

Add an Icosphere…(same process as the plane…add mesh, icosphere…Scale it if you want…(scale is on the far left panel)…(use Translate or the G button to move your icosphere so it sits above the plane…G stands for grab…)

Make sure you are using a 3 button mouse…Left click selects things from menus…Right click selects objects on your screen…Middle hold down & scroll lets you pan the screen around for a different view…You need a 3 button mouse…If you don’t have one, don’t bother with Blender until you do…really…

Ok, with the Icosphere still selected (right click on it), go to Particle Physics at far right panel…Scroll down to Physics Type & click Dynamic…

Now go to the top left menu & change your screen choice to Game LOGIC…(This is not the same menu as the Game Engine one by the way)…

Select icosphere again…(right click)…

Now at bottom, click Add Sensor…Choose KEYBOARD…In the Press any Key place, press a key on your keyboard…I used W here…Change the word Keyboard to FORWARD…So it is labelled for yourself to remember…

Now click ADD in the Controller location…Choose AND…Then rename the AND word Forward also…Now look for the tiny dot to the right of Sensor…Look for the tiny dot to the left of Controller…Click on the first dot & drag it to the second dot, so the snaky thing that appears connects the two dots…(these are called Nodes)…

Now go to Actuators…Click Add…Choose MOTION…In the tiny menu chart that appears, look in Linear velocity…You can decide how fast your icosphere will move when you click W here…You will also decide which AXIS it will move on…So say you want it to move just a tiny amount with the tap of W…Click on the 0.00 number say in the X axis box…In Linear velocity…Change 0.00 to 0.20 …That means when you press W your icosphere will move 0.20 in the direction positive along the X axis…If you want your icosphere to move up, then use the Y axis…Change the 0.00 in the Y axis to 0.20 in Linear velocity…To the left is along the X axis still so that would be MINUS 0.20 in the X axis box…So type in -0.20 in the tiny X axis box in Linear velocity…Backwards is minus 0.20 in the Y axis box…

Ok, you really need to try this out yourself to visualize it…Look at your icosphere (or whatever object you have chosen)…Look at the tiny x, y, & z axis indicators on the screen…Decide which way you think forward is…Notice on your keyboard that W, A, S, & D, are handy letters for forward, left, backwards & left, on your keyboard…In an intuitive way…

Ok so choose which axis your forward is going to be in the Actuator area…Click on the Letter L, & the two letters AD, that are tiny & to the right of the number boxes in the Linear Velocity setting…(this means your object will move faster if you hold your W key down longer)…

If you want to set your object to JUMP, set Linear velocity as maybe 1.00 on the Z axis in Linear velocity…

Connect the Controller Node (the black dot to the right of it) to the Node of the Actuator…(the black dot to its left)…

To check if you like the direction you have set in the Actuator (with all nodes connected) please click on Start at the far right panel…

Click W…(or whatever key you chose in the Sensor)…Watch where your sphere goes…If you are happy that this is indeed forward great…If not, press ESCAPE on your keyboard to end the game & go back & change the settings in the Actuator in Linear Velocity…

Repeat all of these steps: sensor, controller, actuator, for (for example), Forward, Back, Right, Left, Jump…(we used Space bar as the keyboard key for jump)…

Each time you finish a row, check your work…Press the Start button, then press the button you have assigned to your move…make sure it works…

Once you have all of your ducks in a row here you can move on…Do not move on until you get all your moves assigned here…really…

Don’t forget to click on L & AD beside each selection in Linear Velocity…

Next big step: Adding a Second Object to your Game…(or many)(Rigid Body Constraints)…

Add another object say a Cube…(do the add mesh, cube thing)…

With new Cube selected (right click on it) go to Particle Physics(far right panel)…(hover over icons to see words of what they are)…

In Physics scroll down to Collision Bounds…Check that box…

Change The word BOX to CONVEX HULL in the Bounds area in the Physics place, where you still are…

Now right click on the Icosphere…Go to Particle Physics, Click Collision Bounds also…Change Box to Convex Hull also…

Select the Cube again…Right click it…In Physics again set the Cube to Rigid Body in the Physics Type:

Ok, now Start the Game…Press the Start button…Click your assigned keyboard buttons…You can now PUSH the Cube around using your Icosphere!!!

More Objects:

Select your Cube…Right Click on it…Click ALT D to duplicate it…keep doing Alt D, to duplicate more cubes…Use G to grab them & move them so you can see them all-spread them out on your plane…

Materials:

Give a Cube a material…Add Material (new in Material panel far right)…Click colour slider bar there, choose a colour…

In Materials take the Specular Intensity down…Use the slider…Also take down the Hardness…Use the slider…

If you are watching the video on Blender Cookie you are now at around 16 minutes in…(If you aren’t & are lost, go watch it…)

CAMERA:

You can always access the Properties panel by hovering over the tiny plus sign at the top right & clicking on it…Or hit N to make the panel appear…

To make the camera follow your character around…Do this…

Select your character…Icosphere…Click SHIFT S, CURSOR TO SELECTED…

Select Camera…Click Shift S, Selection to Cursor…

Ok…

Now FIRST SELECT CAMERA, THEN & only then, Click SHIFT, then select character (icosphere)…

Hit CONTROL P…Choose Parent to Object (I use including transform choice here)…

Now your camera follows your character around…

Tweaking: Now you want to have a better view, so you are going to want to tweak where your camera starts in relation to your object…Like how wide is the view, from how far back…You can do this manually by selecting the camera & G grab, & moving it around to see the view (watch in your screen to taste), or you can go to the far right panel, with camera selected,

& Click on the camera icon there, & adjust Focal length there, move the slider around & see if you like the view in your screen view…(Maybe set it to 120?)

Views: You will need to figure out the different views in Blender…For me this was trial & error & from watching tutorials…Camera view is important-because what you see on your screen is not the same as what the camera sees & what the Camera sees is what you get when you print out your render…Camera View is a choice in the 3D menu, when 3D is selected…

Optional: Launcher

Add ANOTHER plane…make it big & set it Below the first plane…

Ok tricky…(only because the box is tiny…)

In Add Game Property: Far left bottom: ADD a game property…Now in the teeny box that says “PROP” change that word prop to LAUNCHER…(you could name it anything really)…

Ok so now your Plane has the word launcher attached to it…

NOW select the CUBE…(the object you want to react to the plane…if you have more than one you have to set it for each one…I will only tell you one…Just repeat for the others…)

ADD a new Sensor…Choose COLLISION this time…In the panel beside the word Property there type in LAUNCHER…

Add a New Controller…Choose and again…Link the nodes…(sensor to controller)…

Add a new Actuator…Choose Motion again…To make the Cubes leap when they hit the Plane, in Linear Velocity again, on the Z axis (Up & down) change the number 0.00 to maybe 1.00…Click L & AD again too…

Now when your cube falls onto the second plane, it will bounce up…(Collision)…The cube has been trained to react whenever it touches something called Launcher…

Save your work…(File, Save As, Desktop, type in a name, it will be a .blend file, click Accept)…This saves your work so you can reopen it later after you have lunch…

The real video tutorial is called “Game Engine: Create a Basic Game” by Jonathan Williamson…You can use my notes while you watch if that helps…

Add Materials to things if you want…Figure that out…You can change shapes now too if you want…(Sculpt Mode is neat)-remember that simpler objects load faster that complex ones in the Game Engine, so keep it simple…A crashed game is not a fun game…

To create a standalone game:

File, User preferences, Add on button…

Choose Game Engine from the left side panel there in Add Ons…

In the phrase Save as Game Engine Runtime check the little box there…

Close that Pop-up…

Go to File, Export, the choose Save as game engine runtime from the dropdown menu…

Choose where to save to-Desktop…name it…(the second bar has a place to rename the file…click on it & type in your name instead of untitled-the name of your game is good here…Click Save as game Engine runtime…

A cool icon appears on your desk, your game APP…

Select that App icon…Go to File preview on your computer & COMPRESS…This compresses it to a ZIP file…

Upload the Zip to Box.net…

Share the link to your new game with your friends…They can download the Zip from Box.net…

You are NOT allowed to sell your game…Blender is given free & because your game uses Blender free technology, it is under the same license…

If you really want to sell your game, you must use something like GAMEKIT, an add on you can add to Blender, Save your game using Gamekit instead of Blender & Gamekit has a license rule that allows you to then sell your game if you want…

It is several more steps that you should do if you want to sell your game…

But first share it for free…See how that feels…Because you won’t be able to get feedback on your work if you try to start charging right away…

& you will need feedback…You will find your game is too hard, or too easy or things don’t look right or you don’t like the camera angle…

Learn these things first before you start thinking about money…Seriously…

If you are in it for the money, I’d like to remind you that game creation is an art form…As such, you are an artist…’Nuff said…

Note: This was written out with a young man named Bolakale Lukman in mind…He is an ambitious person who is keen to explore game creation further…He lives & works in Nigeria…If you are a gamer who works with Blender & would like to help this young man with his gaming lessons, please find him on Twitter as @CoolCalle …Tell him I sent you…(Sari)…

See previous posts for visuals of the Game & more…This post is text based because power is iffy in Nigeria & a heavy image post might crash on a computer there…

SpringClean:Tires
Game Image render GLSL

2 thoughts on “How I built the game: Blender 2.66a Game Engine software

  1. Once your back gets sore, especially for mothers-to-be who are carrying twins
    or maybe more, wearing a support belt is usually a real pain reliever.
    This is aggravated with the increase of progesterone
    hormone that has a vaso-dilating effect or relaxing of bloodstream.
    There are numerous issues that a pregnant woman should
    be mindful of, including good nourishment, good hygiene and
    obviously having a stress-free pregnancy. The pros
    is – if there is certainly one, is the fact that studies demonstrate that mothers
    who do go through the nasty nausea and vomiting early of their pregnancies are more more likely to have healthy, full term babies.
    Bloating of abdomen takes place since the hormonal
    modifications while inside the entire body while in early pregnancy,
    however it is frequently mistaken as PMS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s