Jump to content

Fake Gravity Platformer Test


38 replies to this topic

#1  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 4:01 PM

Try this little Fake Gravity Platformer Test program when you get a chance and let me know if it feels right to you (if the 'physics' seem similar to other platform games). I'm not using any complicated math in the program, so that's why I call it fake gravity.

Attached Image: fake_gravity_platformer_test.png


www.youtube.com/watch?v=Hy5_K2oUprY



Latest Version:

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_30d_1620t.bin   4K   112 downloads


Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_30d_1620t.bas   30.29K   119 downloads



Old Versions:

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_29d_1452t.bin   4K   60 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_29d_1452t.bas   27.75K   45 downloads

-------------------------------------------------

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_1618t.bin   4K   70 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_1618t.bas   19.7K   52 downloads

-------------------------------------------------

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_0037t.bin   4K   62 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_0037t.bas   16.52K   50 downloads

-------------------------------------------------

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2351t.bin   4K   59 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2351t.bas   16.42K   41 downloads

-------------------------------------------------

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2212t.bin   4K   58 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2212t.bas   16.38K   45 downloads

-------------------------------------------------

Here's the .bin file to use with an emulator:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_1728t.bin   4K   61 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_1728t.bas   16.12K   49 downloads



About this test program:

I played around with batari's platformer code and made a little test program with it in August of 2010. The complicated math was a couple of miles over my head, so I kind of gave up on it (hoping to do something similar with my own code some day that might be easier for my tiny brain to understand). I never got around to it until a couple of days ago.

I slapped together a pfread fix for a program that Master_Programmer was working on and my pfread code seemed to be better than what I was already using in some of my other programs. It got me in the mood to finally try my own platformer type of code.

My code seemed to be working pretty good, so I made a new test program using an improved version of my code and added a crappy little animated sprite, then posted it above for you to poop on. :D

Whether the code is good enough as it is or people have ideas to make it better, I won't try to turn it into a game until Seaweed Assault is finished. I just wanted to get this test program done while it was fresh in my mind and so people could let me know know if it's something I should keep working on later.


Thanks.

Edited by Random Terrain, Thu Mar 31, 2011 1:56 AM.


#2  

    River Patroller

  • 2,242 posts
  • Joined: 26-February 07
  • New Orleans Saints Super Bowl XLIV Champions
  • Location:Switzerland

Posted Sun Mar 27, 2011 4:15 PM

I am not a platform expert but IMHO player's movement is very good!

#3  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Sun Mar 27, 2011 4:23 PM

Boy I like that! Especially your little skid feature. Almost has a SMB feel to it. He does move a bit quick. I guess your code is scalable for speed though. Don't know if this is anything or not, but when you jump in the open it seems strait forward but when jumping under a platform, the little guy pauses as if he went all the way up before he falls.

#4  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 4:34 PM

View PostPhilsan, on Sun Mar 27, 2011 4:15 PM, said:

I am not a platform expert but IMHO player's movement is very good!
Thanks.




View Postgrafixbmp, on Sun Mar 27, 2011 4:23 PM, said:

Boy I like that! Especially your little skid feature. Almost has a SMB feel to it. He does move a bit quick. I guess your code is scalable for speed though.
Yeah, I can slow him down or speed him up. I tend to like faster movement, so that's why I went with 1.38. I was moving him at 1.52 at one time, but that seemed a little too fast.




View Postgrafixbmp, on Sun Mar 27, 2011 4:23 PM, said:

Don't know if this is anything or not, but when you jump in the open it seems strait forward but when jumping under a platform, the little guy pauses as if he went all the way up before he falls.
Thanks for pointing that out. I probably forgot to clear the jump code when he bangs his head. I'll check after I eat supper/dinner or whatever it's called.

#5  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 8:17 PM

View PostRandom Terrain, on Sun Mar 27, 2011 4:34 PM, said:

