PDA

View Full Version : Isometric



huydevil
21-04-2004, 11:16 AM
Can someone give me an example of isometric map. I've read many tutorial about it but they're only show how to display a isometric map, they don't show to to display sprites on it. I've tried to used TDXSpriteEngine on Borland Development Network's example but when i scroll the map, the sprite not disappear when i scroll out of its X,y

cairnswm
21-04-2004, 12:31 PM
I've been meaning to do a simple DelphiX isometric tutorial for a long time. I'll try do it tonight and load it under tutorials.

(Taking my son for Welpie-Rugby tonight so might not get to it)

WILL
22-04-2004, 12:19 AM
Can someone give me an example of isometric map. I've read many tutorial about it but they're only show how to display a isometric map, they don't show to to display sprites on it. I've tried to used TDXSpriteEngine on Borland Development Network's example but when i scroll the map, the sprite not disappear when i scroll out of its X,y

Hmm... maybe some source would help? It's not quite sprites but if you play with some of the values I'm sure you'll figure out aquack and easy solution.

Here is a ]URL[/url]

huydevil
23-04-2004, 10:46 AM
I'm not have time to figure it out, but all I need is a example shows how to display sprite on it, i'm working on a RPG but i'm stuck! Please, I need your help!
Sorry about my english

TheLion
23-04-2004, 11:34 AM
I think the sprite and the map should be seen seperately, You should however find out how to convert the pixel coordinates to the isometric-tile the sprite is on/touches, there is a library out there that has a large collection of Isometric function, including a pixel offset to iso-tile index converter! :)

I made a very simple isometric map editor a long time ago and I made the mistake of trying to treat the sprites as parts of the map, in the end this is unmanagable.

huydevil
23-04-2004, 02:10 PM
So at last please can someone give me a example?

Traveler
23-04-2004, 08:56 PM
Sure, have a look at my website. There's a demo of isocanvas (origionally from Turbo website) which I've converted to DelphiX. That should get you started.

Placing sprites on it, like you described should be an easy task. (Or else, my tutorial about platform games, which also handles sprites on maps (though not isometric) will.)

huydevil
24-04-2004, 01:06 AM
I've read your tutor but i don't know how to cover it to use with isometric!

Traveler
24-04-2004, 10:46 AM
But what is it that you do not understand? It's like theLion said. The sprites and map should be handled seperatly. Take the isocanvas demo for the map, and the technique I used for the sprites from my tutorial and you're pretty much done.

huydevil
24-04-2004, 02:16 PM
Okie, I'll try to do it. Thx a lot!

WILL
25-04-2004, 12:49 AM
Hi guys, I've been following this thread for a bit now and I have a question related to the topic.

How would you include instructions on how to add a multiple levels into your isometric maps?

I am currious mostly about displaying layers and handling them in the map. I've seen single level maps discussed, but the information has not gone into this area yet. ie. How this could be done in the game 'X-Com'.

TheLion
25-04-2004, 09:48 AM
I wrote a small rectangular map engine once with multiple layers, basically what I did was creating 3 map-arrays that had the same size and just draw the map 3 times in the correct order using transparency, so say you would want to draw some dirt on the grass you would put a grass tile on the map in array 1 and the dirt tile on the same position as the grass tile, only in array 2, this way the grass is drawn first, then the dirt tile is drawn over it...

You could however treat the some layers as sprites, meaning that you would simply have a list of map-objects that come with the map, so for example you want a grass tile with a tree on top of it, in this case the multilayer method described above isn't efficient since it could cause collision detection problems, in this case you could put the grass tiles in an arra and threat the tree as a sprite and just provide it with an X, Y and a Z value, the Z value indicates the layer it should be drawn at. With a tree and grass this is easy, you would for example say that the tree is in layer 2 (Z=2) and the grass will be the background (layer1). It becomes a hell of a lot more interesting with walls a unit or something could stand on, or a tree that is on some sort of flower bed, by using the first technique (the 3 arrays) you are limited to the number of arrays as your layers, by using sprites your have endless possibilities... A mixture of both could also be quite powerfull, you could for example draw dirt and a sky of clouds using the array method and trees and animals etc as sprites... :)

WILL
25-04-2004, 11:44 AM
Not quite what I was going for Lion. ;) But an interesting approach to layered isometric tiles.

What I was actaully more interested in was lets say you have a multi-story building? And you want to draw floor 1, 2, 3, etc.... something along these lines. You're litterally stacking each floor or 'level' one on top of each other.

cairnswm
27-04-2004, 01:23 PM
Haven't got around to doing my tutorial yet :(

On the subject of floors of a building etc I saw a nice discussion on line of site that uses rooms. The character would be in a room and the room would have an ID. All tiles of that ID get drawn and no other tiles. This solves the problem of rooms quite nicely.

WILL
27-04-2004, 07:32 PM
Hmm... I haven't thought of rooms till you brought that up. Nice. :)

Mind you you may want to not let them see the bad guy hiding in the corner unless your character turns to see him. So maybe if you use your idea mixed with some sort of 'line of sight' arch that the character is facing. Then again, how do you take this into account when you're outside? But the idea would work great for a simple RPG or a simple floor/room based squad game.

cairnswm
28-04-2004, 06:28 AM
Outside all has one ID. Then with your idea of Line of Sight you just show those squares that can be seen and have the same ID.