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

Crusin' Cyber Highway 9View game page

Ride the retro cyber highway. Avoid the retro cyber traffic. Rack up as many cyber meters as you can
Submitted by geometric-games (@twitonatrain) โ€” 24 days, 1 hour before the deadline
Add to collection

Play game

Crusin' Cyber Highway 9's itch.io page

Compressed Bytes used
1024

Source Code (OPTIONAL)
camera(-64,-64)posz=0
::start::
cls()?-posz.." cyber metres",-35,0
?"press โŽ",-20,6
if(btn(โŽ))goto real
flip()goto start::real::
sc={{-.25,0,-1},{.25,0,-1},{.75,0,0},{-.75,0,0},{0,.5,0}}
faces={{1,2,3,4},{4,5,3},{1,2,5}}
r=0n=4f=64๐˜ฑ1=(f+n)/(n-f)๐˜ฑ2=2*f*n/(n-f)๐˜จ=16rm=๐˜จ+1posz=0posx=0rep=72sz=posz-4sx=posx
function gh(x,z)bh=sin((x+z)/(rep/2))+cos(z/rep)
if abs(x)==๐˜จ then
bh=8elseif abs(x)>=๐˜จ/1.5then bh=4end
return bh/2end
hj={}
for z=0,๐˜จ-1do
for x=1,๐˜จ do
add(hj,{x+z*rm,x+1+z*rm,x+1+(z+1)*rm,x+(z+1)*rm})
end
end
function ic(fz,lz)return lz>=-1and lz<=1and fz>=-1and fz<1end
function df(sq,๐˜ฑ)
for i=1,#sq do
cp=๐˜ฑ[sq[i]]np=๐˜ฑ[sq[(i%(#sq))+1]]
if ic(np[3],cp[3])then
line(np[1]*64,-np[2]*64,cp[1]*64,-cp[2]*64,col)end
end
end
function tm(๐˜ฑ)
x=๐˜ฑ[1]-posx
y=๐˜ฑ[2]-ch
z=๐˜ฑ[3]-posz
w=-z
x/=w
y/=w
z=z*๐˜ฑ1+๐˜ฑ2
z=z/w
return{x,y,z}
end
es={}
function ds(sx,sz,rot,scol)
w={}
for ๐˜ฑ in all(sc)do
add(w,{๐˜ฑ[1]+sx,๐˜ฑ[2]+gh(sx,sz),๐˜ฑ[3]+sz})
end
sp={}
for ๐˜ฑ in all(w)do
add(sp,tm(๐˜ฑ))
end
col=5
fillp(โ–’)
for i=1,#faces do
df(faces[i],sp)
end
w={}
for ๐˜ฑ in all(sc)do
y=๐˜ฑ[2]z=๐˜ฑ[3]x=๐˜ฑ[1]xx=cos(rot)*x+y*sin(rot)yy=-sin(rot)*x+cos(rot)*y
add(w,{xx+sx,yy+gh(sx,sz)+.5,z+sz})
end
sp={}for ๐˜ฑ in all(w)do
add(sp,tm(๐˜ฑ))end
col=scol
fillp()for i=1,#faces do
df(faces[i],sp)
end
end
::loop::
cls()ch=gh(posx-1,posz)+4h={}l=-๐˜จ*2l+=posz/2\1*2u=l+๐˜จ*2+2
for z=l,u,2do
for x=-๐˜จ,๐˜จ,2do
add(h,{x,gh(x,z),z})end
end
if(rnd()<0.05)and#es<21then
x=rnd((๐˜จ-6)*2)-(๐˜จ-6)add(es,{x,l,max(-0.4,rnd(2)-1)})
end
tp={}for ๐˜ฑ in all(h)do
add(tp,tm(๐˜ฑ))end
for i=1,#hj do
col=8fillp()
if(i<๐˜จ*5)col=2
if(i<๐˜จ*3)col=1
if(i<๐˜จ*2)col=1fillp(โ–’)
df(hj[i],tp)end
for ๐˜ฑ in all(es)do
๐˜ฑ[2]+=๐˜ฑ[3]
ds(๐˜ฑ[1],๐˜ฑ[2],0,12)
if(๐˜ฑ[2]>u)del(es,๐˜ฑ)
if(((๐˜ฑ[1]-sx)^2+(๐˜ฑ[2]-sz)^2)<1or gh(sx,sz)>=2)goto start
end
ds(sx,sz,r,7)posz-=.5sz-=.5๐˜ณ=0
if(btn(โฌ…๏ธ))๐˜ณ=.05
if(btn(โžก๏ธ))๐˜ณ=-.05
e=๐˜ณ-r
r+=e/5posx-=r*8.3sx-=r*10.3?-posz\1,-5,-64,7
flip()goto loop

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted(+1)

very nice idea and I love the visuals. I feel that the game could become harder after a while so you would be kept on your toes

Developer

Yup, escalating difficulty (fundamentally the  speed and frequency cars come at you) is the missing ingredient but I just couldn't crunch the code down far enough to fit it in. 

Submitted (1 edit) (+1)

Nice game! The controls and movement of the ship feel very good. It looks like the typical Tron highway with rush hour traffic you find everywhere.

Submitted(+1)

Really enjoyed this! Made it to 1887.5 on the first try. So Tron!

Submitted (2 edits) (+1)

Great job on this! It looks good, but even more impressively the controls and physics are great, too!

If you have anything more you wanted to add, it does seem like there's a bit of room to cram things further, I looked over it a bit and got the byte count down to 993. ;)

Developer (1 edit) (+2)

I knew it - for someone who regularly writes tweetcarts I am strangely bad at crunching code. I strongly suspect I can take another pass at the ship drawing code and kill what is basically an entire duplicated block.

I'm really happy with the ship feel, the movement speed is directly linked to how much the ship is turned and the turn angle is governed by a proportional error based feedback controller which makes it nice and smooth and gives it the momentum/weight feel.

Anyone wanting a hard mode just needs to turn that r+=e/5 at the end into r+=e/20 for "heavy ship" mode.