### Console

some math help CI Games (1 reply, 0 views) (2001-Jul-25)
i need some help on a few math instructions: ------------------------------------------- - I have an isometric map with 99x89 tiles - The tile dimenions are 66x33 (WIDTHxHEIGHT) - I declare the tiles using this code: Dim Tile(99,89) as typeTILE - My current code look like this: (yes, its very unproffesional) //cTilex = width of tile (66) //cTiley = height of tile (33) For vert = y(0) To y(1) //bslide is a boolean, it togles the tile shifting bslide(0) = Not bslide(0) For horiz = x(0) To x(1) If bslide(0) = False Then tX = ((horiz * cTilex) - MapOffsetX) ty = ((vert * cTiley) - MapOffsetY) + (cTiley) Else tX = ((horiz * cTilex) - MapOffsetX) + (cTilex \ 2) ty = ((vert * cTiley) - MapOffsetY) - (cTiley \ 2) End If With tileGround(horiz, vert) SetVertex .Vertex(), tX, ty, cTilex, cTiley End With Next horiz Next vert - The only problem is that it's not accurate! When I want to render my tiles how would I setup each tile so that it would no leave any spaces between them?

Back to Forum

 hm... GoldFish (0 replies) (2001-Jul-26)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 72 visitors within the last 20 minutes