View Postgrafixbmp, on Sun Mar 27, 2011 4:23 PM, said:

Don't know if this is anything or not, but when you jump in the open it seems strait forward but when jumping under a platform, the little guy pauses as if he went all the way up before he falls.
Thanks for pointing that out. I probably forgot to clear the jump code when he bangs his head.
Yep, that's what I did. I forgot to clear the appropriate variables when he bangs his head. The improved version is in the first post.

#6  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Sun Mar 27, 2011 9:45 PM

View PostRandom Terrain, on Sun Mar 27, 2011 8:17 PM, said:

View PostRandom Terrain, on Sun Mar 27, 2011 4:34 PM, said:

View Postgrafixbmp, on Sun Mar 27, 2011 4:23 PM, said:

Don't know if this is anything or not, but when you jump in the open it seems strait forward but when jumping under a platform, the little guy pauses as if he went all the way up before he falls.
Thanks for pointing that out. I probably forgot to clear the jump code when he bangs his head.
Yep, that's what I did. I forgot to clear the appropriate variables when he bangs his head. The improved version is in the first post.
The movement is spot on however, holding the button works differently between being in the open and being under a platform. In the open, its one shot when holding the button. Being under a platform it is repeated jumping.

#7  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 9:49 PM

View Postgrafixbmp, on Sun Mar 27, 2011 9:45 PM, said:

The movement is spot on however, holding the button works differently between being in the open and being under a platform. In the open, its one shot when holding the button. Being under a platform it is repeated jumping.
Oops, I cleared one too many variables. Thanks. I'll fix it right now.

#8  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 9:59 PM

New version posted. Thanks for catching that.

#9  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Sun Mar 27, 2011 10:17 PM

IT'S PERFECT! That feels so natural. Very high quality. Just curious, if yours doesn't have any complicated math going on, then I'm guessing there's plenty of room for adding many other things for any gind of game the engine would be used for? I may play with this one. I smell mario bros 2 (not super).

Ok. This may be a stupid question... I follow most everything in the code except for one thing, I never understood how ya alter the thickness of sections on the playfield. I figured there was a provision for it but I can't find it in the code nor have I ever figured it out before. And when ya set the colors, whats the purpose of setting the PF color, then pulling the color data from the list immediately afterwards?

Edited by grafixbmp, Sun Mar 27, 2011 10:43 PM.


#10  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 10:24 PM

View Postgrafixbmp, on Sun Mar 27, 2011 10:17 PM, said:

IT'S PERFECT! That feels so natural. Very high quality. Just curious, if yours doesn't have any complicated math going on, then I'm guessing there's plenty of room for adding many other things for any gind of game the engine would be used for? I may play with this one. I smell mario bros 2 (not super).
Thanks. As it is, there's only 1586 bytes of ROM space left, but there will be a lot more with bank switching turned on.

#11  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 10:42 PM

Fixed a small problem where the color of the sprite was messed up going from squatting (ducking or whatever you want to call it) to sliding. New version in the first post.

#12  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Sun Mar 27, 2011 11:06 PM

Ha! This whole time I didn't realize he could squat. I like runnijng right up near the edge and have him slide only to fall off the edge very gracefully. Your code explained to me and gave me appreciation in one go of how PFreads work. I love it. I still don't get how ya do the variable playfield line thickness thing.

#13  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 11:14 PM

View Postgrafixbmp, on Sun Mar 27, 2011 11:06 PM, said:

I still don't get how ya do the variable playfield line thickness thing.
This post might help:

http://www.atariage....95#entry1536795


This might help too:

http://www.randomter...#no_blank_lines

Edited by Random Terrain, Mon Mar 28, 2011 1:15 AM.


#14 ONLINE  

    Stargunner

  • 1,929 posts
  • Joined: 23-May 09
  • bit shoveler
  • Location:Canada

Posted Mon Mar 28, 2011 4:37 AM

