Skip to main content
gamedev.net
🔒 Locked

Level Drawing

Started by Dany Jul 13, 2003 at 4:38 PM 1 replies 1.7k views
Original Post
Dany
Dany
I have allready made my map editor but it whith squares, so i decide it to make it whith diamond tiles but something I am not doing very well because the smooth scrolling dosn''t work good.?? And i dont know why? My drawing funk: void Draw(int startx,int starty) { int l,i,j,mapx,mapy,xoff,yoff; int x,y; mapx = startx/32; mapy = starty/32; xoff = startx & 31; yoff = starty & 31; for(l=0;l<4;l++) for(i=0;i<20;i++) for(j=0;j<26;j++) { x=j*64; y=i*32; if(i%2==0) RenderTileID(Level[mapy+i][mapx+j].GetTileId(l),x-xoff,y-yoff); else RenderTileID(Level[mapy+i][mapx+j].GetTileId(l),x+32-xoff,y+16-yoff); } I will realy be thankfull if somebody tell me the right way to draw a iso map!!!!
Tommyboy
Tommyboy
It''s hard to tell with the code you posted.

Couple of questions:
In RenderTileID(...) are you changing textures for every Tile?

Are you ordering Tiles by Texture and only switching when needed? Doing so greatly increases performance.

Tommyboy
Tommyboy
Dany
Dany
Can u tell me how u will do it!
Leave my code (I know its bad )
How u will do it?
the level must look like and must have smooth scrolling

/\/\/\/\/\/\/\
\/\/\/\/\/\/\/
/\/\/\/\/\/\/\
\/\/\/\/\/\/\/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.