Pico8: How do I shoot?

One question that I always get asked is: how do I add and remove multiple objects to a game dynamically. Stuff like projectiles, bullets or particles. No problem: I will show how to create objects on-the-fly in Pico-8. BulletOne, BulletTwo, BulletThree, BulletFour Probably the first idea is to make a new table for each object. We can just define a bunch […]

Arrays and Tables in Pico-8

2D Arrays For beginners, I suggest you use concatenation to index 2D arrays. Create a new object in a 2D cell at (i,j) in a table called myArray with the following code: myArray[i..”,”..j] = {} To iterate over all objects in the myArray you can use the pairs iterator. Caution: the objects are not ordered […]