A Simple Python Game Engine?


Is there anyone else out there that is looking for this? A simple Python (2D) game engine? I’m not talking about something like PyGame, PyGlet, or Rabbyt, all of which are very good at what they do. What I’m talking about may use these technologies (I’m thinking PyGlet and Rabbyt) but would do so in a way to create an actual “game engine”.

This is something that I have tried to do many times in the past, and I’ve always gotten stuck on the idea of trying to make it very very flexible, so that you could use whichever technology with the engine that you wanted to. But lately I’ve been thinking of a different approach. What about a very specific engine? Something that is very geared to performing one task well. Lets say a 2D scrolling engine. Something with a set level format, easy save and load, a screen system, and maybe some widgets.

Basically I’m thinking of something that will let people who are interested in creating simple games do so very easily. Something that isn’t that doesn’t necessarily do everything, but if you follow some simply steps you can get a “game” going very quickly.

Anyone else interested in something like this? Anyone else interested in working with me on something like this? Or perhaps you have information on a technology that is already there? Or maybe you have information on simple game engine design? I’ve feeling the itch to create some games again using Python, but I havn’t yet found the tool to scratch that itch…maybe the solution is to create on? If you are interested, or have some information, drop me a comment or shoot me an email.

mark…signing off after a long day on the computer not programming Python or video games, and definitely not doing it for himself.

selsine

del.icio.us del.icio.us

11 Responses to “A Simple Python Game Engine?”

  1. Arne Babenhauserheide
    Says:

    I’m definitely interested!

    At the moment I’m working on babglet which facilitates using pyglet inside the main projects mercurial repository ( http://rpg-1d6.sf.net/hg/1d6/ ), but we could move the code for the lib into its own project.

    At the moment it provides
    * The Scene class – Scene(pyglet.Window) – with
    – A simpler event_loop (you just need to define the action() method inside your game)
    – Some generally needed events (the arrowkeys should move the self.protagonist)
    – The things to show in the “actors” attribute
    – And some __init__ already taken care off, for example enabling transparency.

    * The Thing class – Thing(object) – with
    – collision detection
    – different movement styles
    – fluid movement with the arowkeys already implemented.
    – image, position and width and height added.

    Also I have some other concepts which are in the works.
    One example are Beings, which consist of many Part(Thing)s with fixed positions relative to a base Part(Thing)s.

    Current source of the “module” (It’s not yet a real module, I think, but it proved quite useful): http://rpg-1d6.sourceforge.net/hg/1d6/file/8b12bc459cb8/blob_battle/babglet.py

  2. Arne Babenhauserheide
    Says:

    Maybe it would be possible to go the way to a general gaming lib over many sublibs, which use the general lib but provide features for specific gamy types.

    general_gaming_lib (api)
    |-sidescrolling games (api)
    ||-a game
    |-arcade games (api)
    |-
    |-
    |-

    It would then also be possible to change the general gaming api while maintaining the api for specific game types.

    Would you like to work together on this (if there isn’t already a great solution out there which i simply don’t know)?

    At the moment I mostly work on very basic stuff: What does (almost) every game need.

  3. Arne Babenhauserheide
    Says:

    You can see how I use babglet in the following example (blob_battle):

    http://rpg-1d6.sourceforge.net/hg/1d6/file/tip/blob_battle/blob_battle.py

    It should be well commented enough to be readable.

  4. Kerim Mansour
    Says:

    Hi,
    frankly it is something i have been thinking of lately myself. My problem is that although pygame, pyglet, rabbyt etc. provide ways of simplyfying game development they all in the end require manual programming of nearly everything still.

    I would rather like an engine. Something that deliveres me
    -dynamic and configurable menus that i can connect to properties,
    -different “gametype-templates” with apropriate classes so that i don’t have to implement movement, scrolling etc myself but rather just “configure” certain values for it
    -a good statemachine
    -a pluginmechanism for custom game logic

    Lets think about an example:
    A normal 2D shooter.
    We would initialize a list of gamestates (menu, options, game, highscore)
    We would then assign the menue entries to the states in some kind of ini file.
    For the game we would have a scroller template with the configuration:
    top down scrolling, player control = mouse/cursor
    Playerhitpoints=1
    Damage=1
    And then a list of levels:
    -background=a
    -enemylist(enemy, hitpoints, chance for occurence, custom(movement)script)….

    something like that.

    We would provide the resources in a standard folder /resources.
    And fire it up !

    Programming would be reduced to custom scripts mainly.

  5. Gocho
    Says:

    Are you looking this? :D
    http://wiki.python.org/moin/PythonGameLibraries

  6. VinĂ­cius
    Says:

    @Gocho
    Game Engine and Game Libraries are different.

  7. selsine

    selsine
    Says:

    Hi Everyone,

    Thanks for the replies, I think that many of you get where I am going with this. If there already is a solution out there I would be more then happy to use it, it’s just that I have not found one yet.

    But I think that you have the main idea, something that would take care of all of the repetitive coding one has to do when starting a new game. Something that would let new users, or students, quickly and easily create something. Something that would let those of us interested in making games actually get down to the task of creating the actual game. One idea that I would like to include, if people are interested in pursuing this with me, is a level editor of some sort. Python is such a fantastically dynamic language that you could do a lot with a level editor beyond the simple placement of graphics.

    Personally I don’t know that much about game engine design beyond the simple stuff, but if people are interested I’m sure that we could learn as we went.

    So keep commenting and letting me know what you think. I think I might work on a longer post outlining some of my ideas (I mean we’d need a physics engine of some sort right?) which may or may not be correct or feasible.

    mark.

  8. Charles Merriam
    Says:

    For odd history, consider the Arcade Machine….

  9. learning python » Blog Archive » Dodger Editor 0.1
    Says:

    [...] A Simple Python Game Engine? [...]

  10. Mihai Maruseac
    Says:

    Landed here just by accident. We are developing one game engine written completely in python (using pyglet and openGL in the background). We are still at the beginning but my team is a dedicated one and all of us want to finish it.

  11. Gabriel
    Says:

    You may want to check my project, the Ignifuga Game Engine (www.ignifuga.org), it’s 2D, Python/Cython/SDL based, and pretty much work in progress, but it’s a start towards something like you mention in your post.

Leave a Reply

 

Popular Posts