School Project problems

Talk about making games.

School Project problems

Postby weldee » Wed May 30, 2012 10:09 pm

Hello fellow game-makers!

Me and a few friends are trying to make a game for a school project but we are having som problems with the coding part of the game-making.
I used a tutorial by game-editor that helped me make an actor to jump. The problem we are having is that we can make the actor jump but he wont jump up far at all. We can jump on obstacles but it lags and just looks awful.

Another problem we are having is that we can't make the animations to work properly. Our actor can't change animations at all. You can see the walk-right animation but when we for example make our actor to jump it changes to the jump animation but not back to the walking animation. I'm goint to link everything we've done so far and hopefully someone of you guys can find the source to our problem! :)

Here's a link you can use to download our game:

http://www.mediafire.com/?1st8a4ct8vxqjr6
weldee
 
Posts: 2
Joined: Mon May 28, 2012 3:47 pm
Score: 0 Give a positive score

Re: School Project problems

Postby skydereign » Wed May 30, 2012 10:46 pm

What tutorial were you using? Unless your project requires to use strings, that method is unnecessarily complex, especially for a school project. But to explain the jump, you have a condition in the player's draw actor event. This is supposed to regulate jumping, and you mention something in the comment saying that you should jump when canjump is not zero.
Code: Select all
if(key[KEY_SPACE]==1 && vdir!=2)

As you can see, that isn't there. And since draw events trigger every frame, that means when you press jump, if you are still pressing jump the next frame, the yvelocity code causing the jump will still trigger (but the second time around canjump is set to 0, meaning the player stops jumping). So, just append the canjump==1 condition in the if, and jumping should work.

The reasons the animations aren't working properly is that you are using a system that generates the names of the animations, but you didn't actually name the animations properly. The only ones using the proper format is playerjumpright and playerjumpleft.

Lastly it doesn't lag as far as I can tell.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: School Project problems

Postby weldee » Wed May 30, 2012 11:00 pm

Ahh I see. Well I knew that something messed up the animations but I didn't find in the code what it was. As you proably saw I just copy pasted the code cus I was abit lazy but I think that I should read it properly before I use it ^^
But I'll see into the things you've said and come back if I don't solve it! :)
weldee
 
Posts: 2
Joined: Mon May 28, 2012 3:47 pm
Score: 0 Give a positive score

Re: School Project problems

Postby skydereign » Wed May 30, 2012 11:40 pm

Well, I really recommend using a different base for your game. Unless you really understand what you are doing you shouldn't use that method (and arguably even if you knew what you were doing, you shouldn't use it). You might take a look at this (I think it is a lot simpler to grasp and therefore use). http://game-editor.com/forum/download/file.php?id=4965
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest