It uses a lot of objects and then if statements between them.
Something like this, though with actual coding language:
Create circle, name it “Player”
Create rectangle, name it “Floor”
Correspond “Player” position on screen to WASD, speed 3
If “Player” touches “Floor,” add friction of some -x
If “Player” not touching “Floor,” add gravity of some -y
Create rectangle, name it “Gun”
Create triangle, name it “Bullet”
Create circle, name it “Enemy”
Create number counter, name it “Kill Count”
If “Player” has “Gun” and X button pressed, spawn “Bullet”
When spawned, send “Bullet” x direction at x speed
If “Bullet” touches “Floor,” delete “Bullet”
If “Bullet” touches “Enemy,” change “Kill Count” +1
If “Bullet” touches “Player,” reset the game
Latest Answers