Log In  

Cart #27962 | 2016-09-03 | Code ▽ | Embed ▽ | No License
2

Hi, here is my first PICO-8 game ! (And the first game I ever released)

As you may have guessed, it's a remake of Pong.
I chose to do this game to learn the basics of LUA, and because that's one of the easiest game to code.

There are 2 control options :

  • One for keyboard
  • One for Pocket CHIP/gamepad (since the arrow keys are not at the same position).

That's my first game so the code may not be really optimised.

P#27975 2016-09-03 14:22 ( Edited 2018-03-02 13:18)

That computer plays a mean game of pong. :) Nice coding here !

To make it more challenging you might add a 'difficulty' level where the computer will smash the ball from the side when its been in the air for a-while to give it wicked English and difficult to return.

Also in the original PONG game, the ball speeds up the more it is hit.

https://youtu.be/e4VRgY3tkh0?t=23

P#27988 2016-09-03 17:32 ( Edited 2016-09-03 21:32)

I wanted to do that, but the ball just goes through the paddle when it's moving too fast (it doesn't hit the hitbox) I don't know if I'll add this later.

P#28196 2016-09-08 10:19 ( Edited 2018-03-02 13:20)

You don't need to confirm if the ball hits the paddle, just that it crosses it. An easy way to determine this would be to see if one step it is positive distance, and the next is negative.

Then the ball can run any speed at all and still be recognized and hit by the paddle.

P#28206 2016-09-08 14:33 ( Edited 2016-09-08 18:33)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 01:41:16 | 0.013s | Q:15