Log In  

Hi! a little bit about me. I'm a software engineer turned game developer and I've discovered my love for working under retro limitations. I found pico-8 because I don't have the hardware needed to develop for actual retro consoles yet(will get some in the future) and I only have a 10 y/o workstation with linux loaded on.

as I'm new to pico-8 and frankly, game development as a whole, where would the best place be to ask for help?

most of the things I will ask for help with will probably seem obvious to most people, but seeing as I haven't had a need to use any sort of math except for comparing numbers while developing desktop apps, It's fairly new to me.

that being said, I'm working on a platformer at the moment with a friend, and specifically after adding map collision(using the dx/dy method) and adding gravity, I can't figure out how to jump. below is a cart file if anyone can help me. thanks in advance!

-bella

Cart #platform-0 | 2022-10-03 | Code ▽ | Embed ▽ | No License

P#118437 2022-10-03 15:55 ( Edited 2022-10-03 15:57)

oh, something not said above is that I have created a couple of games in Unity, so I do have some experience, just not enough I think to create something using a framework or fantasy console.

P#118438 2022-10-03 15:55

Posting here will usually get an answer, with varying degrees of thoroughness depending on who's lurking at the time. There's also a discord, as well as a bunch of youtube tutorials.

Regarding your code, the reason jumping isn't working is because you've got the jump button adding 5 speed in the upward direction while gravity is ensuring that the character's y speed is constantly at the maximum 8 in the downward direction. When I tried pressing jump repeatedly rather than just once, the character went zooming upward.

Usually, for very simple platformers, jump is implemented by checking if the player character is on the ground and the player is pressing the jump button, then if so setting the y speed to a specific value. If you want to use impulses more in line with Unity's physics engine, you would need to include the force of the ground negating gravity, either explicitly or by just setting the yspeed to 0 if the player is on the ground.

P#118440 2022-10-03 16:28

okay, that makes a bit more sense. thanks!

P#118442 2022-10-03 16:46

[Please log in to post a comment]