Nice job RT! :thumbsup:

This is super nit-picky, but the one thing that struck me as odd is the fact that the guy skids when stopping but not when changing directions.

#15  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Mon Mar 28, 2011 6:46 AM

Thanks RT. I get it now. I was way over thinking it and this whole time it was so simple :dunce:

#16  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 11:38 AM

View PostRevEng, on Mon Mar 28, 2011 4:37 AM, said:

Nice job RT! :thumbsup:

This is super nit-picky, but the one thing that struck me as odd is the fact that the guy skids when stopping but not when changing directions.
Thanks. That is a little odd. I only activated the slide when the player stopped moving the joystick, but forgot about sliding when changing directions. I'll try to add that right now.

#17  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Mon Mar 28, 2011 1:14 PM

Was curious about sliding while squating. Like run right then squat while slowing down (sliding)? Just an afterthought.

#18  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 1:15 PM

View Postgrafixbmp, on Mon Mar 28, 2011 1:14 PM, said:

Was curious about sliding while squating. Like run right then squat while slowing down (sliding)? Just an afterthought.
I almost have sliding when switching directions working correctly and I'll add this while I'm at it. Thanks.

#19  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 2:34 PM

New version in the first post. You can now slide while squatting and slide when changing directions while running. I hope nothing got screwed up. I haven't found any problems on my own so far. Besides the usual WTF problems that always pop up because a solution is never as simple as you imagine it, one problem I had was that || (OR) stopped working when I added more code to the lines. I had to split them up into separate if-thens before they would work.

That's something useful to remember. If your program won't compile all of a sudden (although everything looks right) or it stopped working the way it should and you're ready to gnaw off your arm and beat yourself in the face with it, the problem is probably an if-then that stopped working.

Edited by Random Terrain, Mon Mar 28, 2011 2:37 PM.


#20  

    River Patroller

  • 2,242 posts
  • Joined: 26-February 07
  • New Orleans Saints Super Bowl XLIV Champions
  • Location:Switzerland

Posted Mon Mar 28, 2011 3:21 PM

I have no words.
Movements are awesome.

#21  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 3:27 PM

View PostPhilsan, on Mon Mar 28, 2011 3:21 PM, said:

I have no words.
Movements are awesome.
Thanks. If nobody finds any other problems, I'll leave this alone for a while and when I get done with Seaweed Assault, I'll turn this into an actual game with platforms that are placed using controlled randomness.

#22  

    Space Invader

  • 31 posts
  • Joined: 29-August 07
  • Location:Atlanta, GA

Posted Mon Mar 28, 2011 3:49 PM

This looks very good and I love how well documented the code is.

#23  

    Dragonstomper

  • 656 posts
  • Joined: 07-September 06
  • Location:South Central US

Posted Mon Mar 28, 2011 5:10 PM

View PostRandom Terrain, on Mon Mar 28, 2011 2:34 PM, said:



gnaw off your arm and beat yourself in the face with it
Don't do that, you need that arm to code with. :D

#24  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 6:03 PM

View Postpitfall_jerry, on Mon Mar 28, 2011 3:49 PM, said:

This looks very good and I love how well documented the code is.
Thanks. I forgot to add comments for the last bit of stuff I did. I'll add the comments and see if I can find a sound effect I like and add it to the program. That will give me an excuse to upload a new version.

#25  

    Visual batari Basic User

  • 20,570 posts
  • Joined: 23-April 01
  • Controlled Randomness Replay Value Nonlinear
  • Location:North Carolina (USA)

Posted Tue Mar 29, 2011 1:01 PM

New version in the first post. This one has two sound effects (one for jumping and one for falling). It looks like all of the new code has comments now, but I might have missed something. As usual, if anyone spots a mistake or places in the code that need comments or someone has found a way to crunch my bloated code, please let me know.


Thanks.

Edited by Random Terrain, Tue Mar 29, 2011 1:01 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users