Log In  

I code in my sleep.

If I don't comment on a great game, I probably gave it a like * but I had nothing more to say than wow!. And I didn't want to add a comment to the BBS with nothing more than wow!.

If your name is in my list of names below, I definitely liked something of yours. If your name isn't in that list, I may still have liked something of yours.

About me

I have never worked in the games industry.

I began using pico-8 and joined the lexaloffle community in late August 2019; I had not previously used Lua. My first pico-8 game was snake using circles for the body segments. Mostly I code games with a retro feel. Sometimes I get inspiration from http://www.bbcmicro.co.uk/ although it is rare that I imitate the precise look and gameplay of the original.

I have only posted a few top level comments on the BBS - if you want to see more of my code; please click on cartridges / all; thanks. I mean to put some games up on itch eventually - when I am content that they are in a finished state, but I keep tweaking.

I haven't owned any console or computer from MicroSoft, Sony, Nintendo, Sega, Atari. My current computer is a Dell and runs Windows. I have used but am not currently using Linux.

I have played Pong clones, but never Pong. I have played: a few Sonic games, Pokemon, some RPGs. I even played the first level of a Mario game once. I don't play Sudoku. I am not the best player of games; I prefer to code. There are some genres of games I don't play.

I learn offline or while coding. For simpler games, I don't follow tutorials but instead work things out for myself; for advanced or complex formulae, algorithms, and patterns, I read what I can about it, then try to implement it for myself.

I like little code challenges.

I type too much.

Other users to look at the profiles of

Enough about me. Here are some users with far more carts and snippets to check out:








enargy (hosts jams)






MBoffin (makes video tutorials)

Mot (has almost instant 3d code for some 2d games through redefining map and spr)






Sophie Houlden




Things to look up

A few things to find out more about if you're new to games programming.

The modulo operator % which returns the remainder after divison. It's useful.

function _init()
--init environment constant

--init circle variables

--init velocity

function _update()
--update velocity

--update position

--wrap x & y to screensize

function _draw()

bounding rectangle a concept related to collision detection. Essentially if you have the four corners of two rectangles, you can test to see if they overlap - and if they do, that's a collision.

vectors {x,y} that can represent points on the screen, or can be added to another to simulate movement

circles and trigonometry in essence, a point {x,y} on a circle can be found if you know the angle with {x=cos(angle)*radius,y=sin(angle)*radius} which lets you move an object a certain amount (speed) in a particular direction (angle): x,y=x+cos(angle)*speed,y+sin(angle)*speed

Interesting websites

Some sites to check out:

lua.org Programming in Lua



Ludum Dare


Book resource list

A short list of games programming books (not to say I own them, just that I researched and decided these look like decent or well-thought-of books):

Game Engine Architecture, by Jason Gregory

Foundations of Game Engine Development, Volume 1: Mathematics, by Eric Lengyel

Mathematics for Computer Graphics (Undergraduate Topics in Computer Science), by John Vince

Artificial Intelligence for Games, by Ian Millington and John Funge

Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game, by Ian Millington

Game Programming Patterns, by Robert Nystrom

Lua Game Development Cookbook, by Mário Kašuba

Algorithms Illuminated, by Tim Roughgarden (not games specific)

About comments I make

I have been answering a few questions on the BBS lately (May-June 2020).

If I have written code in answer to your comment, I probably tried to suit it to the style of code you had already put up. If you are following a tutorial, I will have mistaken the style of code used in the tutorial for your own style, and may have given an answer you can't follow; I apologise here for this - but I sincerely hope the tutorial you are following is explaining the code it is using sufficiently that you can follow my answer.

Where a specific question has been asked, sometimes a reply needs to take a different direction or to progress the code in some way, otherwise you probably wouldn't have needed to ask a question on the BBS. Sometimes I may feel there is an intermediary step that is better explained first.

In spite of writing my code to the style of the person asking, I also try to make my comments (inside and outside the code) reasonably accessible to all. If I have explained something you already knew, please know that I write not just for you but for anyone who looks at the thread. Nevertheless, some comments will be inaccessible to some, and for that I apologise here.

It is my hope I have helped (rather than hindered). Thanks.

Just tried to notify someone with a dot in their username.

Upon posting, the underlining and link was only for the start of their name, upto the dot, which makes me concerned that the wrong user will have been notified.

If the right user was notified, the less serious bug is then that the underlining and linking in the post are in error.

Problem can be seen on this thread: https://www.lexaloffle.com/bbs/?pid=79116

Thanks. :)

P#79117 2020-07-10 07:04

A one player bat and ball game in 560 bytes (by Pico-8's count).

(The code is of course not particulary readable or maintainable. A note of caution for people new to coding, this isn't a code style to emulate when you're starting out, and is done only to make the code size small.)

I'm reluctant to call it a Pong clone (in the exact in every detail sense) or remake because it doesn't try to look exactly like a previous version of Pong (or rather, I know some coders go a lot further in getting their carts to look and play exactly like one or another version), although it is of course derivative of Pong.

Cart #twtw_bnb_remcode-0 | 2020-05-19 | Code ▽ | Embed ▽ | No License

You are the right hand player; you control your bat with the up and down cursor-keys/d-pad-buttons.


  • AI bat as second (left) player
  • Random starting direction for ball
  • Increasing ball speed after a number of bounces
  • Bat speed increases with ball speed
  • Limiter on AI bat speed so it is beatable
  • Score display
  • First to 3, wins
  • Pauses at announcement of winner
  • New game after winner announcement after non-d-pad button press

All in 560 bytes.

I don't code tweet(tweet)carts (a. I don't tweet. b. I add features. c. I like more readable code) but I decided to code a couple as a coding exercise.

(I keep thinking I've overlooked something. Let me know if I have. Thanks!)

P#76893 2020-05-19 09:51 ( Edited 2020-05-19 10:56)

Changing which SFX you are viewing does not always change which SFX is edited by the shortcut keys (for the number of ticks per note, at least). So trying to use the shortcut keys can cause a different SFX's ticks per note to change, which is undesirable.

I am presuming this is because a previous SFX has been selected, and the selection has not been updated to the visible one either when the current SFX was changed or when a shortcut key is pressed.

Sometimes it seems to work fine, then sometimes the bug occurs - I am unable to determine the exact sequence to reproduce it.

pico-8 0.0.0i

P#76847 2020-05-18 16:52 ( Edited 2020-05-18 16:54)

Pressing ctrl+s then ctrl+r in swift succession caused pico8 to freeze.

This did not resolve, and as a result the file was not saved, and was corrupted.

(I had a very recent backup so only lost a very short SFX. This was actually the third time I've had this issue, although the other two times it either resolved or the file wasn't corrupted.)

This was with Windows 10 and pico8 0.1.12c.

P#68363 2019-10-02 10:26 ( Edited 2019-10-02 10:26)

On Android, using Chrome, the cartridges (at least those on the BBS - I haven't looked further afield yet) have constantly crackly audio, and the distinction between ticks is very audible so each tick sounds burbly or garbled, and some instruments sound particularly off in tone from what they should sound like.

I am using an Android tablet. It's low end, but I believe that to be not the main issue because I can get near perfect audio in Firefox with the same tablet (it could still be a contributing factor if Chrome isn't very efficient with delivery of audio but Firefox is).

The tablet runs Android 8.1.0; Oreo go.

I am using Chrome (version 77.0.3865.92 - I just updated it to make sure the issue happened with the latest version available to the tablet).

I can't say whether this is a general problem or limited to this device (I don't have extras to try it on).

I feel this is worth mentioning on the pico8 forum as a bug in case people are expecting everyone accessing their cartridges to be getting a near equal experience. This won't necessarily happen, and the delivery of the audio content that I'm experiencing is so bad that I wouldn't expect anyone to keep a cartridge open for more than 20 seconds.

Here is a link to a cartridge with music in if anyone wants to make a comparison on their own device (in Chrome then in Firefox) try:

The Snowman by gradualgames

Or hunt around for something more to your taste.

I doubt everyone is affected by this, because if they were there would have been a post about it already, but all I find is the occasional mention of crackly audio, with no one noting it as a bug.

I'm not expecting perfection here, and appreciate that it's playing via JavaScript on a low end machine, but when the difference in experience between what Firefox delivers and what Chrome delivers is so great, it seems worth mentioning. (Firefox has a couple of crackles at the start, then smooths out and thereafter delivers quality audio.)

Even if I suspect the problem lies mainly with Chrome for Android, I would still wonder if pico8 could tweak anything to get better playback.

Thanks for reading! And thanks @zep for pico8 which I'm enjoying greatly.

Editing in some threads which may have noted this or another issue with Chrome sound before:

Android Chrome Audio Stutter (May 2019)

Pico-8 Audio on Mobile Web Browsers (Jan 2018)

Lagging sound on chrome (April 2017)

P#68362 2019-10-02 10:17 ( Edited 2019-10-24 08:27)

Follow Lexaloffle:        
Generated 2021-10-27 11:00:58 | 0.071s | Q:17