
The Making of Underrun – A WebGL Shooter in 13kb of JavaScript - phoboslab
https://phoboslab.org/log/2018/09/underrun-making-of
======
marijn
Awesome to see the stupid trick to abbreviate object properties that I came up
with in 2010 [1] is still a living part of the mini JS demo scene.

[1]: [http://marijnhaverbeke.nl/js1k/](http://marijnhaverbeke.nl/js1k/)

~~~
vanderZwan
> the _stupid_ trick

Funny how "stupid" can be interpreted in multiple ways here. One entirely
appropriate, the other very much not so. I certainly am not smart enough come
up with a trick like that!

~~~
make3
don't sell yourself short stranger

------
wgx
Also from the same year of the contest, Wander[0] is a 3D explorable world
complete with grappling hook and save points!

[0]
[https://js13kgames.com/entries/wander](https://js13kgames.com/entries/wander)

~~~
hipjiveguy
wander is awesome - i spent over an hour playing this great game... very nice!

------
pjc50
Reminds me of 64k shooter kkreiger:
[https://en.wikipedia.org/wiki/.kkrieger](https://en.wikipedia.org/wiki/.kkrieger)

This one is a hybrid with some predefined (tiny!) assets and some procedural
generation (instruments, texture placement).

~~~
onion2k
kkreiger was by Farbrausch who make some of the most incredible demos out
there eg Quantum Mysterium from last year -
[https://www.youtube.com/watch?v=DAyQeX8a-Bw](https://www.youtube.com/watch?v=DAyQeX8a-Bw)
\- that's done in 48Kb of code.

~~~
vardump
A recent 8 kB intro "One Of Those Days" by Loonies is pretty funny and
impressive:
[https://www.youtube.com/watch?v=fp0t2jCMGZE](https://www.youtube.com/watch?v=fp0t2jCMGZE)

~~~
dschep
That's so awesome! Especially because it's inspired by Candide Thovex's One of
those days. Link for those who aren't familiar(he also used CGI for some of
the things that would be super dangerous, he skied the line, but people
weren't actually there):
[https://www.youtube.com/watch?v=ygxufRprWpY](https://www.youtube.com/watch?v=ygxufRprWpY)

~~~
vardump
Also a parody of
[https://www.youtube.com/watch?v=jB0vBmiTr6o](https://www.youtube.com/watch?v=jB0vBmiTr6o)

And probably there are more things it parodies.

------
bArray
Good game, but unfortunately I was able to get stuck on an edge. Player's
upper left edge caught on wall's lower right corner. Perhaps the problem is in
the collision checking:
[https://github.com/phoboslab/underrun/blob/master/source/ent...](https://github.com/phoboslab/underrun/blob/master/source/entity.js#L32)

If there's a collision in _either_ X or Z, both should be rolled back to their
last positions. I think there is possibly an edge case hidden in there
otherwise.

P.S. Nice code by the way.

~~~
phoboslab
Should be fixed with
[https://github.com/phoboslab/underrun/commit/2477c5a45f5be4d...](https://github.com/phoboslab/underrun/commit/2477c5a45f5be4db10be21f7afb37b32600b67f1)

Rolling back X _and_ Z when any collision occurs would prevent you from
"hugging" (i.e. sliding along) walls. The problem was that a near corner
collision wasn't correctly detected when the player didn't collide in X
direction in the last frame (last_x) but does collide in the current frame
(t.x), allowing the player to move into the corner in Y direction.

Thanks!

------
kowdermeister
Incredible casual game in 13k, fun to play, looks lovely, challenging enough
and runs smoothly on 4k full screen.

Congrats.

------
Jyaif
Fantastic project!

A fun alternative for the players model that also takes little space is to
slice up the model into horizontal layers. See
[http://www.like100bears.com/writing/2d-3d-in-gamemaker-
studi...](http://www.like100bears.com/writing/2d-3d-in-gamemaker-studio) for
example.

------
ArtWomb
>>> The game never needs to rotate any geometry

Fixed geometry was the first thing I noticed ;)

Could probably even increase level size manyfold and would still run quite
smoothly. For large generated mazes. With this phenomenal skin-crawling sound
design. Would make a very immersive "escape" labyrinth game!

------
ungzd
I love the idea of low resolution of "virtual screen", moreover it's reduced
to 256 colors! It allows to use low-resolution textures, simple cubes and
"billboard" sprites. I think this idea can be useful not only in demoscene,
but in commercial indie games too. Usually indie developers avoid 3D
altogether, not because of complexity of 3d engines, but because of complexity
of 3d assets. With low-res "screen" you can hand-draw small textures, use
sprites instead of 3d models, use rough 3d models and so on, so you can build
a game without having large team of artists.

~~~
lotyrin
Games seeking this property of low-cost art through pixelated graphics
generally choose not to have a retro virtual screen though - which frees them
to have different pixel sizes between different parts of the UI, place things
precisely (even sub-actual-pixel positions!). I'd prefer they didn't do those
things, but I'd also rather have these games get made than not get made.

------
nergal
Nice :)

But I kinda hate you right now, because now you inspired me to develop games
in 3D again, just when I'm in the making of 2D pixel-game ;)

(Love the retro-3D feeling, very good work!)

------
wanderfowl
This is amazing, both in process and in result. Very well done, and a pleasant
reminder that great things can come in small filesizes.

------
markatkinson
Wow this is phenomenal.

------
bluedino
Very cool. Has a guantlet vibe

------
billybolton
I wonder if this could be brought to the web in 97kb
[https://en.wikipedia.org/wiki/.kkrieger](https://en.wikipedia.org/wiki/.kkrieger)

------
hessenwolf
Really good writing style. So much info in such short, simple sentences.

------
AnnoyingSwede
Amazing work.. Love the lightsource following the projectile. Was the large
pixels a compromize to keep the fps up? Anyway, amazing what you can do with
13k!

------
lsiebert
Hmm.. Seems to freeze on Chrome for me after the click to initiate deployment,
and the console shows a javascript error.

------
mscasts
Wow this is one of the cooler projects I have seen for that little amount of
code.

------
dddw
nice game, beautiful audio... this guy helped with that [http://no-
fate.net/](http://no-fate.net/)

------
mirages
I wish for non qwerty support. Otherwise its genius

~~~
11235813213455
I just needed directional keys + mouse clicks

------
O_H_E
Nice Game & Code. Keep the great work up

------
pjmlp
Love it, the audio is great.

------
Joyfield
kb != kB

------
hoppelhase
Why is your post about your Coinhive authorship [0] gone?

[0]: [https://phoboslab.org/log/2018/03/about-
coinhive](https://phoboslab.org/log/2018/03/about-coinhive)

