Guilty Sparks Heavy Poster

Joined : 05 Jan 2008 Posts : 154 Location : USA East Coast
| Subject: Parts of objects disapearing Mon Feb 18, 2008 9:59 pm | |
| hey, Im trying to make stairs, but parts of them keep dissapearing... //draw stairs { d3d_draw_block(x,y-32,z, x-64,y+32,z+12, background_get_texture(bac_Wall),1,1) d3d_draw_block(x,y-32,z+12, x-48,y+32,z+24, background_get_texture(bac_Wall),1,1) d3d_draw_block(x,y-32,z+24, x-32,y+32,z+36, background_get_texture(bac_Wall),1,1) d3d_draw_block(x,y-32,z+36, x-16,y+32,z+48, background_get_texture(bac_Wall),1,1) }
thats the draw code, and in create it says z=0.
here is a exe. file: http://host-a.net/Maverick/Undead2.exe |
|
Phantom107 Admin

Joined : 03 Jan 2008 Posts : 206 Location : The Netherlands
| Subject: Re: Parts of objects disapearing Mon Feb 18, 2008 10:24 pm | |
| 1) Why aren't you using my speed techniques? The performance is extremely bad. 2) There are no disappearing parts. Your code will draw all the faces to the inside, so when culling comes into action only the faces facing the inner part of the block will be drawn. You can flip the faces by swapping the y1 and y2 arguments for example. 3) You got the textures all wrong too; the texture width and height should be both in the power of 2. For example: 128x128, 256x256, 1024x1024. You can mix 'em too: 128x512, 256x128, 32x1024 |
|
Guilty Sparks Heavy Poster

Joined : 05 Jan 2008 Posts : 154 Location : USA East Coast
| Subject: Re: Parts of objects disapearing Mon Feb 18, 2008 11:27 pm | |
| | lol phantom, sorry for not using your speed thing... Thanks for the y- and y+ thing, that worked |
|
Phantom107 Admin

Joined : 03 Jan 2008 Posts : 206 Location : The Netherlands
| Subject: Re: Parts of objects disapearing Mon Feb 18, 2008 11:40 pm | |
| Well you don't need to apologize or anything, but for the sake of your own game, use them. Speed Techniques = Better Performance = Better Game |
|