Jump to content
  • Advertisement
Sign in to follow this  
Jarski

SDL_isometric source code

This topic is 5411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Thanks :)

Maps are constructed in the code like this:


testMap.getMapCell (3, 6)->addTile (translator.translate ("stone_floor"));
testMap.getMapCell (4, 6)->addTile (translator.translate ("stone_floor"));
testMap.getMapCell (5, 6)->addTile (translator.translate ("stone_floor"));
testMap.getMapCell (6, 6)->addTile (translator.translate ("stone_floor"));

testMap.getMapCell (3, 4)->addTile (translator.translate ("wood_wall01"));
testMap.getMapCell (3, 5)->addTile (translator.translate ("wood_window01"));
testMap.getMapCell (3, 6)->addTile (translator.translate ("wood_wall01"));
testMap.getMapCell (4, 3)->addTile (translator.translate ("wood_wall01"));
testMap.getMapCell (3, 3)->addTile (translator.translate ("wood_wall02"));



The new version will have parser for XML maps and maybe a binary format too (or transparent compression of those XML files...).

Share this post


Link to post
Share on other sites
XML is certainly the way forward imho. For sure, compiling them to binary is a must though.

Share this post


Link to post
Share on other sites
I think the compressed XML would be better than completely different binary format because then I whould only need to maintain one parser (of course the engine would be flexible enough to allow user to write her own binary format parser optimized for her game...).

My goal is to have some tall buildings and stuff on the screen without OpenGL (3D games locked to isometric view are a joke, really ;)

There is going to be lots of tiles on the screen so I don't want to draw them over and over again every frame. I was thinking on implementing some sort of smart rendering system which only redraws those parts of the buffer (map rendering is done on a separate buffer and the parts of this buffer are blitted to the actual screen surface) that have changed or when scrolling (buffer is bigger than the viewport so redrawing only happens when viewport hits the edges of the buffer). The point is that you would only render the whole buffer when starting the game or when the viewport moves so much that you can't reuse any part of the buffer.

Share this post


Link to post
Share on other sites
Compressed XML is not a good solution for a non-procedural map format.

While compressing, say, a 20 MB map file, might be okay, you will still see performance issues with parsing 20 MB of map data that is in XML format.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!