I've had it up to here....

Non-platform specific questions.

I've had it up to here....

Postby BloodRedDragon » Wed Apr 06, 2011 7:41 pm

Soz, i'll try and be more polite next time.

CONTROLS: right ctrl to jump, shift to dash
Open this .ged and press Game Mode, if you could, and notice that as you keep jumping, you will reverse direction sometimes when you land. I have been toiling away for hours to work out as to why this is happening, but I have limited programming knowledge and thus cannot work it out.

+1 point will be given :D

Thankooo
Attachments
Demo.zip
Demo of my game (will be finished and more complex as soon as this is sorted)
(215.25 KiB) Downloaded 67 times
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: I've had it up to here....

Postby NERDnotGEEK » Wed Apr 06, 2011 8:52 pm

okay looking at your game.

your collision method works by make your xvelocity change direction by multiplying by -1
this works fine, but when your jumping and landing sometimes your character is colliding with the left and right top corner of your tile actor, and it is making it change direction as if its hitting the wall

if make your metal block actor into a tile actor, and build the level using tiles you wont get this problem.... but

I suggest using a different way to make your ball collide with the walls. this method has a lot of limitations.


so to summarise, as you land, it thinks its hitting the left or right side of the block, not the top.
NERDnotGEEK
 
Posts: 75
Joined: Sat Oct 30, 2010 1:48 am
Score: 12 Give a positive score

Re: I've had it up to here....

Postby Game A Gogo » Wed Apr 06, 2011 9:21 pm

Try checking velocitys of the actor when colliding instead of using the "top side only", etc. since it will be more reliable to some extend. If you can't figure it out from here I'll check the ged for you
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: I've had it up to here....

Postby BloodRedDragon » Wed Apr 06, 2011 9:58 pm

cheers both :D +1 point as promised. I will make adjustments as soon as I have time.
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: I've had it up to here....

Postby BloodRedDragon » Wed Apr 06, 2011 10:14 pm

So how come tiling works better than clones? is it becuase it has more time to decide whether it is colliding with each side?
Also one of the reasons I did not use tiling is because the tiles do not snap to the grid.
What do you suggest for the code when the ball collides with left/right side? :D
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: I've had it up to here....

Postby BloodRedDragon » Wed Apr 06, 2011 10:18 pm

EDIT: Iforgot you can snap tiles... DOH :(
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest