Thursday, April 21, 2011

Pooling and Linking

Engine pooling has always been a foundational element of The Render Engine.  Saving time and memory due to object pooling is something that I think makes the engine more robust.  However, I realized that the pooling was being overused.


Every single object that was ever created was put into a pool when it was done being used.  The number of pooled objects would climb and climb, trading off higher speed for increased memory usage.  I've limited the amount of objects that will be pooled to 50 per class.  This is something that can (and will) be tuned per-class when the engine has entered beta.

The linker has been causing problems with classes that didn't have any dependencies or includes.  It would attempt to re-initialize the class because it didn't think it was resolved.  This issue has been fixed and will be pushed to Github as soon as I remember to do so.

I spent some time looking at the Level Editor last night.  It's going to be a bit of work to redo some of the things which I thought were done.  But, overall I think the Level Editor is going to benefit from this rework since it'll make it much easier to use.  Later versions will have more featured added.  But, the first pass of the Level Editor will have the following functionality:

  • Different layers for different requirements (background, foreground, playfield, and fixtures/triggers)
  • Tile painting from tilesets
    • Graphical tiles
    • Trigger tiles
    • Collision tiles
  • Action editing for actors added to layers
  • Instant preview/play mode
  • Saving to, loading from level sheets

No comments:

Post a Comment