Start with Ethanon by making the "hello world" program of game development: that great Moving-spaceship demo.
Game development process with Ethanon Engine follows four basic steps:
Here's a step-by-step beginners guide.
Download the Windows SDK and install it. Make sure you're running as system administrator.
The install wizard copies Ethanon Editor, which is used to create and edit game entities, scenes and particle effects. It also comes with Ethanon Script Editor (SciTE), the free text editor used to write game scripts.
Download the Mac OS X SDK and copy both Ethanon Editor.app and machine.app to your /Applications
directory. You will need Sublime Text in order to run your game directly from the script editor (Sublime Text Plugin installation instructions inside the downloadable package).
In order to distribute your game for Mac OS X simply make a copy of machine.app and rename it as you wish, then move all your game content into the name-of-your-game.app/Contents/Resources/assets
folder. You can also customize your app icon by changing the name-of-your-game.app/Contents/Resources/icon.icns
file.
In case you are not on Windows, or the current free Ethanon Script Editor (SciTE) is simply not good enough for you, you can always use the awesome Sublime Text for syntax highlighting and Build shortcuts. You can get the Ethanon plug-in for Sublime from our downloads section, instructions are included in the downloadable package.
After the plug-in is installed, in order to enable it for Building and Running Ethanon source files, open any *.angelscript
file (like the main.angelscript
) with Sublime Text, click Tools
> Build System
> Ethanon
. As shown below:
Copy the spaceship.png file into the /ee-hello-world/entities/
directory.
Click Add resources
and select Add entity bitmap
It's code time! Open your /ee-hello-world/main.angelscript
file with Ethanon Script Editor (SciTE), or Sublime Text, this is where all your scripts start.
The lines of code below will use entity callbacks to move our spaceship entity with keyboard's arrow keys.
void main() { LoadScene("scenes/first_scene.esc"); } // the function name must match the entity file name (spaceship.ent -> ETHCallback_spaceship) void ETHCallback_spaceship(ETHEntity@ thisEntity) { ETHInput@ input = GetInputHandle(); if (input.KeyDown(K_RIGHT)) thisEntity.AddToPositionXY(vector2(2.0f, 0.0f)); if (input.KeyDown(K_LEFT)) thisEntity.AddToPositionXY(vector2(-2.0f, 0.0f)); if (input.KeyDown(K_UP)) thisEntity.AddToPositionXY(vector2(0.0f,-2.0f)); if (input.KeyDown(K_DOWN)) thisEntity.AddToPositionXY(vector2(0.0f, 2.0f)); }
Learn more:
Try adding more entities, changing movement speed or anything your imagination comes up with!
More examples in the ethanon-samples repository at GitHub: