Skip to main content

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

1K Racing #Pico1kView game page

Top view racing game. A game in 1021 Compressed Bytes of code for PICO-1K Jam 2024 #Pico1k
Submitted by SkyBerron (@SkyBerron) — 8 days, 40 minutes before the deadline
Add to collection

Play game

1K Racing #Pico1k's itch.io page

Compressed Bytes used
1021

Source Code (OPTIONAL)
_set_fps(60)l=1o=2h={100,100,100,100}w={"8888888888888999999998888888888888899999999999999888888888888886666668888888888888899999999999999888888888888889999999988888888888",
"88888999999998888888888888889999999988888888888888999999999999999988888888886666666688888888889999999999999999888888888",
"88888999999998888888888888889::::::988888888888888887666666788888888888889:::::::9888888888888888889::9998888888",
"88888999999998888888888888889:::::998888888888888889::::::::::988888888888888899:::::98888888888888889999999988888888"}
::s::i=1s=t()m={}f={}
for k=1,4do
a=cos(k/4)*10b=sin(k/4)*10
m[k]={x=64+a,y=64+b,a=a,b=b,z=0,u=0,v=0,k=.8-k*.3,r=0,i=2}
end
::_::cls(5)n=1q=m[n]
camera(q.x-64,q.y-64)
for k=0,1do
d=64e=64c=0
for i=1,#w[l]do
pset(d*.04+q.x\1+32,e*.04+q.y\1-32,1)
if(i>#f)f[i]={x=d,y=e}
c+=ord(w[l],i)/32-1.75
a=cos(c)*8b=sin(c)*8
for j=1,4do
circfill(d,e,28-k*4,k>0and 13or j\2%2+7)
d+=a
e+=b
end
end
end
pset(q.x*.04+q.x\1+32,q.y*.04+q.y\1-32,9)
for n=4,1,-1do
q=m[n]
if o<1do
if n<2do
a=btn()or 32
d=a\2%2-a%2
e=a\32%2-a\16%2
q.z+=d/128
a=cos(q.z)b=sin(q.z)
c=abs(q.u*a+b*q.v)
if(q.k<.95and c>.7)q.k+=.01
if(q.k>.1and c<.3)q.k-=.01
if(q.k<.95)?"\as0i7e",0,0
else
a=(f[q.i].x-q.x+q.a)/16b=(f[q.i].y-q.y+q.b)/16
c=(.5+atan2(a,-b)-q.z)%1-.5
q.z+=mid(c,-.01,.01)
a=cos(q.z)b=sin(q.z)
e=abs(c)<.002and -1or 0
end
q.r=max(q.r*.98-e/18)
q.u=(q.u-q.r*a)*q.k+q.r*a
q.v=(q.v+q.r*b)*q.k-q.r*b
end
a=(f[q.i].x-q.x)/16b=(f[q.i].y-q.y)/16
c=sqrt(a*a+b*b)
if(c<3)q.i+=1if(q.i==#w[l])q.i=1if(n<2)i+=1
end
if(pget(q.x,q.y)!=13)q.u*=.95q.v*=.95q.r*=.95
for n=4,1,-1do
q=m[n]
a=cos(q.z)b=sin(q.z)
line()
for j=1,2do
for i=.125,1.25,.25do
d=j*cos(i)*4e=sin(i)*4
line(q.x\1+d*a+b*e,q.y\1+e*a-b*d,8+n)
end
end
q.x+=q.u
q.y+=q.v
end
camera()
if o<1do
p=(t()-s)*100\1/100
?"time:"..p,0,0,6
?"best:"..h[l]
?"lap:"..i
if(q.i==2and i>3)h[l]=min(h[l],p)o=1
elseif o<2do
?"\^w\^ttime:"..p,4,16,9
?"\^w\^tbest:"..h[l]
if(btnp(5))o=2flip()goto s
else
?"\^w\^t1k racing",4,16,9
?"track ⬅️"..l.."➡️",11
?"best:"..h[l]
a=btnp()l=1+(l-1+a\2%2-a%2)%#w
if(btnp(4))o=0flip()goto s
end
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

Amazing, the vector car boxes, the track shapes.  Plays great!

Submitted

Impressive, great game. I'm saving that code for future learning.

Submitted

Even more impressive than your usual excellent work! At first I was afraid any mistakes would send me off the edge, pleasantly surprised to just be slowed down. Also, great job fitting some sfx in there!

DeveloperSubmitted(+1)

Thank you for your nice words, as always. I wasn't sure about edge and off road behaviour. Going off road reduces speed a lot, but I think it allows for a fast recovery most of the times. As I didn't have enough bytes for skidding particles/smoke, sfx was the cheap option. I look forward to your entry!

Submitted

Particle effects, I like the ambition! Was planning to make a racing game as my second entry, but my current one is demanding actual world design and I've never made a game of its type before. Sometimes I wonder why I make things so hard for myself, but I guess that's kind of the nature of size coding. 😛

Submitted

This is amazing! So much packed in here. Great visuals, multiple tracks, ai racers and more. Killer work.

Submitted

This is amazing! I don't know what to say... I'll go and play some more.

Submitted

I played this and I am beyond impressed-such a cool and unique idea, executed so well-really really impressive 

Submitted

Awesome! Going off the track is so unforgiving! Amazing how much can be packed into 1k!

Submitted

Feature packed for 1K., well dpone. The AI left me for dead :)

DeveloperSubmitted(+1)

Thanks! Development came along very well so I didn't have to resort to (very) dirty tricks to gain some extra bytes. AI is simple: they adjust angle to go straight to the next waypoint but they take their foot off the accelerator a bit when they are turning. So, they are very fast on straight sections but slow down on curves. I tried this simple logic and tweaked the parameters a bit. Surprisingly, it was enough for a decent AI. Different cars have slightly different parameters and different waypoint offsets, so most of the time they differ in their path.

HostSubmitted

Holy heck. I have no idea how you crammed so much into 1K 🤯
The graphics and gameplay are great. The SFX of the skidding is spot-on.
Not to mention, you have smart AI opponents here too.
AND track selection... I mean.. WHAT?! 😅
Really great entry 🤓👌
(Best I got on Track 1 was 81.9, 1st)

DeveloperSubmitted(+1)

Thanks! To be honest, I was also quite surprised because even though I kept adding more features, there was still a fair amount of compressed bytes left. I ended up spending them on the 4 tracks, track selection, and the minimap.