Skip to main content

Python Game Development is hard....

I've recently been able to wrestle time away from frantically busy days to pick up Game Development again - it's not the Console game development that's been ongoing for a few years now, no - it's just a simple prototype using PyGame.


PyGame is quite a feature rich and mature library, allowing Pythonistas to enter into the world of graphical game development using SDL and OpenGL if they so choose.


Using PyGame is incredibly easy, and it takes only a few minutes to get a basic prototype up and running.

Performance suffers if one does not read the docs and cache whatever is needed, as memory allocation remains fairly slow on most computers - especially if it's something we end up doing once per frame.


I see a need for better instrumentation that could be filled so that we don't have to resort to palour tricks in order to get frame-rate information from the game, as the very act of displaying that information uses up processing power.


In my mind, there would be some kind of native implementation which would show debugging information - I found this post linking to a method to get fps information https://stackoverflow.com/questions/67946230/show-fps-in-pygame which perfectly illustrates my point.


For now, I'm happy with creating little throwaway prototypes, but at some point I'd like to add a bit more efficiency into displaying the FPS without string manipulation.


You can follow along with my progress here https://github.com/ShaheedLegion/falling

Comments

Popular posts from this blog

A few thoughts on Game Development

For those of you who follow my blog, you'll notice that I talk about building games, but I never really release anything useful or fully playable. I'm more interested in studying the individual parts of game development, without really caring about building a game as a whole. Well, for the most part this is perfectly acceptable, as I'm not a game developer by trade, and my bread and butter comes from being a utility developer. I've defined utility developer as someone who codes a variety of things without specializing in any specific discipline. As a self-taught developer, it's been hard for me to pivot into a role where I'm classed as a game developer by trade. This is all good and well, but I still want to talk about game development as a whole - specifically how to get a game off the ground. If you've been following any blog about game development, or any programming course which walks you through the process, you've most likely heard of all the jar...

On working with Python and Javascript .. and HTML and Ajax and SQLite

I have recently been creating a production management system. The system is not that complex, but it is taking an inordinate of time to write ... even though I am using rapid-prototyping languages - Python, SQLite3, HTML4/5, Javascript coupled with liberal Ajax sprinkles ... I simply don't understand - but I will try to get to the root cause. So far, I have constructed the tables and written a database backend wrapper - for the SQLITE3 DB which I manipulate on the server side using python cgi. I have created the concept of "sessions", but not in the MOD_PYTHON way, no, in the more traditional - hacky, store-it-in-the-window_name way ... By allowing the user to send an Ajaxlogin request, which generates a session token on the server side, which is then "kept" or "remembered" on the client side by storing the token in the window name browser object variable... It's probably the most rubbish way I can do it, but it works - survives page reloads ...

XBOX ONE Game Dev is supposed to be hard.

So I recently took the plunge and joined the Xbox One Creators Program with Microsoft. It turns out that it's supposed to be incredibly hard to build these little games we see all the time, and for the most part, it is. Not only do we have to deal with the fact that the XBOX One does not use the stripped down PowerPC architecture that the Xbox360's used to run on, we now have to contend with the fact that it's basically running Windows 10. I remember the good old days when win32 and GDI (Graphics Device Interface) were sufficient to get a decent game running on a Windows PC - especially if the game wasn't too resource intensive. Then came Direct(X/3D/2D/11/12) with all its COM (Component Object Model) Glory -> which, perhaps most asinine of all -> is still being used today. Getting into the creators program costs a little bit of money, and that's mostly to keep the chancers out and cover administration fees. After that you really only need to abide by the...