Do you need a physics engine for a 2D platformer?
We don’t want to use a big 2D physics engine in this case, and there are a few reasons for this: Of course, there are also many pros to using an off-the-shelf physics engine, such as being able to set up complex physics interactions quite easily, but that’s not what we need for our game.
Do you need a physics engine for your game?
Of course, there are also many pros to using an off-the-shelf physics engine, such as being able to set up complex physics interactions quite easily, but that’s not what we need for our game. A custom physics engine helps the game to have a custom feel to it, and that’s really important!
How to change vertical speed in platformer physics?
In case the Jump key is pressed, we want to set the vertical speed to the jump speed and change the state to jump. That’s going to be it for this state, at least for now. Now let’s create a logic for moving on the ground, and right away start playing the walking animation.
Why do you need half size for Physics?
Most of the time for calculations we’ll need the half size anyway, so instead of calculating it every time we’ll simply memorize it instead of the full size. Let’s start by adding a constructor, so it’s possible to create the struct with custom parameters. With this we can create the collision-checking functions.
Which is the best 2D game engine to use?
If you just want to make 2D games and don’t care about programming language or subscription fees, you’ll find Construct 3 to have everything you need to get a demo up and running, and quickly. All of your work will be done in a browser, using drag-and-drop tools (and custom JavaScript support if you need it).
What’s the best way to make a 2D game?
If you’re already a JavaScript developer and willing to pair React with something like boardgame.io to make a simple 2D game, you could potentially get a prototype up and running pretty quickly. For all other types of 2D games, you’ll want to look elsewhere.