I'm a try to attempt a fairly coherent devlog about working with the Blender Game Engine. I started a project a few weeks ago, a 2D platformer, with the goal of just creating a simple but complete experience using mostly the logic brick system1
with a little python.
There are several reasons why I chose the Blender Game Engine.
- It's easy to pick up and I don't need to learn a language or to do any scripting to get immediate results. I find it faster than working in Game Maker.
- It comes with a built in Physics engine. I don't want to roll my own or build off a template. It's pretty awesome to boot in my opinion, it's fast and takes a couple clicks to work with it.
- It's low on resources which is perfect for my tiny netbook.
- It's free and opensource.
Several other advantages. I can make all my necessary objects, levels and graphics within blender which makes prototyping a lot faster / easier.
In the end it will be a single level, there will be obstacles, enemies, collectables, power-ups and a finish point. It will be sandwiched with a menu/title screen and End Screen. Typical platformer stuff.WHAT I HAVE DONE SO FAR
- Start Menu
- Player Jumps and moves side to side
- Player Shoots and Enemy dies
- Enemy Shoots and chases hero
- Camera follows hero
- Message System
- Sprites are animated2
I've gotten a lot out of following Solarlune's tutorials
. I totally encourage you to take a look if learning BGE is important to you and also to thank Solarlune for providing awesome resources/tutorials to learn from
The biggest hurdle in learning Blender is navigating the interface, but I suspect once you try/see it once you'll get it. It becomes fairly intuitive quick.
I wouldn't say this is a tutorial perse. I will point things out here and there about working with the BGE. But otherwise I'm open to questions and if you yourself are interested in starting a project alongside this I would totally be up for starting a skype/email group to support eachother in our learning endeavors.
Several other Resources for learning:Blender Artists Forums
there's a subforum just for BGE Projects and learning.List of Blender IRC RoomsBlender Python APIBlender Wiki
1 The Logic Brick System is the equivalent to Game Makers drag and drop programming interface. It is however structured very differently. You have 3 different kinds of logic bricks, the Sensor, the Controller, and the Actuator. You can think of it like your nervous system, you first have to sense something happening (The Sensor), then you must decide to do with that sensation (The Controller), and then there's the reaction based on what you decided (The Actuator). I will cover the basic Sensors, Controllers, and Actuators.
2 I'm using Solarlune's Sprite script.
Getting to the Blender Game Engine
On the 'Info' window/bar (at the top of the screen in blenders default state), there is a dropdown box that says Blender Render, switch this to Blender Game Engine.
-Physics tab will now change
-If you press 'P' over the '3D view' you will start the game. You can also start it from the 'Info' bar or from the 'Properties:Render' TabGetting Physics to Work
In the Properties window of any object there is a Physics tab. All objects default to 'Static' objects.
- Static objects are objects you don't want to be affected by gravity but are still solid. Levels are Static.
- Dynamic objects are objects affected by gravity and are solid. Entities such as the player or enemies are Dynamic objects.
You can try this out. Set up a plane for your ground and a Cube for your player, the cube should be above Plane. Set the appropriate physics type for each. Mouseover the 3D View and press 'P' Movement
With your player cube selected. In the 'Logic' window, set up a 'keyboard sensor' connected to an 'and controller' connected to a 'motion actuator'.
Keyboard Sensor: For the Key will use the Right arrow.
And Controller: nothing to do here.
Motion actuator: Under Force, we want to apply a positive force along the Y axis
Knowing this you should be able to get the player moving in all necessary directions including jumping (set the force between 100-200)
Next time I will talk about:
- setting up the camera
- making the player fire an object
Yesterday was spent working on graphics. I've wanted to use a black and white comicbook style for a project before involving a girl and a squid. That project fell short but I'm deciding to try that with this project, so I drew an eyeball and another crab in flash and exported as a gif animation, edited into a sprite sheet in graphics gale.
I kind of love drawing crabs.
I was playing Sword & Sorcery for the first time yesterday, I really like how they set up each scene, the perspective and being able to pan and look around. So I had a neato idea for a mechanic which I will talk about later.