Gummworld2 - 0.5.0
::: 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.
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/07_tiled_tmw_renderer_complete.py.
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):
::: Google Discussion Group :::
There is a Google group to discuss Gummworld2 and related projects. All are welcome. Please stop by and start a discussion.
Gummworld2 is now compatible with Python 3. Also backwards-compatible with Python 2.x, tested back to 2.6.
The core of the BasicMapRenderer has had some smarts added to enable it to render all of a Mana World map.
The benefit. A smarter renderer relieves you of manually splitting the map layers up, and deciding what background layers the renderer can manage while you are stuck figuring out how to process the upper layers. An example of this old knuckle-dragging way is in 07_tiled_tmw_renderer_bg_only.py.
The cost. A smarter renderer requires you to modify the avatar slightly (one attribute), set a sort_key attribute on dynamic layers (one attribute), and revise your game loop to notify the renderer of the dirty areas that changed; but it is a fairly repeatable method. An example of this new way is in 07_tiled_tmw_renderer_complete.py.
The other benefit. A smarter renderer is also much, much faster and smoother scrolling. With these efficiencies I was able to run 001-01.tmw at 1024x768 w/ collision handling for 240 fps. This is a 4-layer map with many srcalpha images. =) The original TMW example improved @800x600 from 120 fps to over 500 fps; and @1024x768 from 35 fps to 240 fps. I mighta felt my hair blow back. =)
Why should I care about fps!? =P Simply, the less time spent on the bottleneck in a scroller--blitting--the more headroom there is to add game logic.
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.