Some simple questions for my game.

Game Editor comments and discussion.

Some simple questions for my game.

Postby supatails » Thu Aug 16, 2012 10:22 pm

Hey guys, I was a part of this forum back in about 2006 or 2007, I was about 13 then, I'm surprised most of you are still active. XD Now I'm 18 and I'm attempting to pursue game-design as a career, but I gotta start somewhere so I'm creating an experimental game, mostly as a learning experience for myself to ease my right-brained mind into the realm of coding. I have good experience with modelling, texturing, mapping, etc. I just struggle to no end with code so hopefully I can learn alot within the next year or so. Anyway, I have started with a basic character who has the ability to walk and jump from left to right using the State Method following the tutorial on the Game Editor Wiki.
My Questions:
1. For aesthetic purposes, I want the player to bounce upon hitting the ground. The effect i get with a collision>physical response> both actors, is perfect when falling with the exception of the weird vibrations. What can I use to achieve a nice mild bouncy effect upon colliding with the top of a surface?
2. I want the view to follow the player with a slight delay. I can't do this by parenting I'm pretty sure, so how can I set it up with a timer in script editor if necessary? Basically, you press the right key, the player moves and about a second and then the view follows, just for aesthetics.
Thank you guys! :D
User avatar
supatails
 
Posts: 43
Joined: Tue Aug 04, 2009 4:54 am
Score: 1 Give a positive score

Re: Some simple questions for my game.

Postby savvy » Mon Aug 20, 2012 3:46 pm

For the second thing, you need to make it so the viewfollows the character after a certain amount of movement yes? so use...

Code: Select all
if(view.x+(view.width/2)<player.x-5)view.x+=speed;
if(view.x+(view.width/2)>player.x+5)view.x-=speed;
if(view.y+(view.height/2)<player.y-5)view.y+=speed;
if(view.y+(view.height/2)>player.y+5)view.y-=speed;


the +/- 5 is the distance until the view starts following, the speed is the speed with which the view follows and the width/height is because the view coordianates start in it's top corner, adding half the width/height centres the location to the middle of the view.
There are more ways to do this, you should experiment with the code!

savvy
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Some simple questions for my game.

Postby supatails » Wed Aug 22, 2012 5:40 am

Thank you so much for the help savvy!
User avatar
supatails
 
Posts: 43
Joined: Tue Aug 04, 2009 4:54 am
Score: 1 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest