Kind of a Rough Week

posted in A Keyboard and the Truth for project 96 Mill
Published November 21, 2013
Advertisement
Greetings All,

It's been tough and slow going this week, mostly because of a want to start developing some great new content; but being held back by a bit of a data-processing problem.


Minimap Generation

OK, so maps in Revel Immortal are BIG... how big you ask?

Well Garranshall, Princess Morning's home is a city and represents the biggest map currently:

  • Each map is made up of discrete rooms, and each room is composed of 40x40 tiles.
  • Each tile is 16x16 pixels
  • Garranshall is made up of 80x80 rooms

That means garranshall is composed of over ten million tiles... and this is just one map in the game mind you.

Like any good game, Revel has a mini-map for each map; to give a nice overview of the land and a spot to place markers for fast-travel access.

But creating these maps is very processor intensive; as it requires parsing 6400 json files, and drawing ten million tiles.

The naive method of just, loading every room and drawing it out to a big bitmap; just doesn't work, it would take probably 1/2 hour.

This is all done off-line in the editor, but still that kind of time is unreasonable.

The Solution

So far I don't have a 100% awesome solution, but I'm getting there; currently we're getting passable generation by using MD5 hashing of room data so that any duplicate rooms encountered get rendered almost immediately.

But this simply trades off time for memory; and I think under some circumstances I'm exausting the GDI memory by storing lots of bitmap objects.

But it's passable, for now; eventually better incremental hash-backed methods should mean that a big-upfront render is needed, and then after that, it will only fill changed areas; but to do so is going to mean generating a fairly lengthy hashlist on disk.


Moving Forward

This has kept development stalled on the Room Editor component which is a really important part that we need to craft rooms to a greater level of detail; as well as easy placement of structures, markers and NPCs.

My hope is to have the room editor passable for this weekend; so we can move forward on getting more filled-out rooms and quests going.
Previous Entry Checking In
0 likes 2 comments

Comments

Servant of the Lord

How about, when saving a room, generating the minimap-piece of that room and save the timestamp of when it was generated. Then to regenerate the entire minimap, get the timestamp of the last minimap generation of the entire map, and compare that to the timestamp of the individual room 'piece' of the minimap, loading and blitting (blitting over the last generated entire-minimap) only the pieces that have changed since last time.

November 21, 2013 10:55 PM
EDI

Thanks for the help SotL :D

Yeah thats pretty much the plan, though i've been using MD5 hashes; mostly i just need to keep these 6400 timestamps or hashes in an external file, so the work persists across sessions.

November 21, 2013 11:06 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement