Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Converting to a scrolling tile engine....ABSURD! (http://www.programmingforums.org/showthread.php?t=2296)

Aourhgad Feb 16th, 2005 4:04 PM

Converting to a scrolling tile engine....ABSURD!
 
Well I feel I am trying to do something very foolish. I want to change my game engine from a room by room deal, to a scrolling tile engine. I want to walk from one map into the other witht he effect of a seamless transition.

I've done some research and I have decided to load up 9 maps in a 3 by 3 grid. Unfortunately i can't figure out how i'm going to handle rendinger parts of lets say if i am inbetween the top and middle row and moving left. As of now it loads the data from the txt files into ana rray and then renders it on a surface. I am thinking of rendering all 9 maps onto 1 surface at a time.

Anyhow how would i achieve rendering the maps while there can be parts of 4 different maps visible at once?

Aourhgad Feb 16th, 2005 6:28 PM

as of now it works within the 9 maps loaded, I notice some performance drops now since its not room by room anymore. I do not know which type too keep. Also lines apear across the screen sometimes during the time its scrolling if you scroll for a while.

anyhow if you are interested to know how i did it i kept track of another 2 x and y variables that tell the engine where to start drawing the visible area of the map

Ooble Feb 16th, 2005 8:16 PM

Makes sense to me. If you see some code that's really slowing it down, post it here and we can try and optimize it.

Aourhgad Feb 16th, 2005 11:00 PM

Yeah it is getting slowed down sometimes because if i amc onstantly moving in one direction where it starts too scroll at the edge, it will slow down sometimes.

Other htan that i think its doing ok. I will definitely need help optimizing it soon.


All times are GMT -5. The time now is 2:12 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC