A little help, please :)

Non-platform specific questions.

A little help, please :)

Postby Hblade » Mon Aug 29, 2011 9:00 pm

Hey guys, I'm stuck with a glitch. Currently I'm using physical response (top side of land) with these values: 1, 1, 0, 0, the normal value to stop the player. The collision actor is actually a box (Well was, then I used Game A Gogo's collision mass as an attempt to fix the glitch, resulted in a failure), what happens is, the player is parrented to the collision actor, (The box, or rather GAG's mass), but when you collide with a tile thats one, or 2 tiles up (Left or right side of the tile, which has the double yvel=yvelocity thing, then physical response to prevent sticking to the wall), but anyway, the player (box too, I guess), will FLY to the top of the tile then fall back down. I dunno why or how to fix this. I don't understand O.o None of the pixels of GAG's mass is touching the top side of the other tile either.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: A little help, please :)

Postby skydereign » Mon Aug 29, 2011 9:04 pm

Can you elaborate any? Perhaps code, pictures, ged example...
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A little help, please :)

Postby Hblade » Mon Aug 29, 2011 9:11 pm

Code yes. The ged has quite a lot of it in there so I guess it'd be useless to post it. Once again sky thanks for showing interest in the post where I require help. Heres the collision actor's code.

Code: Select all
//Collision with Left or Right side of land
//[regardless if it says "if jump==1" or not it does the same thing]


double yvel=yvelocity;
if (JUMP==1) {
    PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 0.000000, 0.000000);
             }
yvelocity=yvel;


Top side:
Code: Select all
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 0, 0);

Thats.. about it o.o besides seperate collisions with the left and right side that make the player stop moving.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: A little help, please :)

Postby skydereign » Mon Aug 29, 2011 9:35 pm

Not totally sure what you mean about the actor moving to the top of the tile, and then back down. It sort of sounds like the actor is going into the tiles, and therefore moves up or down due to collisions. Also what is this collision mass? Is it from Game A Gogo's super mario collision example?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A little help, please :)

Postby Hblade » Mon Aug 29, 2011 9:37 pm

Yeah its from that. before, I was using a white square, still same bug. And you may be right. The game's frame rate is 60, and the player moves 3ppf, (pixels per frame), so he might be entering the land as you said. However strangely, before this glitch never happened, although I was using the actual player for the collision, though, which made him spas when using the chain.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: A little help, please :)

Postby skydereign » Mon Aug 29, 2011 9:47 pm

Well, it'd be obvious if the actor was moving into the tile, and from the small test I just did, a speed of 3 wouldn't be enough to move through the tile. From the setup I did, which I think closely matches what you have given me, I didn't see the problem you mentioned. You made a post asking how to become a better programmer, one way is to learn to isolate your bugs. For instance try to make it happen in a smaller ged that only has the necessary bits. If you can do that, you'll have a better understanding of the code used, and usually be able to fix it. Since I couldn't replicated it with that code, either the images you are using have an influence, or, more likely there is something else in your code that impacts this. Just to make sure, can you upload the tiles you used?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A little help, please :)

Postby Hblade » Mon Aug 29, 2011 10:11 pm

Sure.

The white box was the first collision box.

Also, thanks for the isolation tip.
Attachments
COLISSION.png
COLISSION.png (155 Bytes) Viewed 960 times
Grass_02.png
Grass_02.png (219 Bytes) Viewed 960 times
Grass_01.png
Grass_01.png (267 Bytes) Viewed 960 times
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest