SGE Game Engine - News: SGE 0.14 and xSGE 0.4 Released
SGE 0.14 and xSGE 0.4 Released
Item posted by Layla Marchant <onpon4> on Tue 09 Dec 2014 01:34:04 PM UTC.
Version 0.14 of the SGE and the Pygame SGE has been released, along with version 0.4 of xSGE. They can be found on the download page, as usual:
http://stellarengine.nongnu.org/download.html
This release of the SGE has quite a lot of changes, so do be sure to check WHATSNEW and update any projects you're working on accordingly. This is the brief summary of changes:
- The whole automatic storage of objects and resources, as well as the whole "ID" system, has been completely discarded. You now have to pass actual objects, not arbitrary "IDs". This makes the codebase much easier to maintain, and prevents an invisible problem of old, dead objects not being garbage-collected properly. Consequently, all "destroy" methods are now obsolete and have been removed.
- sge.Object.destroy has been repurposed to remove the object from the current room. The destroy event has also been redefined to occur whenever the object is removed from the current room.
- sge.Object.alive has been removed. You can check if an object is "alive" within a given room by seeing if a copy of the object exists in the room's "objects" list.
- Rooms are no longer implicitly assigned "room numbers" and ordered in a list. As a result, sge.Room.end is now obsolete and has been removed. To tell the SGE what room to start the game with, you now have to explicitly define it by assigning the room to sge.game.start_room.
- Class registration and the sge.Room.objects_by_class dictionary have been removed. It doesn't work without the whole implicit storage system that was discarded, and isn't especially helpful anyway (its original purpose was to make collision detection more efficient, but that use became obsolete very quickly when I learned of a much better way).
- Support for polygon drawing has been added. I made a mistake in WHATSNEW and only listed sge.Sprite.draw_polygon, but sge.Room.project_polygon and sge.Game.project_polygon are available as well.
- Alarm states are now simply stored in dictionaries called "alarms", rather than being controlled with "get_alarm" and "set_alarm". This is much more direct and allows finer control.
- Transition support has been added to the SGE directly. In the case of the Pygame SGE, it has been imported from xsge.transition, but with diagonal wipes done via polygon drawing and looking better as a result.
- The SGE is now expected to take care of any potential naming conflicts, so "private" attributes beginning with a single underscore are no longer dangerous to use. "Reserved" dictionaries have been added to the specification for this purpose.
The Pygame SGE also has the following changes:
- Six is now an external dependency, rather than being shipped with the Pygame SGE.
- Error messages when failing to load resources are less confusing/more useful.
- A few bugs have been fixed.
The list of changes to xSGE 0.4 is much smaller. Other than updating the code to work with the SGE 0.14, the only changes are:
- xsge.transition removed (as it is now obsolete).
- xsge.physics added.
- Six is now an external dependency, rather than being shipped with xSGE.
But xsge.physics is pretty exciting. This little module adds full support for the kind of physics you would use in games like platformers, and it includes support for both unisolid tiles and slopes. This is my first time doing slopes, but I'm quite happy with the result; slopes can be any size and any angle (adjusted simply by resizing the bounding box), and they support "stickiness" (a tendency to adhere to the slope) as well.
Coinciding with this new SGE release is an updated release of Pacewar, 1.5.3, which has simply been updated to work with this new SGE version.
I have also updated the "Documentation" link at the top of the SGE website so that it links to all relevent documentation, rather than just the Pygame SGE documentation.
Powered by Savane 3.14-8aba.
Corresponding source code