Simple Game Library
WARNING - This project was an old idea, it will not done by me Faga , as I think most of this design doesn't make much sense with children constructionist activities and with pygame. When I wrote it, I never programmed with pygame, and this summer of code project was transformed in ISIS Project. Feel free to use the ideas anyway.
The mainly objective of this project is to make , in the future, a GUI framework to develop games fast and quickly. This is a bigger project, so to start and using something to ease game production, this project wants to now provide tools and templates for production games in coding way, but they are the base to provide a full featured GUI framework to produce games easily.
This project contains some tools, or mods, to provide fast development. We selected PGU as the base for this library, so SGL can be viewed as a expanded PGU. Some tools that we want to provide:
- Mediakit: Provide easy media objects (MediaAudio, MediaVideo, MediaImage and Text) implement, combining media conversions (like mp3 to ogg or jpeg to png, for an example) with media manipulation (play an audio or a video with a single action, like audio.play() ). Note that PyGame already has pygame.mixer, pygame.movie, pygame.image and pygame.font, this kit just translate into Media objects to ease generalize media types as one type of object, providing easy integration with other kits and a future framework GUI. A XML schema with media properties can also be produced.
- UIkit: This will be suplied by PGU, as have a good combination of widgets that we can use for games. Note that this isn't associated with GTK integration with PyGame (another SoC project).
- Spritekit: to make a sprite, this tool assigns groups of image frames as actions and give to sprite some actions properties as velocity of animation, collisions objects, interactions with user and scenery. Sprite can be animated or not, providing objects to interact or to control by user, or just background with determined properties. We can compact in tar or tgz format all images of each frame and a XML schema containing all information about sprite, or something more simple like using cPickle to store python data information in data files.
- Networkit: To provide needed network actions that a game needs: connect to another OLPC laptop, to a server, or to another computer, trade information, and disconnect. This three operations need to be transparent to programmer, so this kit will provide this transparency to programmer. The mainly problem of this module is to provide mesh connections as easy as is possible.
- Inputkit: provides transparency to pygame.key (keyboard), pygame.mouse (Mouse) and pygame.joystick (Joystick) operations and manage their actions into a one object, "Input". Easy integration with gamepad from sides of screen of XO.
- DBkit: provides connection with a database (SQL or a file based), to transit data.
- Scenekit: This is the base for the future framework and for templates. Scenekit can handle Media objects and Sprites, providing a Scene Menu (like a intro screen to select new game or load a game) or a Scene Game (game scene, with sprites, images and videos as background and interactive structures and so on). A Scene Game can has Actors (main actor controlled by user and other actors to interact).
- GeneralGamekit: contains objects inherent to general gaming, like Score, Lives, Clock, Save/Load variables and/or game stat, Question&Answer, High Score and others gaming objects. Some of them are already implemented by PGU.
- Webcamkit: Maybe this kit can be embedded with Mediakit, the main purpose is to provide easy capture of videos and photos from XO webcam.