• Advertisement
  • entries
  • comments
  • views

Kind of a Rough Week

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

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.

Share this comment

Link to comment

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.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement