HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Making Metagun

Nizzotch · Youtube · 335 HN points · 6 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Nizzotch's video "Making Metagun".
Youtube Summary
This is a timelapse of me making Metagun, a game for Ludum Dare 18.
You can play the game here: http://www.mojang.com/compo/metagun/
The song is called Battery, and was made by me some nine years ago.

The game was all made within 48 hours (from scratch). If you liked this video, there's a whole bunch more timelapse videos from people participating in the same competition here: http://www.youtube.com/view_play_list?p=E8DC350F18C043D5&sort_field=original&page=1
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
First, congratulations!

I would demystify the process of creation. Show them your wireframes, your pencil sketches, talk about the business v. creative push and pull. Make it interactive - break them into groups of 2-3 each for 5 min and show them Notch's time-lapse in the background on projector while you have them work on exercises in ideation - what would their game be? what would the levels, characters, and challenges be. They don't have to present - just get them comfortable with the first step of creation - putting it on 'scratch' paper.

If you have time, deconstruct Flappy Bird. The scrolling left to right background v. making the bird move. How the object detection is greatly simplified when you have only one coordinate to detect (y-bird and y-pipeTop/y-pipeBottom). How adding gravity to the bird (downward velocity) allows you to fly the bird.

"Making Metagun" by Notch https://www.youtube.com/watch?v=ZV-AFnCkRLY

"Creating Prelude of the Chambered" by Notch https://www.youtube.com/watch?v=KcfFJ6pNEZk

Notch's Ludum Dare video for Metagun (https://www.youtube.com/watch?v=ZV-AFnCkRLY) was inspiration for a series of scripts I now use for clients and my own entertainment purposes (for some loose definition of "entertainment").

It's a series of shell scripts I use that screencap videos of coding and set them to music (so, for example, rendering a 48-hour coding competition to a 5-minute song, or as I more typically do for clients, render the development process down to a few minutes for them to watch in fast-time how their development was done).

It's called watchmecode (https://github.com/choptastic/watchmecode) and I just have to do

  ./make-av-video.sh /path/to/video.mpg /path/to/song.mp3
And it does the rest, and outputs it to "done.mp4"

The result is something that looks like this: https://www.youtube.com/watch?v=Hwn7mfmo0SQ

(disclaimer, I've plugged this before on HN: https://news.ycombinator.com/item?id=5685859)

nacs
Chronolapse can do this on Windows for those looking for an alternative: https://code.google.com/p/chronolapse/
Watching `notch` live-code is also very popular.

[1]: http://www.youtube.com/watch?v=ZV-AFnCkRLY Making Metagun

[2]: http://www.youtube.com/watch?v=MhQ70O1MiXc Making MiniCraft

[3]: http://notch.tumblr.com/

Well, it’s a bit too early, isn’t it? Here’s a time-lapse from a year ago: http://www.youtube.com/watch?v=ZV-AFnCkRLY
Jun 10, 2011 · wallflower on Facebook Acquires Sofa
If you haven't seen this one of Notch, it is pretty inspiring:

http://www.youtube.com/watch?v=ZV-AFnCkRLY

http://news.ycombinator.com/item?id=1629810

So basically, premature optimization sucks. Don't search for a solution of a problem that doesn't exist. If you spend lots of time writing the same code: optimize that. If you dont do that, dont optimize it. I think lots of people belive that its some kind of magic that made Sergey, Larry and all the other successful programmers successful.

http://www.youtube.com/watch?v=ZV-AFnCkRLY <-- There you got productivity by Notch (Minecraft creator for those who dont know). Its like three seconds of twitter, 30 minutes for food and some sleep, for a total of 48h. Actually that makes me take back the idea of the magical thing, since the magic seems to be complete dedication to the task you are supposed to do.

Aug 24, 2010 · 335 points, 75 comments · submitted by SandB0x
Luc
This is a great portfolio idea, actually! The guy doing this is a pro, but this is within reach of people just starting in the business. Someone straight out of college applying as junior programmer with a video like this would move to the top of my pile (were I hiring, which I'm not).

This video shows off a sense of initiative, a love of games, talent, and a knack for getting things done under time pressure. Nice!

kd5bjo
You can play his game from http://www.ludumdare.com/compo/ludum-dare-18/?action=preview...

172 people each wrote a complete game last weekend, and you can play all of them from http://www.ludumdare.com/compo/ludum-dare-18/?action=preview... .

ugh
That game is from the Minecraft guy [1], here is his blogpost [2].

[1] http://www.minecraft.net/

[2] http://notch.tumblr.com/post/998637682/minecraft-alpha-v1-0-...

daychilde
I just wanted to present a warning about Minecraft: That game is distilled binary crack. I have lost a couple of entire days to the damned thing, and I only purchased it a couple of weeks ago.

So just be careful if you try it out.

I'm a recovering Minecraftoholic.

None
None
traskjd
Off topic, but I also purchased it and just don't get it. Or is that part of the appeal? I can't decide since I do spend time with it but more trying to work out wtf I'm meant to do :-)
daychilde
If you're not meeting any monsters, check in the options and change from "Peaceful" to another mode.

Beyond that - there aren't really any goals. It's a huge sandbox. However, there may be some depth you're missing:

- There are some 'toys' to play with - minetrains, for one. You can build tracks and minecarts - unpowered and powered.

- If you dig deep enough, you can get redstone, which can be used to simulate electrical circuits. There's a whole thread on the Minecraft forum with basic constructs like OR / AND / XOR / etc - people have built things as complex as a twelve-hour clock (although it doesn't keep time accurately because there's no way to synch time - but it is as close as could be made and does function in the sense that it accurately counts 60 seconds, 60 minutes, twelve hours...) - I also saw a turing machine being worked on, as well as a few other similar devices. VERY complex stuff, considering.

- People have developed cannons

The more basic activities include finding caves and exploring them...

But there's some great silly stuff - like you can make a saddle and go ride pigs.

Is any of that stuff you've missed that sounds interesting? I hope so.

I suppose it's a game that might appeal more to younger folks - but as a 35-year-old, I love it. But I always loved SimCity, Simutrans (a freeware transportation simulator. Disclaimer: I'm the "Benevolent Dictator" of the International forum, and provide much of the hosting)... I also played GTA:SA, but not really the official missions - I just drove around and made it my own sandbox... Flight simulators...

All in all, I don't so much like games as I do simulated environments... so Minecraft is right up my alley.

10ren
Source code: http://www.mojang.com/compo/metagun/metagun-source.zip (linked from http://www.ludumdare.com/compo/ludum-dare-18/?action=preview...)

I compiled (yucky) with (after unzip + mkdir build):

    javac -cp build src/com/mojang/metagun/{entity,level,screen,}/*.java -d build/
    cp {src,build}/com/mojang/metagun/screen/exposition.txt 
    jar -cf app.jar -C build . -C res .
You need some html to run an applet; App.html just needs this:

    <applet code="com.mojang.metagun.Metagun" archive="app.jar" height="480" width="640"></applet>
Run with:

      appletviewer App.html
New to me (but probably standard to game writers) is: using a png to represent all the maps combined (like 10x10 maps), with each pixel's color representing a game tile type (eg. yellow for oil drum, purple for portal cube, red for spikes, green for signs etc). This representation is really cool, because it looks like what it represents (an isomorphism): you can "see" the level in a png editor, even though what you're seeing is not the actual level.

Another aspect of how the data representation drives the game, is that there are no explicit arcs between game screens - instead, the screen design allows your character to walk off-screen, then that point enables you to transition to the next screen. I guess it's the most obvious way to do it: it's as if you are zoomed into a particular section of the 10x10 maps, and then you can move to adjacent maps. Maybe it's just that I've spent too much time with nodes and arcs recently :-), expecting logical concepts to be explicitly specified, instead of implied by the design. Anyway, there is no sequential index to get to a particular screen; you have to follow the path. Or you can look at that png. eg, the final boss screen is at xLevel=3, yLevel=10 (you can initialize those values in GameScreen.java; and you need to change the player start location too, because now it's not derived from the previous screen: change the last two args in the following new Level line, from 0,0 to 10,10).

Ogre
I've seen the bitmap to level trick used before, but most "normal" (not developed under severe time constraints) games would eventually have a level editor implemented alongside the game. Personally, I'd be more likely in this situation to implement it as a text file and edit it with emacs picture-mode.

I've also heard of some bitmap-as-data atrocities. A colleague who worked with an engine from a certain well known single player RPG described how bitmaps were used in that engine to control animation states. Like, if walking and getting hit, which animation takes priority. There are as many ways to implement that system as there are game developers. For some reason this developer elected to store those matrices as BMP files, and edit them using a paint program.

The bitmap as level trick is a great shortcut for prototyping and rapid development, perfect for this contest. But I can't imagine the thought process that led to using one for animation data.

10ren
emacs picture-mode would be handy, otherwise it's difficult to maintain fixed-width. In practice, I have a lot of trouble with it. I think huge maps (those 10x10 ones) could be a problem, simply due to size; paint programs have zoom as standard, and of course the natural size for a pixel is pixel-size. Though I'm certain emacs has arbitrary zoom-mode.

At least he was using a data-driven approach. There's a lot to be said for that (as opposed to coding it), provided you can find a good representation. As Brooks ~ said "show me your flowcharts and I will continue to be mystified; but show me your tables and all will be clear." He's talking about communicating it to another, but a (appropriate...) data-driven approach is also more flexible, simpler and easier to reason about, because it embodies an abstraction and isomorphism of the solution space. Of course, if it turns out insufficiently rich, you'll wish it was code (or at least that it can be supplemented with code.)

TeMPOraL
A year ago, when I was developing a retro Pacman for cellphones (J2ME) as a university project, I decided to use a text file to store maps. It was before I knew about emacs picture-mode, and I was working on Windows, so I actually used MS Excel for the job.

You resize the cells to make them square, insert a formula that will rewrite all cells from a given row into a single string (so you could then just copy a column with those strings and paste directly into Notepad, or something), and then you can use convenient navigation with arrows, tab and ENTER to create the map (also filling entire row or column by one mouse drag was handy). Moreover, if you add "conditional formatting", you can make all different tiles appear with different colors and font styles (like walls with dark background or pickups colored in gold, green, etc.). It's a 2-minutes-to-do, poor's man map editor for tileset-based games :).

dstein
Clearly I spend way too much time switching between my code and mindlessly browsing the internet.
nostromo
I was going to comment here, but I should get back to coding...
Gimpson
I think that watching a five minute video like this of my day before I went home would be more motivating than reviewing my Rescue Time statistics.
natep
As 'erik' pointed out, there is already an open source program for this. I'll be installing this tomorrow to check it out.

http://news.ycombinator.com/item?id=1630247

mitchellhislop
How about watching this with a rescuetime output on it (so, watching what you are doing and a scoreboard of rescue time for that snapshot of time)?

That would really lead to me kicking my own ass more for productivity

raquo
^^^ Free startup idea
paraschopra
I'm pretty sure someone's on it by now. This definitely looks like a killer idea.
joshu
That's not "a" video games programmer. That's Notch.
daten
If you're like me and still have no idea who "Notch" is.. http://www.mojang.com/notch/
pcestrada
Can anyone discern what tools he was using? I know the IDE was Eclipse. And Paint.net for the artowrk. He had something really cool for the sound effects, but I couldn't tell what it was. It's a fun little game with some neat ideas: http://www.mojang.com/compo/metagun/
thibaut_barrere
> He had something really cool for the sound effects, but I couldn't tell what it was

It's sfxr: http://www.drpetter.se/project_sfxr.html

paulitex
He really did that all without a search engine or looking at any API docs?? Maybe it's just cause I'm not a games programmer, but that's insane. How does he know what he's programming to?
zephjc
As someone else pointed out, the programmer is Notch, the guy behind Minecraft, which is also written in Java, so I assume he has been neck-deep in the Java graphics APIs long enough to have enough of it memorized.
Gormo
Was he even using any APIs other than audio and basic graphics and keyboard/mouse IO functions?

It's still pretty impressive if he implemented his own sprite class from scratch and built a game with it in 48 hours.

mcgraw
Experience. Code with an API long enough and you're pretty aware of the tools at your disposal. At this point you're not learning new stuff. Finally, this likely pales in comparison to what he is typically used to doing.
icey
Eclipse has autocomplete and documentation built in as well, right?
mcgraw
Autocomplete is there. Also you have the ability to create your own micros that you can use to build skeletons (like a function, or a loop). I'm not sure about itegrated docs. You'll probably get a brief pop-up (hit-or-miss), but nothing like XCode's inline docs.
ckuehne
FYI: Docs are fully integrated and appear for example together when moving through the list of autocomplete suggestions. Very similar to XCode's inline docs. Alternatively, you can press Ctrl and every function call, class definition and so on becomes a link to the source code defintion of that function or class, respectively. Such are manifold possibilies for tool support in statically typed languages.
albertzeyer
I seem to miss such contests most of the time and only hear about them when they ended. I would love to attend to some, just for the fun (because I don't know if I would have any chance to actually win).

Where would be a good source for such competitions?

Another fun competition I read about was the Super Mario AI competition in 2009 where the winner has succeeded with an A* algorithm which he presented in a nice video: http://www.youtube.com/watch?v=DlkMs4ZHHr8

The 2010 Mario AI championship also seems to be over already.

Another fun competition I have heard about is the International Obfuscated C Code Contest. However, while reading this is very interesting and quite fun, I am not sure if I would have fun to do this myself. (Somehow I am more focused on the output/result of the code and I like to have clean, elegant and intelligent code, as less obfuscated as possible. :))

albertzeyer
I started to collect some links here:

http://stackoverflow.com/questions/3561301/overview-and-news...

joeld42
There is a gamecomp mailing list that sends out announcements of the LD contests. It is extremely low-traffic, basically only compo announcements (thrice yearly):

visit this to subscribe. http://www.gamecompo.com/mailing-list/

The TIGSource "Competitions" forum is a great resource. http://forums.tigsource.com/

They host the occasional compo there, and they usually have a thread mentioning most other compos before or as they occur.

ps. I participate in some of these under the name 'jovoc'.

arohner
Has anyone tried the game? It's almost completely unplayable. I get about ~1 FPS. (OSX 10.6, Chrome)

EDIT: appears to work fine in FF

albertzeyer
Exactly the same here.
pmb
It's a chrome bug. Or a Chrome/Java/OSX combo bug. The game plays fine in Safari or FF.
bd
Works very smooth for me (Win 7, Firefox 3.6.8).

  <rant>
As a sidenote, this difference of experience highlights a big problem with rich web applications.

You get so high variance in performance depending on a particular combination of hardware, OS and browser that you are virtually predestined to fail hard for some non-negligible part of your userbase (unless your application is so trivial that even on the worst possible platform it would still work ok).

I know, this problem existed with classical games all the time. But there, gamers pretty much came to terms with "hardware requirements" (needed to play the game at all).

With web, expectations are for some reason different. It used to be quite expected and acceptable to buy new GPU/CPU/RAM to play a particular desktop game, yet it seems like too much work just to fire a different browser and copy & paste URL. I know I'm guilty of this myself, despite being developer and regularly working simultaneously with multiple browsers.

And it's just going to get worse as performance spread will widen, both on low-end (more people accessing web through mobile devices) and on high-end (as HW acceleration slowly comes to new generation of browsers).

  </rant>
necubi
Except that this isn't a rich web application--this is a java applet.
bd
Even more so then. No matter which solution you pick for "rich web" experience (Java, Flash, HTML5, Unity), somebody is going to get subpar performance.

Also, Java applets are canonical example of RIA:

http://en.wikipedia.org/wiki/Rich_Internet_application

orph
Time lapse for his 2009 entry, Bunny Press: http://www.youtube.com/watch?v=abyL33Z6Z5I
TheEzEzz
Awesome. I'd love to see a meatspace time lapse on the side, or in a small box-in-box.
ScotterC
This has inspired me to do screen lapses of myself working at home. Get some feedback on my own working style and get data on my methods and goofing off.
DrewHintz
http://www.smbc-comics.com/index.php?db=comics&id=1898
kgo
Am I the only one who thought this was going to be like those Meth PSAs? Where we see how the programmer's physical condition decays?
salemh
I thought so as well.
est
see also: Flash programmer in 48h

http://www.youtube.com/watch?v=LKtZNylG74M

albemuth
I admire the guy's focus, he checks twitter once for like a minute and goes back to work
maukdaddy
I love the pauses to blog and tweet about the game. And not a single glance at HN?
grizzydot
The main takeaway for me is don't get into long coding sessions. Test often.
amih
I really admire this achievement in such a short time. I should study the source code and learn from this. Soon I will resign from work to start bootstrapping my business and will take a look at the source code.
palish
What program did he use to record himself programming?
None
None
ajuc
That's what I need to not procrastinate when doing my game - record myself.
b0b0b0b
he has a multimonitor setup
Aetius
What software is good for time lapse recording on Windows?
swah
I wonder if he gets into editor wars online. Heh.
binarysoul
This is an interesting idea.
MartinCron
Here we have one of those multi-talented programmers I keep talking about. The same programmer did the code, high-quality sprite illustration, and even the music to the youtube video (which was pretty good, and matched the nature of the time lapse video).

I am inspired by this. I'm going to do this the next time I work on a game. Has anyone used time-lapse screencap software they can suggest?

bryanh
If you are Mac/Unix you can use cron every minute and screencapture/scrot...
None
None
jianshen
It looks like he used livestream.com's Procaster to broadcast the 48hr marathon and then sped up the output later on. http://www.livestream.com/platform/procaster
clistctrl
To me the really impressive part is his ability to stay attentive. He never strayed away, starting surfing the web etc.
MartinCron
I was impressed by that too, although I did see a quick twitter check in there at least once.

I'm sure I would do my best to appear attentive when working on something like this, limiting my twitter/facebook/hn browsing to my iPhone/iPod/laptop.

Tichy
Or maybe he has Twitter on another screen :-)
sprout
I don't think I would undertake a 48h programming contest with a single screen.
sciolistse
Yeah, he has 3 monitors and a Cintiq.. http://www.ludumdare.com/compo/2010/08/21/getting-started-he...
studer
And the Cintiq is a screen as well, so plenty of screen space there.

Here's the sound effect program he was using, btw:

http://www.drpetter.se/project_sfxr.html

carussell
I did see a quick twitter check in there

He posted about development progress.

rev087
He also posted a screenshot in a Wordpress blog.
csytan
In the reddit thread about this, someone mentioned that he had multiple monitors set up, so maybe there was a bit of straying we didn't see :) Nonetheless, I found it very impressive.
benologist
Yeah I'd really have to be disconnected to pull that off heh.
est
Because it's for a 48h coding competition

http://www.ludumdare.com/

bd
Fascinating, it's amazing what people can do under severe constraints.

I just finished my second JS10K entry (also a game, but much simpler) in about the same total time (though spread over more days).

I found the hardest part was to balance playability of the game. I played it so many times while developing it that what was easy for me turned out to be very difficult for others.

jacquesm
Having an endless supply of 'virgins' around is a staple ingredient of game development.
bd
Now you made me blush.

At least with such short competitions your involvement is limited. Constraints work both ways: deadlines are liberating when they pass.

jacquesm
There is a Billy Connolly joke in here somewhere ;)
erik
> Has anyone used time-lapse screencap software they can suggest?

A LD48 regular created chronolapse for this purpose.

http://keeyai.com/projects-and-releases/chronolapse/

nutmeg
I'll second chronolapse. I've used it for reviewing my productivity at the end of a day.
ElbertF
Oh that is way to confronting.
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.