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.
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.
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.
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.