Advertisement Jump to content


This topic is now archived and is closed to further replies.

Goober King

does this sound slow to anyone

This topic is 6331 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

I wrote a small tile based map editor about 3 years ago in DOS. The main structure of the tile engine was taken form some article someone wrote about it. It wasn''t taken very far but seamed to run OK back then. Now I''m redoing it for windows and since there is alot I don''t know about what might slow a system down I was currious if anyone sees a flaw in my plan before I spend too much time only to hit a wall. The engine is a stantard square tile based thing instead of an iso or hex. I like those types but thats not what I''m doing right now. I''ve logicaly separated each square as a column of tiles that can be stacked on one another. An array of liked lists with what tile is to be used and if any other tiles need to placed on it. Now what I''ve done is included a layer id in each list entry. The first tile or tiles are rendered until the list ends or an upper layer tile is found. This entry is then placed into a new array. Then all the upper layers can be rendered by a seperate function call later alowing for graphics to be placed under them if needed. Also I decided to enable the use of a few images larger than tiles to be placed on the screen as well. I dont know if this is enough to realy go on but Am I doing this in an acceptable way?

Share this post

Link to post
Share on other sites
I don''t entirely understand your plan, but it looks like something that, if correctly implemented, would work at a reasonable speed. The main thing you have to be careful for in all high-performance programming is looping and especially nested looping. It practically doesn''t matter how much you use lists and pointers and complex structures. But putting anything in a loop or nested loop starts to slow things down by orders of magnitude. Also, since drawing graphics to the display generally involves a lot of looping (behind the scenes at least) try to reduce the number of graphics drawn on the screen to just that which can be seen. For instance, if you have a building seven stories high and you have a top view as you walk up the stairs of this building, don''t be drawing all seven stories -- just the level you''re on. And try to pre-render as much as possible. If you have an image of dirt ground, and a separate image of a grassy edge to put on top of that, and a separate image of a bush to draw on top of that, and a separate image of a berry to draw on that, you should think about mergin those graphics into pre-rendered tiles because if you have to draw 4 layers of tiles frequently on the screen, things could get slow. Pre-render a tile of grass with a berry-bush on it (and another of grass with a berry-less bush) and pre-render a tile of a grassy edge meeting dirt ground. It results in more tiles but higher speed if you use these features frequently.

That being said, it''s still possible under windows (using DirectX) to draw a full screen of tiles at 30 - 60 fps (or even more). So if you''re not even doing active scrolling/animation where you have to redraw the entire screen for every frame of animation, you can accomplish *quite* a bit in a reasonable amount of time if you''re only doing it when the player moves.

"All you need to do to learn circular logic is learn circular logic"

Share this post

Link to post
Share on other sites
Thanks The early vertion worked fine on an older machine so I''m
hopful I can do it again.

On a side note I just happened by the article I read 3 years ago
on this site.
It was by Jason McIntosh.
So many thanks to him because its how I learned about linked
list back then.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!