User avatar
The Geek on Skates
Posts: 5
Joined: Fri Feb 01, 2019 10:23 am

Best game library/framework for the Pi?

Tue Feb 05, 2019 1:10 am

Hey guys,

Sorry if this is in the wrong place. The programming section is broken down by language, and I haven't decided that yet. I've tried a bunch of different game engines over the years, in a bunch of different languages, but I'm not sure which is the best way to go for games that run on the Pi. I'm looking for something that supports:
  • Both keyboard/mouse and controllers
  • 2D, low-res/retro style graphics
  • 3D/spatial audio
  • Fullscreen that scales to multiple aspect ratios
My first choice was PyGame, and it does most of these, except that its audio playback is atrocious on the Pi; distortion, popping, all kinds of hilarious randomness. And yet somehow I can type "play my_file.ogg" from the terminal and it sounds great. So it must be something to do with the underlying driver (I think). And since PyGame uses SDL under the hood, I guess that rules out SDL too. But that doesn't even scratch the surface of the insane number of tools out there - SFML, Allegro, MonoGame, HTML5 canvas stuff, probably some Java stuff out there (I haven't done anything Java-related in like 7 years lol so I have no idea on that one). And if I want to go really old-school (which I'm open to) there are libraries like ncurses for terminal-based games. Then their are Triple-A game engines like Unreal, Unity, and the list goes on and on and on... but what are most people building retro games with for the Pi these days? I know emulators are kinda the big thing right now, and I play a lot of emulators myself so I get that, but I don't plan on I writing my games in 6502 Assembly (which is fun to mess with btw, just not ideal for what I'm building, lol).

Anyway, thanks in advance, and have an awesome night (or day depending on where you live). :)
The Geek on Skates
Tech, hockey, and all things geeky
http://www.geekonskates.com/blog

User avatar
Imperf3kt
Posts: 2986
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Best game library/framework for the Pi?

Tue Feb 05, 2019 3:45 am

It may help to mention what sort of game you will be making?

For instance, I find Ren'Py to work reasonably well on a Raspberry Pi, but it's mostly targeted at interactive fiction style games.
Of course that's not to say you can't make other games or programs with it. One of my first creations was a game of Rock, paper, scissors. Another project, I created a cookbook filled with recipes and information.
Others have made full fledged RPG battle systems, text parser games, or even multiplayer games.
I think the best example I ever saw was an artificial intelligence that you could talk to and it would reply and ask questions of its own by leveraging AIML

Note that not all of these run well on a Raspberry PI.

Hmm. I still have to work out how to control the GPIO through Renpy so I can make games that blast you with water or something. 🤔
55:55:44:44:4C
52:4C:52:42:41

User avatar
The Geek on Skates
Posts: 5
Joined: Fri Feb 01, 2019 10:23 am

Re: Best game library/framework for the Pi?

Tue Feb 05, 2019 12:48 pm

Good point (lol),

I'm mostly thinking of old-school arcade/console style games; platformers, space shooters, maybe an RPG like Final Fantasy 1, etc. I'm definitely into building stuff in that retro/8-bit style, just not in an emulator. This is because of one thing I'd like to do differently: I'd like my games to be accessible to players who are blind. That's why I'm interested in spatial audio, and that's something emulators don't do (because those systems never did). This means text adventures are also an option, though they're not my first choice.

PS2: That's hilarious about using the GPIO pins for shooting water! idk why you'd want to do that, but I wish I knew more about hardware stuff like to that, cuz that's the kind of crazy stuff you can do (I believe this forum has a whole section on robotics)! HTH
The Geek on Skates
Tech, hockey, and all things geeky
http://www.geekonskates.com/blog

User avatar
Imperf3kt
Posts: 2986
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Best game library/framework for the Pi?

Tue Feb 05, 2019 1:40 pm

The water shooting idea was a random thing that popped into my head.
I might not actually do that lol, too many safety risks.

But the basic idea was that I could possibly add a fourth dimension to a game where failing results in an actual real-world consequence, like getting blasted in the face with water xD
It's sort of like the physical computing the Pi is designed for, only more like physical gaming.
55:55:44:44:4C
52:4C:52:42:41

User avatar
The Geek on Skates
Posts: 5
Joined: Fri Feb 01, 2019 10:23 am

Re: Best game library/framework for the Pi?

Wed Feb 06, 2019 2:16 am

That would be hysterical! Just the thought of a player actually getting wet when they fall into the water sounds pretty funny. Like you said, it might be a safety issue for some, but considering players would have to refill it themselves, idk... still, funny random thoughts are always cool in my book. :)

But to get back to the original question, it sounds like you're into Python (which is awesome IMO). What do you use for audio in Python? Maybe I can use PyGame for graphics and input, and something else that sounds right on the Pi for audio.
The Geek on Skates
Tech, hockey, and all things geeky
http://www.geekonskates.com/blog

User avatar
Imperf3kt
Posts: 2986
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Best game library/framework for the Pi?

Wed Feb 06, 2019 7:55 am

Since I use Ren'Py mostly, my python is limited. I'm learning, but by no means anything more than a novice.

As such, I rely on Ren'Py to handle the audio.
I could ask the developer/maintainer how he handles audio.
55:55:44:44:4C
52:4C:52:42:41

User avatar
The Geek on Skates
Posts: 5
Joined: Fri Feb 01, 2019 10:23 am

Re: Best game library/framework for the Pi?

Wed Feb 06, 2019 12:57 pm

Well I've never used RenPy, but if it's open-source I'm sure I could find out. Whatever it uses, it must sound better than PyGame if you use it on the Pi...

But what about other languages, then? I know C, C++, C#, and others. so I'm not gonna limit myself to just Python.
The Geek on Skates
Tech, hockey, and all things geeky
http://www.geekonskates.com/blog

User avatar
Imperf3kt
Posts: 2986
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Best game library/framework for the Pi?

Wed Feb 06, 2019 9:11 pm

I'll leave that to others as I only have experience with Python and JavaScript xD
55:55:44:44:4C
52:4C:52:42:41

Return to “Gaming”