Thursday, January 27, 2011

Optimizing Broad-Phase Collisions

As I mentioned yesterday, I had an "ah-hah" moment when I realized that objects were rebuilding their potential collision list (PCL) over and over.  Plus, each time it would rebuild these lists it would also create a copy of all of the objects in a collision node before adding them all to the PCL.  So, after some work I have come up with a way to perform some caching and optimizations of PCLs.

Wednesday, January 26, 2011

Interesting "Discovery"

Discovery is in quotes because my revelation was actually more of a palm-face when I thought about it.  I was doing some optimizations in the engine when I noticed something that smacked of an "area of interest."  In the Asteroids Evolved demo, whenever I had all five bullets on screen in Firefox 3.6, the game would slow down by a factor of 2x to 2.5x!  At first I was wondering what would cause such a noticeable slowdown and then it hit me.

Tuesday, January 25, 2011

What's the Purpose?

One user mentioned that in other game engines, GameObject is the root class but in The Render Engine it is HostObject.  I decided to take his advice and create R.engine.GameObject, from which R.engine.HostObject is now derived (so instanceof checks should still work).  HostObject is deprecated in favor of GameObject, so get used to it... ;-)

Recent Developments

Hey folks, been really busy lately with my "real life"(tm) so the engine hasn't gotten as much love as it could.  But, rest assured it'll be getting some soon enough.  I cleaned up most of the documentation, but still have to get to the physics engine for conversion to the new namespace.  I've also done some optimizations which were causing excessive repetition of calculation.  One example is the new convex hull collider component...  It was performing an early-out test using simple circle-to-circle testing to see if a collision could even occur.  When it was determined that they might, if the actual hulls were circular it would do the same work again.  Very wasteful...  Correcting this resulted in a small, but noticeable speedup.

Saturday, January 22, 2011

API for v2.0.0.5a

I have uploaded a ZIP file of the API for the new version of The Render Engine which is in development.  The API contains all of the class documentation for anyone who is currently testing or developing against the latest version.  The API is subject to change.

Render Engine v2.0.0.5a API

Tuesday, January 18, 2011

Scriptable events and variables

SpriteActor will be the foundation of 2D platformer style games.  Along with  the Level Editor, it will be used to construct a game from a configuration object and your game's framework.  To accommodate this, I've started adding scriptable events and variables.  Using the Level Editor, you'll be able to put a SpriteActor into your game level and then script things on "onInit" and "onCollide" which will allow you to tweak your game logic from the Level Editor.

Criminey!

Seems that when I changed how the Level Editor was organized, yesterday, I forgot to commit a couple files.  As it is now, the editor isn't loading.  Too bad since I've added even more functionality to it, including Import and Export functionality and an actor "Action Panel" with the beginnings of setting up actor defaults.  Oh well, tonight I'll get it committed and y'all can play with it and give feedback.