
LSD – Line Square Dot Game - franze
http://lalo.li/lsd/?ultra-hard-version
======
franze
hi, OP here.

coded this game once upon a time for a viennajs (js meetup vienna) talk. added
a little bit more game logic yesterday.

homegrown physics engine (buggy as you will find out) inspired to some degree
on what i learned via [http://annotated-code.maryrosecook.com/circles-
bouncing-off-...](http://annotated-code.maryrosecook.com/circles-bouncing-off-
lines/) (saw this on HN, decided that it should be a game)

issues:

* sometimes dot gets stuck on a line (strangely this happens more on mobile phones then on desktop)

* sometimes dot vanishes (i suspect a NaN error)

* on windows phone lines can not be drawn sticky (not a clue on how to debug this on a mac)

why did i do it:

* for the love of code

* i like simple games (this is another one of my games [http://www.fullstackoptimization.com/bubbles/](http://www.fullstackoptimization.com/bubbles/) )

pull requests / forks welcome
[https://github.com/franzenzenhofer/lsd](https://github.com/franzenzenhofer/lsd)

~~~
adamboro
Hi, great idea with the Line Square Dot, though I find it enjoyable only on a
touch screen.

Your game "Bubbles" reminds me of Osmos ([http://www.osmos-
game.com/](http://www.osmos-game.com/)), has it inspired you?

~~~
franze
Osmosis + Asteroids kinda

but basically it was explorative coding: start with a circle, OK, let's move
the circle around, what's next? More circles, OK what happens if the intersect
... And so on.

~~~
ryanmcbride
It also reminds me a lot of agar.io

~~~
franze
timeline wise bubbles was first (osmosis is the great-grandfather), but as
always: ideas are in the air, forked, replicated, mutated, pivoted, and then
taken multiplayer (agar.io is genius, love it)

------
andrepd
It's funny how a game featuring literally a line, a square and a dot can make
one core in my machine go nearly 100%. Yay webapps!

EDIT: And it does not run at 60 fps.

~~~
TazeTSchnitzel
Any program that runs in an infinite loop will use 100% CPU.

~~~
GhotiFish
Stutters pretty bad on my UHD screen :(

------
matthucke
A border around the playfield would help - I keep trying to draw lines that
extend slightly outside the browser window, and inadvertently do things like
grabbing a bookmark from the bookmarks bar above.

~~~
coffeeaddicted
Yeah, that would help a lot. Also might be possible to see where the ball
comes back in a little earlier then. Another little helper would be to draw
the level-start-lines not completely up to the border. Because often you can
then still route around them all to reach otherwise unsolvable levels.

------
JimiofEden
Felt like I was mostly playing jezzball. Simply trap it in a box and keep
narrowing it down until they touch. Fun!

~~~
91bananas
My immediate reaction too, that was such an awesome game.

------
bonobo3000
polygons!

edit: got to level 10 with this approach before giving up. basically, bound
the ball into an area towards the goal as soon as it gets there by enclosing
it in a polygon. as long as you keep getting it closer, you eventually get it
into a polygon with the target - it works out. It will even pretty much
guarantee the ball eventually goes through small gaps it needs to to pass
through one polygon to another

Seems like a good explanation for how gases work.

~~~
nishparadox
I have used same strategy and is sure to work on any level because eventually
it'd just converge the ball towards the box.

~~~
jason_s
...except for the bug where the ball gets trapped in a line and pops out of an
enclosed polygon.

~~~
Natsu
Or when the box is completely surrounded by lines and your only hope to win is
a bug :)

I also try to make the box the area in my polygon with the lowest potential
energy. It seems to (mostly) obey conservation of energy, so....

------
drd93
The biggest abuse in this game is that the ball can be pushed through the
walls with enough lines drawn onto it

------
f00644
This is the best game i've ever played in my life! super addictive!

------
robbrown451
Surprisingly addictive for such a simple game. Too bad the acronym didn't
spell out "cocaine" or something.

Nice work. If you wanted to spiff it up, you might change the dot to a
basketball and the square to a hoop. And add some satisfying sounds. Bouncing
on the rim and having the net move in a plausible way would be some work for
you. :)

------
hellofunk
Forgive me but can anyone summarize how to actually play this game?

~~~
turshija
Draw lines in order to bounce a dot to square. Simple "physics" game, quite
fun actually.

------
kachnuv_ocasek
Can't wait till someone makes an AI for this.

------
lawlessone
I broke it, the ball stuck on the line

------
errozero
Cool little game, even better that it's made without a framework. Maybe you
should add a facebook opengraph image so it looks a bit more attractive when
shared.

~~~
franze
done (using a really cheap og:image image)

------
A010
Level 3 and it's impossible:

[https://i.imgur.com/OOu7rsn.png](https://i.imgur.com/OOu7rsn.png)

~~~
kittiepryde
Its very doable, you got to glitch it (strangely, I got pretty good at
glitching it through, and then I realized, my morning was gone, and I had to
go work)

~~~
johnlbevan2
I'm loving the glitches; made a bit of a rail gun by putting the ball on top
of two really close parallel lines!

------
rch
If you draw the line while intersecting the dot, the latter gets trapped on
the former.

~~~
colinramsay
The OP posted 45 minutes before you with a very polite and open message which
describe the problem you have stated and also provided a rationale for the
project AND a link to github. Why is it good form to just wade into a comment
thread and give unconstructive criticism in this circumstance? Why not just
quietly open a github issue?

~~~
rch
Fair point - I was just making an observation really.

------
atrilumen
A lovely little game with no instructions. Seems to be working out a bit
better for you than it did for me
([http://luciangames.com/oware](http://luciangames.com/oware)).

~~~
LoSboccacc
big difference in presentation: on his game page I get to play immediately, on
the page you linked I just get some static screen and links to buy

~~~
atrilumen
That's fair. It's a Unity game. I need to update that page to reflect that
it's been removed from iOS (not willing to keep paying Apple), and it's free
everywhere else.

I decided it was more valuable as a portfolio piece than as product with
abysmal sales (couldn't afford to market it; not sure if it would have helped
anyway), so I made it free.

You can play it with the Unity web plugin (I know) here:
[http://luciangames.itch.io/oware](http://luciangames.itch.io/oware).

I only posted it here because it's a game with no text whatsoever, and I found
that to be a really interesting design constraint. But maybe I'm the only one.

------
werber
This game is addictive, would be pretty cool if you went head to head with a
random person and you both were trying to get the ball into your own box.
great work!

------
thomasfoster96
Works great on my iPhone, which is a surprise. Well done!

------
enahs-sf
it's a good thing everyone will be at burning man this weekend so i can get to
higher levels before they do :)

------
edem
Do I need to be on LSD to enjoy this? :)

------
vblord
very fun game. thanks for sharing. I like when it gets caught on the line and
bounces back and forth

------
verytrivial
Fun! What about a limit of N lines, e.g. oldest removed first (maybe color-
coded by age?)?

------
profinger
I love it! Interestingly enough though, the ball goes through line
intersections.

------
dgerges
Very fun :-) thank you

------
willthefirst
really great. so simple but immediately entertaining.

------
calebm
Surprisingly fun :)

------
el3ctron
this game is my perdition!! hahhaha

