Log In  

I am a nerd's nerd

[ :: Read More :: ]

Hi all!

I would like to create a counter that goes from 0 seconds to 1 and vice versa, forever.

I know that I can use time() and indeed I can successfully count from 0 to 1 but then.

How can I decrease and increase again?

I cannot picture a solution...


P#105018 2022-01-13 18:14

[ :: Read More :: ]

Hi all!

I am trying to implement a very small and simple clone of space invaders.

I am thinking how to implement a nice shoot bullet function but I am struggling with picturing a way to shoot bullets in a nice stream that is always steady so that its pace can be increased picking up right power-ups.

I tried, for example, to count maximum number of bullets on screen and shoot only if < than 5 but when the player shoots, clearly, all the bullets are shot almost at the same time.
Then I thought about storing the bullet starting point and comparing it to the next bullet but since my ship goes also forward and back this way is also wrong...

Can you please suggest me some idea to remove this nasty wall? :)

Thanks for your kind help!

In case it can be helpful here's the code so far:

P#83089 2020-10-18 22:06

[ :: Read More :: ]

Hi all!

I know that a MAME cabinet is illegal, even if no payment to play is required.

What about setting up a cabinet with PICO-8?

Would that be ok to let people in the pub enjoy a relaxing game now and then (clearly for free)?

Thanks for your help.

P#48725 2018-01-30 09:19 ( Edited 2018-02-01 12:21)

P#48569 2018-01-26 05:42 ( Edited 2018-01-26 16:53)

[ :: Read More :: ]

Hi all!

I am working on a small pong clone:

I am unable to solve the paddle movement jerkiness.

It is working perfectly if I move 1px per time but, if I increase paddle speed, it becomes really...

Any suggestions?

Thanks for your time and patience :)

P#44030 2017-09-09 14:23 ( Edited 2017-09-11 07:44)

[ :: Read More :: ]

Hi all!

I would like to build walls for a shoot'em'up and I know I can obtain the result with map.

What I do not understand is how to make the drawing dynamic.

For example I have the sprite 0 that contains my wall and I would like PICO-8 to draw walls on the side programmatically.

What would be the best approach to do so?

Thanks for your time and patience.

P#43796 2017-08-31 11:25 ( Edited 2017-09-03 09:20)

[ :: Read More :: ]

Hi all!

I have this collision function:

function are_colliding(entity_a,entity_b) -- are entities hitting each others boundary and not the same type?
 return entity_b.x < entity_a.x + entity_a.w and entity_a.x < entity_b.x + entity_b.w
 and entity_b.y < entity_a.y + entity_a.h and entity_a.y < entity_b.y + entity_b.h

It works almost fine but it is not pixel perfect.

I would like to use it in my games and make it as flexible as possible...
For example an issue I am facing is that in my pong game I can have a round ball or squared ball, depending on theme "classic" or "modern".
This moves the "x" and "y" coordinates of the object I take into account and ruins the collision (here's the game in case it helps problem comprehension - collision is still done there "manually"):

Do you have a suggestion on how to make it as general as possible?

Thanks for your time and patience :)

P#43790 2017-08-31 10:08 ( Edited 2017-09-04 19:37)

[ :: Read More :: ]

Cart #43509 | 2017-08-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I've just started a new game :)

P#43510 2017-08-21 08:41 ( Edited 2017-08-21 12:41)

[ :: Read More :: ]

Cart #45043 | 2017-10-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Cart #44892 | 2017-10-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Cart #44161 | 2017-09-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Cart #44003 | 2017-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Cart #43429 | 2017-08-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hi all!

I've (not) finished my first game.

There are countless things to do and polish and I already have some great suggestions from the forum.

I am publishing it to gather new ideas and suggestions but, above all, to simplify the life of anybody that wants to check the code / test the game.

If you happen to play the game and leave a comment I'd be happy.

Really thanks for your time and patience, it is very appreciated :)


  • 0.5
    Look at how fierce is Pongman on the main screen!
    Don't you feel...
    No, that is not fear at all.
    We also now have some embrional difficulty setting, yay!

  • 0.4
    Finally I've had some time to add "Options" menu and improve the graphics a tiny bit :D
    I am gettin in touch with Pixelart, I terribly suck but I am having great fun in learning / researching and I've met cool people on the net. I wrote a devlog with details here: https://ltpitt.itch.io/pong-ino/devlog/11579/pong-ino-04-shows-off-a-complete-options-menu

  • 0.3
    Pad movement jerkiness is gone!
    I am a very happy guy and I deeply thank solar and capnmarcy for putting me in the right direction:
    And I bow to ultrabrite with his perfect code and comments.
    Now I need to understand if the same treatment can be applied to the ball movement.
    I've been playing some of the old Pong versions (Original Arcade, Game Gear, Nintendo DS, Gameboy...) and I tried (and I am still trying) to make the Classic mode in Pong-ino similar to the original feeling.
    In this version I've also modified SFX in Classic mode for this reason.
    Countless bugs were squashed, the main one was ball spawn always in the same direction.

  • 0.2
    Ouch, collision is a very hairy topic!
    I've implemented countless versions but whatever was working in Classic mode had problems in Modern mode and vice versa.
    This is because in Classic I'm using just rectancles for the paddles and ball too and in Modern using a circle for the ball.
    The problem was cause by the fact that "X" coordinate is in the center for the circle and top left for the rectangle.
    I've also reduced pad sizes, increased pad and ball speeds as suggested here in the forums.

  • 0.1
    Completed the 1st working version of the game

