I talked about this a little on SAX, but I've written a script in Javascript called GameBox that allows you easily create web applications.
The way it works is simple:
you set the callbacks gameBox.postInitCallback and gameBox.updateCallback to your init and game update routines and then call gameBox.init().
The gamebox handles calling the update at the users selected frequency (default is 1), checking keystates (accessible with gbKeyDown() and gbKeyUp()), and manages the displaying of objects such as sprites, text, buttons, checkboxes/radios, textfields, etc.
Once added to gameBox.object[] with gbAddObject(), any component can be moved with gbMoveObject() or removed with gbRemoveObject().
There are alot of other functions too that allow you to manipulate the properties of objects such as changing the source file of a sprite or changing text color.
I've also managed to create a simple 3d ortho renderer that runs at a fairy decent speed. I'm hoping with just a little more effort that I can create an FPS example such as Doom.
Ive currently written 3 examples, the first was a full-fledged Pong game that took me only 30min to write. It feature player movement with the up/down keys, score keeping, and AI to play against.
The second was a Zelda movement test that uses gfx from ZeldaOOA and was made mainly out of my own curiousity as to how difficult it would be to animate as moving character (real Q, would it be possible to make a 2d game engine.)
The last one was the afore-mentioned 3d ortho-cube test. it works by creating a 50x50 grid of 2x2 sprites (2500 sprites) which all use the same fully transparent 2x2 image. A var called screen[] keeps track of screen data and the screen is rendered by re-assigning the background colors of all the pixels, a method which proved to be hundreds of times faster than swapping the src images of all the pixels.
Despite displaying 2500 images at the same time, the gamebox was able to run fast enough for very smooth animation and the process in the task manager showed it only used about 8kb (internet explorer)
Im on 3DS right now, so I can't posts the scripts yet, but the next time I get to go to Ingles I'll be sure to post them for your amusement. My hope is that some of you may use your brains to help improve it.
The way it works is simple:
you set the callbacks gameBox.postInitCallback and gameBox.updateCallback to your init and game update routines and then call gameBox.init().
The gamebox handles calling the update at the users selected frequency (default is 1), checking keystates (accessible with gbKeyDown() and gbKeyUp()), and manages the displaying of objects such as sprites, text, buttons, checkboxes/radios, textfields, etc.
Once added to gameBox.object[] with gbAddObject(), any component can be moved with gbMoveObject() or removed with gbRemoveObject().
There are alot of other functions too that allow you to manipulate the properties of objects such as changing the source file of a sprite or changing text color.
I've also managed to create a simple 3d ortho renderer that runs at a fairy decent speed. I'm hoping with just a little more effort that I can create an FPS example such as Doom.
Ive currently written 3 examples, the first was a full-fledged Pong game that took me only 30min to write. It feature player movement with the up/down keys, score keeping, and AI to play against.
The second was a Zelda movement test that uses gfx from ZeldaOOA and was made mainly out of my own curiousity as to how difficult it would be to animate as moving character (real Q, would it be possible to make a 2d game engine.)
The last one was the afore-mentioned 3d ortho-cube test. it works by creating a 50x50 grid of 2x2 sprites (2500 sprites) which all use the same fully transparent 2x2 image. A var called screen[] keeps track of screen data and the screen is rendered by re-assigning the background colors of all the pixels, a method which proved to be hundreds of times faster than swapping the src images of all the pixels.
Despite displaying 2500 images at the same time, the gamebox was able to run fast enough for very smooth animation and the process in the task manager showed it only used about 8kb (internet explorer)
Im on 3DS right now, so I can't posts the scripts yet, but the next time I get to go to Ingles I'll be sure to post them for your amusement. My hope is that some of you may use your brains to help improve it.