Progress report...
Key items
- Auto chunk loading is finished and working well. It can be tuned quite easily and seems to be totally rock solid. In the video loading is only visible because I have set the loading rectangle to be the size of the screen for testing.
- Chunk culling is working quite well. Any popping in or out of the chunks that is visible in the video is only because I have shrunk the culling box to ensure culling is happening properly.
- Started writing the chunk saving code. Basically since just a seed is needed to save the base world, each chunk only needs to save any differences the player makes to it. I did some simple math to see just how much this could be - if we use 256 x 256 tile sized chunks and each tile is given 8 bytes of storage (that's a ton) if the user changed all 65,536 tiles it would only take 512 KB of disk space. I can't see a player doing that so lets assume they change 10% of 1000 chunks (that's 6,553,600 tiles) I would still only need 6.25 MB of disk space! Pretty damn good.
- World terrain generator seems to be working quite well minus a few hiccups. Just needs some tuning.
Performance Specs
- With no chunks loading the engine uses ~7% CPU (on an Intel Core Duo) with vertical sync enabled.
- With max # of chunks loading constantly engine uses ~50%, but frame rate almost never shudders.
- Currently at ~2 ms render time for a screen covered with tiles. I haven't done any optimization besides brute force culling.
Ramble
Got a lot done in just a few more hours. Xna and C# have the fastest iteration time ever for 2D games. It's so pleasing getting the tile engine running this good in just 3 days. I don't think I would a single tile drawing with C++. According to my line counter I've only added ~100 line of code, of course lots of the code gets changed, but the hard line count is growing. I've got a few things left to do on the tile engine then onto custom physics.
No comments:
Post a Comment