Thorny
Thorny: A Javascript game engine using jQuery.
The goal for Thorny is to allow Javascript developers to be able to quickly write simple flash-esk games using the skill set they already have available to them.
Intro
Right a whole bunch of this is probably not going to make much sense until you see it working, but the general way I envision games working when using Thorny is that levels will be pre-rendered into tiles, much like now google maps works.
Then taking these tiles Thorny will stitch them back together within the DOM. Right, now we have a big pretty image that doesn’t do much, well with the Developer tools, you’ll be able (once I get this far) to plot a 2D mesh representation of your level.
Using this data the engine will then handle all of your collision detection and object interaction. So now we are able to build visually complex levels that should with any lucky work on low spec machines, and maybe IE if I can find the time.
Now that is possible to build complex levels that the player can navigate around we need some opponents, the goal is to implement a mesh based pathfinding system, allowing agents to easily find there way around the levels that you have built.
The planned feature list includes:
- Mesh based collision detection ~ 80% working atm, just fixing bugs and working on sensible collision response.
- Mesh based path finding ~ This has been taken into consideration when designing Thorny, but is a long way off. Initially AI will be a simple line of sight chase the player kind of job.
- Fast DOM rendering ~ I’ve got some early demo code that manages to get 100 animated spites on screen in Chrome, though this number plummeted when I quickly added some simple AI, example at http://demo.httpmmo.com/zombie-corridor/ please note that the AI is horrifically unoptimised, and eats a good % of the frame rate.
- Developer tools ~ I have a number of developer tools that will eventually be packed in with Thorny, though these are likely to come in the form of a Kohana module, and include a simple level editor and collison/path-finding mesh editor, see http://mappy.httpmmo.com/ for an example of the editor.
- Event based execution ~ Thorny executes a wide number of developer listenable events, allowing developers to easily inject game logic without having to worry about whats going on under the hood.
Target styles: (ideally what the engine can be used to make)
- Top-down adventure: Using the collision mesh to define the shape of your world, and the ai hooks to control NPC actors
- Side scroller: Using the collision mesh to overly the shape of levels will allow players to control there character in a 2D setting.