P5.js is a great coding language for developing and illustrating simulations. These are some simple examples of trying to simulate natural movement and motion, the first book looks at pendulums, springs and particle systems. The second eBook covers quite a lot of different aspects of physics simulations: perlin noise, random mover, forces, N-Body, seek, flee, pursuit, evade, catch and respawn, arrive, wander, scalar projection, path following
Physics Engine
If you want to become very serious about making games then you will need a game engine or sometimes called a physics engine. I have highlighted three below, they are all free initially but when you start to earning money you pay a certain amount (except Godot which remains free and open source). many top selling and familiar games have been made using these engines. For mostly you will need to do some coding but now they offer an alternative if coding isn’t your thing. Click on the links below to see what they are about and explore further.
Godot Unity Unreal
Matter.js Tutorial
However, if you want to use a game/physics engine with p5.js you can follow this tutorial which introduces you to matter.js. In this tutorial you will be introduced to the basics which you can apply to Art, Physics Simulation, Genetic Algorithms and Machine Learning. Then you can create a very popular game called Angry Bird.