Hey guys! Today I’m going to show you how to program games for the Raspberry Pi! We are going to make a very simple 2d game using the program Game Editor. This tutorial will go through everything! All you need is a Raspberry Pi! Okay, let’s go!
Firstly, we need to hook up a monitor, keyboard and mouse to your Raspberry Pi. Make sure your SD card running the OS is in the Pi. Then connect the power lead. Wait until it has finished booting. Then, open up the web browser.
We are going to install Game Editor, so navigate to game-editor.com, or search game editor. Click Download, then click the link that says:
Windows (9x, Me, NT, 2000, 2003, XP, Vista, 7), Linux and Mac OS X version
Install it to a directory you can find.
Unzip this file into the same directory. Then go to Applications, System Tools, Terminal. Once terminal has opened, navigate to the unzipped folder using the commands dir and cd. For instance, if the folder is in my Documents, I would first type dir and hit enter. It would list all the folders in it’s current directory. I see Documents is there, so I type cd Documents and hit enter. Then again I type dir and hit enter. I see the folder GameEditor so I type cd GameEditor and hit enter. When you think you are in the GameEditor folder, type dir and hit enter. If many files come up including gameEditorLinux, you are in the right place.
Then, still in the GameEditor folder, type the following:
chmod +x gameEditorLinux
Then hit enter. Quit out of terminal and navigate to the GameEditor folder through a file browser. Open up gameEditorLinux and a window should pop up, this is Game Editor!
Now you have installed game editor, let’s make a very simple game.
Click Add Actor and name it anything. Click add. A Pacman will show up. He is an actor. Actors are objects on the screen. Pacman is the default, so we’ll live it like that. Right click on him and click actor control. This is where we can edit things about the actor. Where it says events, click add, then click create actor, then add action. Click follow mouse, add, then immediate action. Then you can close. Click game mode and you will see Pacman following your mouse!
This is because we added the event create actor. This occurs when the actor is created. As the actor is created at the beginning, it is like an actor load event. We set it to follow mouse, so it would follow the mouse. When we ran the game, sure it followed the mouse!
To finish off, go to config, game properties and click on the button that says window and change it to full screen. When you go back to game mode, it will be in awesome full screen which will make it look cooler and that you really are making a game on the Raspberry Pi! Don’t forget to save your game!
Thanks for reading this tutorial! I went through a lot, so if you have ANY questions, please ask them in the comments section.
Have fun Raspberry Pi-ing!