Page 1 of 2
Hop then jump glitch plz help :(
Posted:
Sun Jul 15, 2007 12:25 am
by jimmynewguy
I'm finished playin around with game editor and i decided 2 start my first real game, when all ready ive run into a problem
i drew my own sprites, every time i try 2 jump my char does a tiny hop before he goes a long distance.
i sat here for 30 mins aligning and making sure my animations were the same height and every thing but it still wont work
plz help if u need 2 i can post the ged file 2
Posted:
Sun Jul 15, 2007 12:32 am
by d-soldier
For this kind of problem (if it has something to do with sprites) you will probably need to post the files for someone to review. Keep in mind that you can not simply make the hopping/jumping animation with the sprites. If you just move the character up (having more blank space below him in the image) GE will discount that empty space and move the sprite down... the jumping needs to be scripted, as in the CAVEMAN game from the tutorial directory.
Posted:
Sun Jul 15, 2007 3:05 am
by pixelpoop
GE will discount that empty space and move the sprite down
d-soldier, I have not encountered this, does it happen with sprite sheets? because I use multiple files without this happening.
Posted:
Sun Jul 15, 2007 6:05 am
by Fuzzy
pixelpoop, the center of the actor is taken as the center of the frame, or the center of the image used as the frame.
Posted:
Sun Jul 15, 2007 7:27 am
by d-soldier
I primarily work with 32 bit PNG files. The transparent space is NOT calculated when determining the center of the actor per frame. If I had man standing and moved his legs up to his chest, he would not be floating, GE would move the lowest non-transparent part to the ground (give the applied gravity).
Posted:
Sun Jul 15, 2007 7:44 am
by Fuzzy
err, yes, thanks for the correction. not taking the 100% transparent pixels into account. The standalone image is cropped to the smallest rectangle that fits around the actor.
Posted:
Sun Jul 15, 2007 7:45 am
by d-soldier
for example:
In the below image, I have one sprite from a standing animation, and one from a jumping animation. By pulling the legs up, I increase the blank space below, so if the frame size remains the same - which it does - the animation should have more blank space when playing, which appears to be jumping. The right two frames show the result however, as the blank space is discarded, using only the opaque pixels to base sprite size and center from. Is this what is being argued about? Because this is exactly what I stated in the prior posts.
POST EDIT: Oh, you got in there first!
Posted:
Sun Jul 15, 2007 5:50 pm
by pixelpoop
I think I understand we have a missunderstanding. You are using a collision to determine if the actor is on the ground. If it is not colliding with the ground your script moves the actor down. But, if you have an animation without a gravity script then the GE does not move the actor down, and in d-soldier's graphic the robot would look like the first set of images during the game.
Also GE does not crop the image and the center does not change unless scripted to move.
Here is a quick example of an actor with 3 frames of the same size with no gravity. It appears to be moving but only the pixel info changes for each frame. GE does not crop the image and the center of the actor stays the same.
Posted:
Sun Jul 15, 2007 6:02 pm
by d-soldier
Right, but unless we are dealing with a top-down game, isn't there going to be gravity? Why make a jumping animation unless there is something to be jumped over (like a hole)? So whats the deal Jimmy?
Posted:
Sun Jul 15, 2007 6:10 pm
by pixelpoop
yes, back on topic. if you do a search on the forum for, single jump, I think you will find what you are looking for. This problem has been covered before.
Posted:
Sun Jul 15, 2007 7:30 pm
by jimmynewguy
there is gravity in the game and u do jump a hole, ive read the post on single jump and im using that code, but it glitches and the char doesnt jump high the first time i press jump but the second it will
Posted:
Sun Jul 15, 2007 10:13 pm
by pixelpoop
Jimmynewguy, post the GE file or a chopped down version that has just the jump action.
Posted:
Mon Jul 16, 2007 1:15 pm
by jimmynewguy
nvm i figured out the problem
the gravity was too strong and just kept adding up so i lowerd it and it works fine now (u were right, the scripting) thx guys points ++
PS: What happend 2 automails rude comment?
Posted:
Tue Jul 17, 2007 3:45 pm
by Rux
Probobly got deleted.
Posted:
Wed Jul 18, 2007 12:23 am
by Game A Gogo
got deleted for involving insult like syntax I presume