Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / isometric grid troubles

Author
Message
madcaddy
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 4th Aug 2003 16:47
ok im designing a chris sawyer (transport/rollercoaster tycoon) style game. I have a grid using the paste image command which can be scrolled across but have struck a problem - basically how to determine which grid square(or diamond) the mouse is hovering over. This is much easier with squares and the only way i can think of at the moment is a bitmap that has each diamond as a different colour which is checked against using the point command to find the square... does that make any sense?! anyway any help would be useful as this is slowing me right down at the moment..

thanks
Beavis
23
Years of Service
User Offline
Joined: 15th May 2003
Location: Czech Republic
Posted: 4th Aug 2003 18:26
I wrote Isometric engine in VisualC++ long time ago. To determine on wchich tile your mouse is I used one tile where each corner has different color but it was no bitmap but array in memory for better performance. Then its simple to solve on which tile is your mouse. If you use height in isometric map then problem is more complicated. For more info visit www.gamedev.net - Isometrix land forum
madcaddy
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 4th Aug 2003 18:36
cool thanks for that - yeh i thought about how complicated height would be and i think i'll avoid that.. by the way is there a standard isometric tile dimension - i just drew one that looked about right..!
Beavis
23
Years of Service
User Offline
Joined: 15th May 2003
Location: Czech Republic
Posted: 4th Aug 2003 18:41
I used 32x16 or 64x32 tiles in my engine. Count on using multilayer isometric map. I used 4 layers. 1 for ground, next for ground transitions, next for object, people and walls and last for "cutoff" objects as roofs etc.
madcaddy
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 4th Aug 2003 21:20
THANKS for the help beavis i checked out that site and found a tutorial explaining exactly what i need - the corner colour mousemap aswell as the multilayering you mentioned. this will get me well on my way..

thanks again
madcaddy
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 5th Aug 2003 01:52
ok ive solved the mouse problem but i have a new one.. basically its speed. my current code is pasting tons of images each loop which is quite speed intensive. ive tried it so it only updates when you are scrolling but you then have a massive speed drop while scrolling. I basically get around 60 FPS which is way too small at this stage (so much more to add..!) i can reduce the number of tiles on the screen but i'm sure games like rollercoaster tycoon have this many tiles.

if anyone can think of an alternate way of doing this i will be grateful.

thanks.
Beavis
23
Years of Service
User Offline
Joined: 15th May 2003
Location: Czech Republic
Posted: 5th Aug 2003 09:22
Are you drawing all tiles or only all visible tiles? And which command are you using to draw tile ?
madcaddy
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 5th Aug 2003 13:18
i'm only displaying the visible ones (i'm almost certain - check the source theres an if statement to ensure this) and using a nested loop and paste image to draw the tiles. I was running it in 1024x768 and ive found in 800x600 the performance is better, but still slowish (90fps) for how little ive achieved so far.
Beavis
23
Years of Service
User Offline
Joined: 15th May 2003
Location: Czech Republic
Posted: 5th Aug 2003 18:41
I dont have time now to look into source but try paste sprite instead of paste image. I dont know if its quicker but try it.
CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 6th Aug 2003 00:45
RCT only draws 1 set of tiles the rest are 2d objects. you can tell when you mouseover a object like a tree how precise it is or a rollercoaster and how the spaces in the supports let you click on whats behind it. The real tricky part is the way he does the height mapping, the way you can raise and lower the land.

Login to post a reply

Server time is: 2026-07-23 03:44:50
Your offset time is: 2026-07-23 03:44:50