Diagonal Movement Problem - Please Help

Started by
15 comments, last by GameDev.net 24 years, 6 months ago
Thank you very much!

It's running 640x480 16-bit (the pic's are jpeg'ed so the colors are a bit screwed up here and there).

Tiles are 42x24 pixels (Rendered, and then cut out using image composer (ANo1 )...

I'm not sure what you mean by "The 1-bit alpha-channel as collision detection works really well" ?? I use bounding spheres for colision detection between entities and an isometric grid for the map collisions.

Your are partly correct about the "overhangs". The engine supports both. (The walls visible on one of the desert screen shots are rendered with transparency. The indoor walls are not.)


<b>/NJ</b>
Advertisement
Hey, it's me again.

Ok now I understand how use did the diamond map, but why did u say u offseted on odd rows, isn't that only done on staggered isometric maps???
_
Are the tiles |_| rectangles?? and if they are why would you need to offset the odd rows??

Are u using a true rectangle engine or a isometric engine?? Right now it seems like your using a staggered isometric map.


Thanks ,

Da_KiD

Da_KiD is standing for Billy_Da_KiD, hehehe
Da is slang for Tha in Canada and America

Hehe, I just checked - the offset thing was an experiment I did at some point. The tiles ARE square and placed exactly above and beside each other (Phew, I must be way too long since I looked at that code, damn!)...

The engine IS isometric. All coords internally are 3D (x,y,z) and then mapped to 2D (x,y) using isometric mapping. It's just the ground map thats a bit special (performance reasons exclusively)..

--

Da is slang for tha? (which is slang for the) Yes, I figured that much !!

Am I the only one slightly annoyed with the inability to read previous posts while writing an answer? (Yeah, I know open another browser, but really?)..

/NJ

<b>/NJ</b>
Hey, me AGAIN!

You said u mapped the tiles like a regular tile engine, but everything has 3d(x,y,z) coordinates and u map everything besides the tiles in isometric coords 2d(x,y), could u give me an example of the code to map isometric units or objects?? plz

Thanks alot,
Later,

Da_KiD

Niels: About not being able to read previous posts, the latest version of UBB addresses that. I'll hopefully be able to upgrade to it tonight.
Hi,

this is my tile ploting code:

int MapX, MapY, i, j;
int X_Overlap, Y_Overlap;

MapX = x;
MapY = y;
X_Overlap = 22;
Y_Overlap = 22;

for(i=0; i<22; i++)
{
for(j=0; j<11; j++)
{
masked_blit(data[MAP[0][MAPx+j][MAPy+i].tileimage].dat, display, 0, 0, 2*X_Overlap*j+(X_Overlap)*(i & 1), +Y_Overlap*i, TILESIZE, TILESIZE);
MapX++;
}
MapX=x;
MapY++;
}

the problem is that when i move the map in diagonals (NE, NW, SE, SW), the tiles do not redraw in the right places when on odd rows, if i move diagonal again to an even row, they sort themselves out.

N, W, S, E all work ok.

please help

Great, thanxx !!

Now that we are at it , I think there's a bug in the ASP code on you main page that -sometimes- cause an ASP115 error (yup, that's the generic MS error code). Some times it just cause the browser to hang... (A wild guess would be an uninitialized variable )

/NJ

<b>/NJ</b>

This topic is closed to new replies.

Advertisement