This code library is the underlying framework that I use to build my Sphere games. It's always undergoing changes but can still be used to easily build Sphere games without having to worry about implementing a lot of boilerplate code.
Features
Radlib supports these global classes for manipulating your game.- Assert: test conditionals, properties, etc.
- Audio: easy access to Sphere's sound objects
- Debug: log, alert, and diagnose issues with your code
- Game: wrapper for the default map engine
- Lib: base radlib library object
- StateManager: handles game state
- Input/Mouse: for general input handling
- List: for various array accesses
- And much, much more...
- RadGui: Gui abstraction library (beta)
- RadAct: Action game library (alpha)
- RadRpg: RPG game library (---)
Screenshots
Download
You can check out and contribute to the source code hosted at github: here.Final Releases have not yet neen made.
Demo
Getting your radlib project up and running is simple, in the Sphere editor just do the following to get a simple game up and running:// The only major file to include, it will automtaically // include all other core radlib files. RequireScript("radlib/radlib.js"); // The content pipeline loads all of your games resources // into this object (images can be accessed from Resources.images, etc.) Resources.loadAll(); // Optionally, you may want to add packages such as the // radgui library so that you can add intersting menus // to the game via the state manager. // These have to be done after resources are loaded // so that they can use the content pipeline. RequireScript("radgui/radgui.js"); function game() { // This sets up some hooklists for // SetUpdateScript and SetRenderScript Game.init(); // This allows the state manager // to run on top of the map engine. // only do this if you use the map // engine. Game.attachStateManager(); // This is will quickly create a player character, // attaching the camera, input, and setting their // frame revert all at once. Game.createPlayer("name_here", "some_spriteset.rss"); // Then run the game engine like normal MapEngine("a_map_here.rmp", 60); // OR: StateManager.execute(); if you only use states in your game // OR: A mixture of states and the default map engine. }