Phantom107 Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Phantom107 Forum

Phantom107's Forum. Discuss about games, GML, 3d, game design here. Enjoy your stay ;)
 
HomeSearchLatest imagesRegisterLog in

 

 Parts of objects disapearing

Go down 
2 posters
AuthorMessage
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Parts of objects disapearing Empty
PostSubject: Parts of objects disapearing   Parts of objects disapearing Icon_minitimeMon Feb 18, 2008 10: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
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Parts of objects disapearing Empty
PostSubject: Re: Parts of objects disapearing   Parts of objects disapearing Icon_minitimeMon Feb 18, 2008 11: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
Back to top Go down
https://phantom107.actieforum.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Parts of objects disapearing Empty
PostSubject: Re: Parts of objects disapearing   Parts of objects disapearing Icon_minitimeTue Feb 19, 2008 12:27 am

lol phantom, sorry for not using your speed thing... Thanks for the y- and y+ thing, that worked
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Parts of objects disapearing Empty
PostSubject: Re: Parts of objects disapearing   Parts of objects disapearing Icon_minitimeTue Feb 19, 2008 12:40 am

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
Back to top Go down
https://phantom107.actieforum.com
Sponsored content





Parts of objects disapearing Empty
PostSubject: Re: Parts of objects disapearing   Parts of objects disapearing Icon_minitime

Back to top Go down
 
Parts of objects disapearing
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Phantom107 Forum :: Questions and Answers-
Jump to: