Monday, April 1, 2013

Progress Update...

No video or pictures or demo, just a short post indicating the latest progress.

Infinite maps/scrolling works sort of.  You always see tiles now, and they appear to link up/slide correctly.

Demo Update Prevention Bugs
1) Map regeneration causes lag of up to 0.3 seconds, I need to minimize that.
 - - Only a 44 x 44 tile grid is created at a time.  you get within 12 tiles of the border, it reprocesses it with you in the center.  less than 2000 tiles are in memory at any given time.

2) Mouse moves during lag mess with the drag timing, and fling the map at a high speed.

3) Something about the game objects for the tiles are not disposing or recycling properly.  After a certain amount of movement, Lag increases, and then errors occur complaining about too many rigid bodies.
 - My present code is recycling the objects, not destroying them.  resetting the height, texture and location.  It works to begin with, but gets killed by the bug:


I'll be fixing these things prior to uploading the demo.  The lag issues are caused by over processing, and may cause laptops to overheat, heavy processing in general, and potentially web browser crashes.

I have a couple ideas to fix them, in addition to some searching to do.  But once this is done, that means the terrain is done and I can start moving on to more interactive things.

Hope to have a new demo up soon.

2 comments:

  1. Figured out its never actually deleting anything. I'm not yet sure why. I'm looking into it. This means that all the pieces are getting compounded, which would cause significant lag.

    ReplyDelete
  2. After many code alterations, I figured out why it wasn't deleting. After resolving that, the game ran better, but there is still lag, using the delete and recreate method. This means that the nature of the function actually works now. Given that all my attention will be on performance improvements.

    ReplyDelete