Jump to content

Photo

Fake Gravity Platformer Test


68 replies to this topic

#1 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 4:01 PM

I'm 'cheating' with simple counters in this test program and it seems to feel like other games that use complicated math to simulate real gravity, so that's why I call this fake gravity.

Below is the latest version, based on what I posted in another thread. In this version, you can shoot by ducking and pressing the fire button (you shoot in the last direction you were facing).

Please let me know if you think this updated version is OK the way it is or if it's too hard to use. If people like this version, I might turn it into a platform shooting game of some kind.

In case anyone wants to know, I have no missiles because of the kernel_options I'm using, so I had to use the ball. Now I just have one sprite left that I can use for an enemy or target.


Latest Version:

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

Attached File  fake_gravity_platformer_with_duck_and_fire_button_2012y_05m_29d_0338t.bin   4KB   202 downloads


Click here to try it online if you don't have an emulator handy


Here's the bB code:

Attached File  fake_gravity_platformer_with_duck_and_fire_button_2012y_05m_29d_0338t.bas   42.45KB   245 downloads



fake_gravity_platformer_test.png


www.youtube.com/watch?v=Hy5_K2oUprY
http://www.youtube.com/watch?v=Hy5_K2oUprY&rel=0&fmt=35&showinfo=0




Old Versions:

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

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_30d_1620t.bin   4KB   288 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_30d_1620t.bas   30.29KB   302 downloads

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

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

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_29d_1452t.bin   4KB   217 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_29d_1452t.bas   27.75KB   216 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   4KB   245 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_1618t.bas   19.7KB   200 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   4KB   216 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_28d_0037t.bas   16.52KB   199 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   4KB   226 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2351t.bas   16.42KB   185 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   4KB   243 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_2212t.bas   16.38KB   195 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   4KB   238 downloads

Here's the bB code:

Attached File  fake_gravity_platformer_test_by_random_terrain_2011y_03m_27d_1728t.bas   16.12KB   215 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, Tue May 29, 2012 9:04 AM.


#2 Philsan OFFLINE  

Philsan

    River Patroller

  • 2,778 posts
  • 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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 4:34 PM

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

Thanks.




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.




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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 8:17 PM

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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • Location:South Central US

Posted Sun Mar 27, 2011 9:45 PM

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 9:49 PM

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • 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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 10:24 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).

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • 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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Mar 27, 2011 11:14 PM

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 RevEng ONLINE  

RevEng

    River Patroller

  • 3,396 posts
  • bit player
  • 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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 11:38 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.

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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 1:15 PM

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • 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 Philsan OFFLINE  

Philsan

    River Patroller

  • 2,778 posts
  • 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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 3:27 PM

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 pitfall_jerry OFFLINE  

pitfall_jerry

    Space Invader

  • 37 posts
  • 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 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 667 posts
  • Location:South Central US

Posted Mon Mar 28, 2011 5:10 PM

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Mar 28, 2011 6:03 PM

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 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,982 posts
  • 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.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users