AmyL
Posts: 3
Joined: Mon Feb 29, 2016 11:54 am

Games for RPi

Mon Mar 14, 2016 1:41 pm

Hi everyone, I was just wondering, how can someone go about making a game for the RPi, what kind of SDK should be used, also how much power does the GPU have in the RPi3, thanks, Amy

GregAC
Posts: 11
Joined: Sun Aug 17, 2014 9:48 pm

Re: Games for RPi

Mon Mar 14, 2016 3:04 pm

What kind of game are you looking to create?

It's possible to write a game using python and the pygame library. The documentation contains some information about the python games that come with raspbian and tell you how to get at the source code. Studying this and playing with the code is a good way to get going.

If you want to make serious use of the GPU you'll need to the OpenGLES API. Google 'OpenGLES Tutorial' etc to find out more about this. I found a raspberry pi specific resource here: https://github.com/peepo/openGL-RPi-tutorial (there's some initialisation stuff which will be RPi specific so worth looking at that first).

However OpenGLES isn't straight-forward 3D graphics is a complex area. Often people writing games avoid it all together and use a 3D engine instead (e.g. Unity) however I don't know what is available for the raspberry pi in this area. I note this one: http://urho3d.github.io/ claims raspberry pi support but no idea if it's any good.

The RPi 3 GPU is the same as the RPi 1/2 however slightly overclocked (300 MHz rather than 250 MHz) so it goes slightly faster. As a comparison point it's certainly a better GPU that what was available in the PS1/N64 consoles. I think it stacks up pretty well against the XBox (original) GPU, though it gets complicated. The GPU is highly programmable even if the raw performance may not the same as original XBox GPU you can more easily produce complex effects due to the programability.

Neil Munday
Posts: 111
Joined: Tue Mar 18, 2014 8:52 pm
Location: UK
Contact: Website

Re: Games for RPi

Tue Mar 15, 2016 11:33 pm

Hi,

I would also add that you might want to check out SDL2 which is a very popular C/C++ media library for Linux, Mac and Windows. It provides many graphics routines for manipulating sprites, surfaces, textures etc. as well as a joystick/control pad, sound and networking APIs to name but a few.

SDL2 also has Python bindings thanks to PySDL2.

PyGame is based on SDL1 which lacks support for the newer joystick/control pad APIs found in Linux these days.

Hope this helps,

Neil.
http://pes.mundayweb.com -> The Pi Entertainment System for all your gaming needs

User avatar
Zalamel
Posts: 23
Joined: Wed May 08, 2013 11:25 am

Re: Games for RPi

Fri Mar 18, 2016 1:44 am

Besides Urho3D, as Greg mentioned, there's also the Godot Engine. However, it would need to be compiled for ARM, and requires the new OpenGL drivers.

Someone compiled an older version of Godot specifically for the Pi in the old depreciated forums, found here, but it'll take a long time to load the web page page, around a minute.

raysan5
Posts: 37
Joined: Tue Sep 30, 2014 4:44 pm
Location: Barcelona
Contact: Website

Re: Games for RPi

Fri Mar 18, 2016 11:16 am

Maybe you can find interesting my library: raylib (http://www.raylib.com/)

Simple and easy-to-use, you code in pure C, multiplatform, lots of examples (http://www.raylib.com/examples.htm) and games (http://www.raylib.com/games.htm), free and open source (https://github.com/raysan5/raylib).

More info to install and test on raspberry pi here: https://github.com/raysan5/raylib/wiki/ ... spberry-Pi

Works in any Pi version (really lightweight)!

Return to “Gaming”