Hop then jump glitch plz help :(

Game Editor comments and discussion.

Hop then jump glitch plz help :(

Postby jimmynewguy » Sun Jul 15, 2007 12:25 am

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 :shock: plz help if u need 2 i can post the ged file 2 :D
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Postby d-soldier » Sun Jul 15, 2007 12:32 am

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.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby pixelpoop » Sun Jul 15, 2007 3:05 am

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby Fuzzy » Sun Jul 15, 2007 6:05 am

pixelpoop, the center of the actor is taken as the center of the frame, or the center of the image used as the frame.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby d-soldier » Sun Jul 15, 2007 7:27 am

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).
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Fuzzy » Sun Jul 15, 2007 7:44 am

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.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby d-soldier » Sun Jul 15, 2007 7:45 am

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!
Attachments
spritecheck.jpg
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby pixelpoop » Sun Jul 15, 2007 5:50 pm

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.
Attachments
y_position_test.zip
use arrow keys to move the animation around. The number tells you the y position of the actor. Notice it only changes with the arrow keys.
(204.3 KiB) Downloaded 112 times
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby d-soldier » Sun Jul 15, 2007 6:02 pm

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?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby pixelpoop » Sun Jul 15, 2007 6:10 pm

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby jimmynewguy » Sun Jul 15, 2007 7:30 pm

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
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Postby pixelpoop » Sun Jul 15, 2007 10:13 pm

Jimmynewguy, post the GE file or a chopped down version that has just the jump action.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby jimmynewguy » Mon Jul 16, 2007 1:15 pm

nvm i figured out the problem :D 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?
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Postby Rux » Tue Jul 17, 2007 3:45 pm

Probobly got deleted.
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Game A Gogo » Wed Jul 18, 2007 12:23 am

got deleted for involving insult like syntax I presume
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

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron