Skip to main content

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

close to lineView game page

move cursor close to line
Submitted by IcyLava (@icylava_) — 4 days, 15 hours before the deadline
Add to collection

Play game

close to line's itch.io page

How many characters of code did you use?
500

Include your code here, if you'd like to show it off!
V=require'v'
L=love
G=L.graphics
M=math
s=M.sin
p=0
T=L.timer
U=T.getTime
S=U!
L.window.setTitle'close to line'
G.setNewFont 24
L.draw=->
t=U!
G.clear.3,.1,.2
G.setLineWidth 8
G.setColor.1,.5,.7
G.print 'score: '..(p-p%1)
return if t-S>15
x=400+400*s t+2*s t+3*s t
y=300+300*s t+3*s t+5*s t
X=400+400*s t+4*s t+4*s t
Y=300+300*s t+3*s t+2*s t
o=V x-X,y-Y
o.length=1e4
G.line x+o.x,y+o.y,x-o.x,y-o.y
d=1e-4*V -o.y,o.x
p+=T.getDelta!*M.max 0,200-M.abs d\dot V(x,y)-V L.mouse.getPosition!

Leave a comment

Log in with itch.io to leave a comment.

Comments

Developer
Include your code here, if you'd like to show it off!

^ Unfortunately this part doesn't show the indentation. The lines of the draw function should be indented as Moonscript is a whitespace significant language.

You can see it better on GitHub though