=== TODO LIST ===

  • Find some solution for the ball movement jerkiness (try to apply paddle movement solution)
  • Improve the angle calculation at bounce (make it wider when the ball hits the end of the pads)
  • Make the classic mode as close as possible to the original
  • Add some spice to the Modern mode (powerups, maybe?)
P#43430 2017-08-19 14:24 ( Edited 2017-10-10 08:21)

[ :: Read More :: ]

Hi all!

I've completed a very basic implementation of Pong.

I would like to make it nicer adding a classic mode that looks and plays as close to the original as possible.

To do so I'd need, for starters, to increase my paddles speed but when I do so the paddles end out of the screen.

I cannot understand why, this is the code causing the issue, it is very simple:

 -- check if pad goes out of the upper part of the screen
  if button_up and pad.y > game.upper_bound then
  elseif button_up and pad.y <= game.upper_bound then
 -- check if paddle goes out of the bottom parte of the screen
  if button_down and pad.y + pad.h < game.lower_bound then
  elseif button_down and pad.y + pad.h > game.lower_bound then

If instead of using 1 I use 2 or more the paddles get out of bounds (or start shaking).

In case you want to check the complete code you can find it here:

P#43428 2017-08-19 13:48 ( Edited 2017-08-21 07:40)

[ :: Read More :: ]

Hi all!

I have almost tears in my eyes thinking that I've almost completed a very basic and lame implementation of Pong.

I'd need to draw a very simple intro screen (with game name and settings).

I would like to make a big image (128x128) that will cover the whole screen.

What is the suggested method for this?

Thanks :)

P#42645 2017-07-20 08:11 ( Edited 2017-08-29 15:08)

[ :: Read More :: ]

Hi everyone,

I am writing, for pure fun, a small shoot'em'up.
I would like to do things the "right way".

What tutorials / readings do you suggest to implement main topics:
ship movement / projectile & enemy movement?

I've already implemented a very basic version of movement simply adding to x or y if the player is pressing a button but then I thought...
I need also acceleration in order to enable power ups...
Same problem will be with enemy waves (acceleration, rotation, specular patterns).

How should I proceed?

Is there any book to read or tutorial or article about those topics?

Really thanks :)

P#42512 2017-07-15 13:10 ( Edited 2017-07-16 16:46)

[ :: Read More :: ]

Hi everyone!

I would like to be able to use my games from Android browser.

I know that this is possible because I saw a few games doing it.

I am using latest PICO-8 version but, if I export to html, this is not working:

Thanks for your time and help :)

P#42511 2017-07-15 12:37 ( Edited 2017-08-31 15:41)

[ :: Read More :: ]

Hi all!

I am putting some time in improving my code and make my tiny game smooth and decently playable.

The result I obtained is really far from this (bugs everywhere, the game is slow and boring, it accelerates and slows down without any apparent reason).

Clearly there is a lot to do and a long path to walk but I'd love if you guys can share any suggestion like changes I need to implement, maths / physics / trigonometry I need to study.

I am sorry if this question is very broad but I'd be incredibly happy to get even the tiniest hint.

This is my current code:

A version of the game can be found online:

Thanks for your time and patience :)

P#39138 2017-04-06 16:06 ( Edited 2017-04-09 16:55)

[ :: Read More :: ]

Hello there,

I am playing the music from a function called intro.
This function is run in the update loop.
When the game state is intro then intro is showed and this is the moment I'd like to hear some music.

Problem is that the intro function is called every time the update loop restarts and therefore the music restarts everytime producing a choppy noise.

How can I solve this issue?

My code is available here:

Thanks for your time and help :)

P#38875 2017-03-30 07:38 ( Edited 2017-03-31 12:04)

[ :: Read More :: ]

Hi everyone!

I am building a small pong clone and I would like the game to pause for 2 or 3 seconds whenever a player is scoring.

I saw that there are out there timer class but, since it was not easy for me to implement that, I wanted to ask if there is a simpler way to achieve this result.


P#38676 2017-03-24 09:06 ( Edited 2017-03-24 23:17)

[ :: Read More :: ]

Hi all!

I am building a small pong clone for fun and I have an issue when I press the button to enable pause.

Basically the pause is enabling / disabling itself really fast.

This happens if I use btn() and also if I use btnp()...

The source code is available here:

Can you please help?

Thanks and happy hacking :)

P#38549 2017-03-22 10:00 ( Edited 2017-03-24 14:48)