Log In  

Cart #tutodizama-0 | 2020-05-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

So I'm really knew to game development and coding as a whole, so I'm still learning basics. I'm trying to figure out how to code a basic jump function. I got it to run but, I'll let you see. Go ahead and boot up the cart if you haven't already. It may take a while for you to notice what's wrong, as it's very subtle, but I trust you'll be able to work it out.

So I got the basic idea for the state code from Urbanmonk's post in this thread
I also referenced begginer's demo and game states-simple from the edu toolset. I tried googling them but nothing showed up. But those were more just learning basic concepts than anything else. IDK why that happens when you start it up. Try pausing and unpausing it also. IDK if the pause button will do it, but if you press escape inside PICO-8 you'll see it happen again. I'm really confused guys. I wouldn't have been surprised if the code was so broke it didn't run but I didn't even consider this happening as a possibility. Like really please I need to know why this even occurred lmao

P#77062 2020-05-23 10:56 ( Edited 2020-05-23 10:58)

Cart #simple_jump-1 | 2020-05-23 | Code ▽ | Embed ▽ | No License

Hi there,

I looked over your code, and well, I honestly don't fully understand it, though that might just be because I tend to take a very straightforward approach instead of more elaborate scripting. Here's a very short program that hopefully helps. For simplicity, it doesn't use mget to get tile information, which requires some setup, but instead the pget function to tell when the player is on the ground, and a mid function as a simple fix to make sure they can't sink into it at all if their fall velocity is too great.

P#77065 2020-05-23 11:43 ( Edited 2020-05-23 11:50)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-05-29 19:39:28 | 0.009s | Q:16