The MASM Forum Archive 2004 to 2012

Project Support Forums => OpenGL Forum => Topic started by: shaldan on December 05, 2005, 02:17:44 PM

Title: Mario Collision Sprite question
Post by: shaldan on December 05, 2005, 02:17:44 PM
hello to hitchhikr,

Can you please explain to me, why do you use in Sprites_Animations your Enter2DMode procedure each Draw loop ?
I tried to remove it together with Leave2DMode and it worked too. Only one problem occured, when Mario is too long in collision he together with "enemy" :) dissapears. Can you tell more about this problem and its solution ?

thanks
Title: Re: Mario Collision Sprite question
Post by: hitchhikr on December 05, 2005, 08:47:07 PM
I'm using an orthographic matrix to display 2d pictures (which are stored standard textures), so that the coordinates correspond exactly to the ones of the screen pixels / 1000.

Without that, the gfx would be stretched as the coordinates will go from -1 (left & top borders) to 1 (right & bottom borders) so it would impossible (or rather difficult) to know the exact pixel location of the pictures (the sprites here), which is a problem for precise collisions testing.