Phantom107 Forum
Phantom107's Forum. Discuss about games, GML, 3d, game design here. Enjoy your stay ;)
HomeFAQSearchRegisterLog in
Post new topic   Reply to topic
 

Parts of objects disapearing

View previous topic View next topic Go down 
AuthorMessage
Guilty Sparks
Heavy Poster



Joined : 05 Jan 2008
Posts : 154
Location : USA East Coast

PostSubject: 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
Back to top Go down
Phantom107
Admin



Joined : 03 Jan 2008
Posts : 206
Location : The Netherlands

PostSubject: 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
Back to top Go down
Guilty Sparks
Heavy Poster



Joined : 05 Jan 2008
Posts : 154
Location : USA East Coast

PostSubject: 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
Back to top Go down
Phantom107
Admin



Joined : 03 Jan 2008
Posts : 206
Location : The Netherlands

PostSubject: 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
Back to top Go down

Parts of objects disapearing

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You can reply to topics in this forum
Phantom107 Forum :: Questions and Answers-
Post new topic   Reply to topic