Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

Race1kView game page

A PICO-8 game about running in 1k of code
Submitted by 00Her0 — 15 days, 15 hours before the deadline
Add to collection

Play Running Simulator

Race1k's itch.io page

Characters/Bytes used
1024

Source Code
q=1::r::w,x=true,false
b=w a={}s={}t=0l=0m=w u=x
r=rnd c=count f=flr
for i=0,9do
add(a,{r(120),r(120),0})
end::_::cls(15)
if(btn(🅾️))b,s,u=w,{},x
if(a[1][1]<100)m=w
if(a[1][1]>100and m)l,m,u=l+1,x,w
?'laps: '..l..' training time left: '..60-f(t),1,1,5
for i=1,c(a) do
ai=a[i]
if(ai[1]==1)ai[3]=0
?i..'웃',ai[1],ai[2],i
if(u)?'🅾️: train again',1,110,12
if(s[i])?'racer '..i..'\'s time: '..s[i],1,i*10,i)else?'--',0,i*10,5
if(b)ai[1],ai[2]=1,i*10
if(ai[1]<100and not b)ai[1]+=1
if(ai[1]<100)ai[3]+=1else s[i]=ai[3]
if(m)ai[1]+=r(1)-0.5ai[2]+=r(1)-0.5
end
b=x
t+=1/30
if(t>60)goto n
flip()goto _
::n::
v=x
a={}q=q+(l/10)
for i=1,10 do
add(a,{1,(i+1)*10,q})
end::m::cls(15)
?'❎ to start the race\nyou are racer 1',1,1,5
if(btn(❎))v=w
if v then
for i=1,c(a) do
ai=a[i]
?i..'웃',ai[1],ai[2],7
ai[1]+=r(1)-0.5ai[2]+=r(1)-0.5
ai[1]+=ai[3]
if(i==1)ai[1]+=1
if ai[1]>100 then
if(i==1)goto w else goto l
end
end
end
flip()goto m
::l::goto r
::w::
cls(15)
?'you won the race!\n1krace: a game by 00her0 ',1,1,5
if(btn(🅾️))goto r
flip()goto w

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

I don't understand what the player is supposed to be doing.

Developer

Running, although I understand why you don't understand it.

Developer

Wait, do you mean what you are supposed to be doing, or what the character in the game is doing?

HostSubmitted

A really interesting entry.
Is it actually a form of AI/neural training, or is it more basic than that?
Either way, nice one!

Developer

No, there´s no AI here! There was a bit more to training before I ran into the character limit though.