I would Like my Player to walk down a slope

Game Editor comments and discussion.

I would Like my Player to walk down a slope

Postby ozziedave » Tue Jul 31, 2007 11:52 am

Hi All,

I would like my Player Sprite to walk down a slight slope, the tile I would like it to run down is fairly long, not small 64x64 square tiles.

As with all larger Tiles it has to be either an oblong or square and the curve is made were the rest of the square/oblong is masked out.

When my Player walks on the slope he just follows the oblong tile at the top and does not go down the slope, this means that he is
seen walking on air.

I have Multimedia Fusion and the Player automatically follows the slope
without any trouble at all.

Any help would be much appreciated.
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score

Postby pixelpoop » Tue Jul 31, 2007 1:38 pm

did you add gravity to your game?

Their is a tutorial for it:
Goto the Help menu -> Game Stuff ->Gravity
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby supa-tails » Tue Jul 31, 2007 3:39 pm

Me and Automail10 have a tutorial on this page that covers gravity, simple gravity would be to add a drawactor with a script editor saying:
yvelocity + yvelocity = .3

and here is something I found to flip pictures.
Attachments
New Compressed (zipped) Folder.zip
(48.29 KiB) Downloaded 113 times
................................................................................................ www.freewebs.com/thebiverse .....................................................................................




c'ya on the other side
User avatar
supa-tails
 
Posts: 269
Joined: Fri Jul 27, 2007 3:03 pm
Location: In an aliens tummy... Or in cumming Georgia USA
Score: 17 Give a positive score

Postby automail10 » Tue Jul 31, 2007 4:58 pm

Your right supa-tails. Freddy also has a tutorial reply.
Back
User avatar
automail10
 
Posts: 280
Joined: Sun Jun 03, 2007 11:30 pm
Location: On a pancake on a bunny.
Score: 5 Give a positive score

Postby supa-tails » Tue Jul 31, 2007 6:25 pm

Oh yeah
................................................................................................ www.freewebs.com/thebiverse .....................................................................................




c'ya on the other side
User avatar
supa-tails
 
Posts: 269
Joined: Fri Jul 27, 2007 3:03 pm
Location: In an aliens tummy... Or in cumming Georgia USA
Score: 17 Give a positive score

Postby Game A Gogo » Tue Jul 31, 2007 11:43 pm

HOT TIP!
For real gravity factor, used
Code: Select all
yvelocity*=.16

and on create actor, is where you would define the weight

NOTE:

Use .16 for 60fps and .32 for 30fps.

alternative and more accurate version:
Code: Select all
yvelocity*=(9.6/real_fps);


Whit this, you will be sure to add a more realistic effect in your games, but remember to add a limit to the falling, which would be 9.6 pixel per frame.
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

Completed Velocity Tut but still falling

Postby ozziedave » Thu Aug 02, 2007 9:04 am

Hi All,

I digested all the posts and also ran the demo"Velocity" Made an event "Draw Actor"
with Code: Yvelocity = Yvelocity +.5; then a right key response Capt_Kid.xscreen += 3;

The captain stands on an image tile, when he is moved with the Right arrow he moves a
few inches and then drops past the tile to oblivion.

What am I doing wrong please.

The first sprite Image shows him standing on the pipe, the second is when he is slipping down past the tile.


http://img2.freeimagehosting.net/uploads/bc8310b966.jpg
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score

Postby pixelpoop » Thu Aug 02, 2007 10:18 am

Do you have a physical response set so he won't go past the tiles? Look at the demo under help -> Events and Actions -> physical response.

You may also be running into a problem if your velocity gets to high. You should cap it off by putting your velocity increase inside an if statement, like this:

if (Yvelocity<4){Yvelocity = Yvelocity +.5;}

Note: GE looks at every frame and looks to see if there is a collision happening which you have set it to look for. It is possible for your Yvelocity to get so high that your actor never collides with the ground. In one frame he would be above the ground and the next he is below it. So GE never sees the collision. To help eliminate this you could make your ground blocks deeper so their is more to collide with and also you should cap your yvelocity.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Game Editor seems to have a problem with curves

Postby ozziedave » Thu Aug 02, 2007 11:25 pm

Hi all & pixelpoop,

I tried all of the suggestions, but still my Player falls off of my curved platform,
I now believe that Game Editor has a problem with curves.

Most of the demo games revolve around straight surfaces, when you try the
basic demo “Caveman.ged” walk him onto the rocks near the dead tree, then
walk him along the rocks and he falls into oblivion.

I can get my Player walking on flat surfaces but curves, NO WAY.

Thanks for your continued help, most appreciated.

Ozzie Dave
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score

Postby d-soldier » Fri Aug 03, 2007 12:52 am

Ozziedave, post a screenshot that shows both the collision map sprite, and the player sprite so I can check something, and perhaps help you out.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

d-soldier

Postby ozziedave » Fri Aug 03, 2007 1:41 am

Hi d-soldier,

See my post sect 7 this page, has a link to image.

Many Thanks
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score

Postby d-soldier » Fri Aug 03, 2007 1:54 am

If you want to zip up the entire game and send it to me, I'll take a look at it and try to get your desired effect working.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

d-soldier zip file for you

Postby ozziedave » Fri Aug 03, 2007 6:24 am

Hi d-soldier,

Here is the start of my first effort that has stalled due to gravity.

Cheers
Attachments
Generic.zip
Just a newbee game fragment
(1.28 MiB) Downloaded 118 times
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score

Postby d-soldier » Fri Aug 03, 2007 7:02 am

Ozziedave, there were a few problems in the file which prevented you from getting your desired results. First of which, only your first platform actor had a collision-event/physical response which was set to repeat. Anything you are going to walk on needs to have "REPEAT WHILE COLLIDING" set to yes. A better way to accomplish this would be to draw your level using your tiles, and then have a separate tile actor (of plain white boxes or the like) which you lay above the graphics to act as your collision map, which reduced the number of objects GE needs to run collision checks with every frame, thus optimizing the game itself. Another problem which will need to be considered is the Captain Sparrow sprites, which due to the jerky leg kicking are not the best choice of sprites to use in a game with such curvy landscapes due to the way collisions work in accordance with physical responses... Anyway, I'm uploading a modified GED file, which you can place back into the directory with your own (still needs the /data directory on your pc as I am not uploading all the graphics again). Let me know if this was the desired effect.
Attachments
Generic_fixed.zip
(1.99 KiB) Downloaded 106 times
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

d-soldier many thanks

Postby ozziedave » Fri Aug 03, 2007 9:19 am

d-soldier thank you for fixing my problem, it has allowed me to further
my plan to make a couple of games for my GP2X when ever they
dispatch it, soon I hope.

One again thank you for taking the time to help me, much appreciated.

I will take onboard those helpful hints also.

Cheers

The wonders of the internet.

Ozzie
User avatar
ozziedave
 
Posts: 24
Joined: Sat Jul 28, 2007 6:43 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron