So I was building a game that generates 30 stars at random x,y cords using the following snipet, however is returns an error
stars={} for i=1,30 do local countup=i add(stars,countup) add(stars.countup,x) add(stars.countup,y) add(stars.countup.x,rnd(0,127)) add(stars.countup.y,rnd(0,127)) end |
Does anyone know why?
Thanks, Bouncy



I removed a couple important lines of code and found that it made the character invisible. I played around with it and thought it was pretty fun, and decided to throw it here. I also blacked out a few sprites from the start of level animation. This has probably been done before, but I haven't seen it so I figured I might as well post it. If you can complete it please post your results in the comments! I'd love to see how you guys do.


I rewrote my checkerboard demo for the Pico-8 Fantasy Console. This program is amazing. It is probably the closest thing to QBasic which I used to use. However it uses a slightly modified form of Lua that also has graphics commands. In a way it is a lot like using Love2D but I am still quite new to using Pico-8. One of the most notable features is that it has built in ability to record video to a gif file.

Pico-8 is almost like a mini DOS or Linux distribution except that all the programs are written in Lua. It comes with a full manual explaining the features which is available as a text file and also a page on the official website here:


So I'm trying to make a idle game and im using a timer that resets to 0 every 30 cycles to make a 1 second timer, my goal is to make the total number increase by 0.2 every second but after a wile it increases by 0.1999 instead and I have no idea why
heres my code:
function _init()
timer=0
counter=0
end
function _update()
if timer==30 then timer=0 end
if timer==0 then counter+=0.2 end
timer+=1
end
function _draw()
cls()
print("timer:",0,0)
print(timer,24,0)
print("counter:",0,7)
print(counter,32,7)
end


