pygame is
Simple DirectMedia Layer is
Site Swing

Gummworld2 - 0.0.10

Gummbum (gummbum)



::: News :::

Version 1.0.0 is released. It has all the features I presently need. Junk has been removed and fat trimmed over the past few releases. It has been tried and refined in several Pyweeks, and the API seems to have settled.

HUD has been slightly revamped. It uses the wonderfully precise str.format now instead of str % best_guess.

The SuperMap API has had some changes, the internals are improved. See the Mercurial change log. This feature has not been tried in a game yet. It has only seen demos. (Waiting on my wish list feature: a Tiled map loader that spreads the load out over multiple game cycles. DR0ID *poke* :)) SuperMap is the feature that enables arbitrarily huge realms with on-demand loading and unloading.

The biggest volume of changes in 1.0.0 are to bring the code into PEP 8 compliance.


::: About :::

Gummworld2 is a light pygame framework for a scrolling game, where the map is larger than the display. It emphasizes simplicity, freedom, and performance. You add the display elements and game logic, the engine provides the framework for timing, events, updates, and rendering.

Tiled helpers are included for elaborate mapping. However, Tiled is not required.

Source and documentation, plenty of uncomplicated examples included at Bitbucket. Also, some moderately complex demos are there, and the wiki cites completed games.

Compatible with Python 2.7 and 3.

The fast renderer BasicMapRenderer matured in v0.5.0. The Mana World's map01 blazes. It is a five layer map with many SRCALPHA tiles. See examples/

The old screenshot below is from an early version on an older Intel, getting 332 FPS in an 800x600 window while scrolling. It is a one-layer 2048x2048-pixel map, using the old method of collapsing nearly 500 on-screen sprites down to 36 surfaces for faster blitting. (Note: the BasicMapRenderer does this on the fly, and solves the older issues of mixing various image formats in a single view.)

::: More :::

Also available in downloads (Gummworld2 required):

  • gw2_skeleton, a la skellington. Get this for fast skeleton setup. Highly recommended. I've gotten a fair number of how-to questions that are solved by this module layout.
  • The Mana World resources needed by some Gummworld2 examples (sorry, TMW must be kept separate because it is GPL v2).
Standalone (Gummworld2 not required):
  • A fixed-step game clock, a good general-use clock and scheduler.
  • Mutable world demos (aka Gummcraft) v1.1 and v1.2.
  • The original "bunny roundup game" demo.
  • Pyweek 17 entry Harvest Moon.
  • Odds and ends: Xbox 360 Controller, ImageCache, SqlNub.

::: Google Discussion Group :::

There is a Google group to discuss Gummworld2 and related projects. All are welcome. Please stop by and start a discussion.


This release contains:
  • Numerous signficant fixes.
  • Much work on the world editor.
  • Some bug fixes for pgu 0.14 GUI (yet unvalidated by pgu project--they have been submitted to pgu project site).

pgu's GUI package has added a lot of polish to the editor. Import/export for entities is working fully now. Next steps will be adding the remaining features to get to version 1.0.0, a library enhancement or two, and a demo that leverages an entities file created by the editor.

Then I can start making a game. Whew! :)


Home Page:


click to view original size


Gummworld2 - 1.0.0 - Mar 25, 2015
Gummworld2 - 0.5.0 - Apr 16, 2014
Gummworld2 - 0.4.5 - Mar 26, 2014
Gummworld2 - 0.4.4 - Aug 23, 2013
Gummworld2 - 0.4.3 - Aug 20, 2013
Gummworld2 - 0.4.2 - Aug 6, 2013
Gummworld2 - 0.4.1 - Mar 28, 2013
Gummworld2 - 0.4.0 - Apr 6, 2012
Gummworld2 - 0.3.0 - Nov 28, 2011
Gummworld2 - 0.2.0 - May 21, 2011
Gummworld2 - 0.1.1 - Mar 25, 2011
Gummworld2 - 0.1.0 - Feb 27, 2011
Gummworld2 - 0.0.12 - Feb 20, 2011
Gummworld2 - 0.0.11 - Feb 8, 2011
Gummworld2 - 0.0.10 - Jan 29, 2011
Gummworld2 - 0.0.9 - Jan 22, 2011
Gummworld2 - 0.0.5 - Jan 10, 2011
Gummworld2 - 0.0.4 - Jan 7, 2011
Gummworld2 - 0.0.2 - Jan 3, 2011
Gummworld2 - 0.0.0 - Dec 31, 2010 account Comments

If you wish to leave a comment with your account, please sign in first.

August 20, 2013 3:41pm - Gummbum - nickname: (gummbum)
After a couple years (since I left the last comment), a few trial-by-fire projects in Pyweek and Pyggy, and more than a few improvements and additions, the engine is looking fairly mature. Will it ever reach 1.0!? Great question. I would like to add DR0ID's quite nice transitions. And there are a couple rough points I'd like to file down: 1) at high scrolling speeds the new renderer causes a noticeable hiccup when a new tread is drawn; not noticeable when scrolling slowly; 2) the supermap hiccups when a new map is loaded; this is because the TMX loader does a lot of work all in one chunk; I would like to somehow spread this work out over multiple game ticks.
I expect the new renderer to support unusual use cases, like hex maps, much better. TMX loader doesn't support hex maps, and by extension neither does the world editor, but these are not required to get the intended benefit of this library: fast scrolling.
So that's about it. It is mostly finished. Cheers.
February 27, 2011 3:03pm - Gummbum - nickname: (gummbum)
Lots of new stuff. I *think* the only thing remaining before I call it 1.0 are the pymunk entity classes, and maybe some helpers (for example, pymunk collision detection and handling).

Even with the all-Python QuadTree and geometry code, the library seems to be quite usable on new-ish hardware. Dual-core systems that I've tried perform well. Single core systems chug and snort.

In v0.1.0 smaller tiles became a lot faster as a result of the MapLayer change from dict to list. Even collapsed maps are a quite bit faster. The screenshot depicted above could now be updated to show 360 FPS. Just visualize it. :)
January 7, 2011 1:37am - Gummbum - nickname: (gummbum)
Oh, and I forgot. Thank you, I will certainly contact you about the Tiled map loader if needed. So far it is working GREAT. :)
January 7, 2011 1:35am - Gummbum - nickname: (gummbum)
Very right, DR0ID. Combining tiles (via the Gummworld2 toolkit) only works for static tiles in a map object, where all the tiles scroll in unison. I'm not sure you'd want to use the same trick for independent sprites, as they typically do not want to move in unison. But if you could do it there would be gains (e.g. a big dragon or siege engine that is loaded from disk as six tiles combined into a single tile).

One drawback of combining tiles is you can no longer use a tile as a collision object--like the trees in the bunny demo. This is what the map editor is supposed to solve. Thus, if I have a combined tile, there will be geometry in the model representing its original parts. Of course, this means I will have a necessary separation between the graphics and the game model--which is not a bad thing, I think, but many pygamers seem to like the sprite-is-view-and-model school of thought. I like both ways, so Gummworld2 will try to support both with as little fuss as possible.
January 6, 2011 3:39pm - DR0ID - nickname: (dr0id)
If you have any improvements, comments, request or bugfixes about the Tiled map loader just contact me.

I found your trick to batch the tiles together to bigger ones to make the scrolling fascinating. But this only works for static background unless you know yet another trick for that.
January 4, 2011 1:12am - Gummbum - nickname: (gummbum)
<b>Friendly note<b><br>
Make sure you get the right Gummworld2 version to go with the bunny demo game: v0.0.2. The game will not work with v0.0.1.
January 1, 2011 2:05pm - Gummbum - nickname: (gummbum)
Too late! I'm already using tiledtmxloader (and loving it). :)

Very nice optimization of the gradient trick.

Thanks for the tips, DR0ID, and especially for your work on the Tiled map loader.
January 1, 2011 2:44am - DR0ID - nickname: (dr0id)
for the fill_gradient function there is a trick:

just create a new surface which is 1 line thick, fill it with the gradient, then scale it to the size you want (instead of iterating over all pixels or lines)

I used this trick here:
January 1, 2011 2:36am - DR0ID - nickname: (dr0id)
Maybe this could be useful to you.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 7, 2017

Dec 30, 2016

Dec 21, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

Nov 24, 2016

Nov 20, 2016

Nov 14, 2016

Nov 6, 2016

Nov 5, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)