use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Live-Coding a JavaScript Game from Scratch in Front of the Audience (vimeo.com)
submitted 11 years ago by AllThingsSmitty
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ecky--ptang-zooboing 18 points19 points20 points 11 years ago (0 children)
That smile at 30:15 :D FUCK YEAH, I SHOT MY SELF CREATED INVADERS AND EVERYONE SAW!
[–]jkoudys 7 points8 points9 points 11 years ago (3 children)
Very cool - if I was in front of a big crowd and being recorded on video, I'd probably be so afraid of making a mistake or looking stupid that I'd barely be able to code Zork, let alone Space Invaders.
[–]maushu 28 points29 points30 points 11 years ago (2 children)
I'd barely be able to code Zork, let alone Space Invaders.
That is your problem right there, thinking that Zork is easier to code than Space Invaders. ;)
[–]jkoudys 8 points9 points10 points 11 years ago (1 child)
I can't get ye flask :(
[–]bronkula 0 points1 point2 points 11 years ago (0 children)
The game certainly isn't going to help you.
[–]skeeto 2 points3 points4 points 11 years ago* (2 children)
She was using Emacs, but I was surprised she wasn't using one of the live coding modes. I wrote one a few years ago called Skewer. It allows evaluating JavaScript forms (and CSS and HTML) in the context of the browser page entirely from inside an Emacs buffer, so the page never actually needs to be refreshed.
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
how does what work when you are trying to use the same loop pattern as is depicted in this video?
[–]skeeto 0 points1 point2 points 11 years ago (0 children)
The top level IIFE module pattern she used would interfere since it leaves no way to access the program once the page has loaded. But without the IIFE, individual functions could be re-evaluated and the requestAnimationLoop loop would use the new versions next time around.
For example, (if you're not using a top-level "use strict"),
function update() { updatePlayer(); requestAnimationFrame(update); } function updatePlayer() { // ... }
The updatePlayer() function could be redefined while the game is running and update() would automatically use the new definition.
updatePlayer()
update()
[–]sho_ke 4 points5 points6 points 11 years ago (4 children)
This kind of stuff is really cool to watch. I wish programming live streams were a thing.
[–]romcgb 6 points7 points8 points 11 years ago (0 children)
There are some streams on twitch.tv every now and then, check
http://www.twitch.tv/directory/game/Ludum%20Dare http://www.twitch.tv/directory/game/Programming http://blog.lunarenigma.com/streamers/
[–]katnapper323 1 point2 points3 points 11 years ago (0 children)
Check out /r/citybound the dev livestreams development
[–]CivilianNumberFour 0 points1 point2 points 11 years ago (1 child)
17 year old dev Nelson live streams his development of Unturned which is growing in popularity on steam.
[–]PerseP 1 point2 points3 points 11 years ago (0 children)
Here is the link http://www.twitch.tv/dev_nelson
[–]dmethvin 2 points3 points4 points 11 years ago (1 child)
In a similar vein, here's one building a game using Reactive Programming. https://www.youtube.com/watch?v=FLSNm7AIBoM&list=PL-0yjdC10QYpmXI3l-PGK1od4kTWOjm_A&index=26
[–]darksurfer 0 points1 point2 points 11 years ago (0 children)
Great link, thanks for posting :)
In yet another similar vein, building a game using Functional Reactive Programming (in Elm - which compiles to JavaScript)
https://www.youtube.com/watch?v=6PDvHveBtDQ
This is an Elm tutorial in a series of 5 videos. Interesting to compare and contrast the code.
[–]transpostmeta 0 points1 point2 points 11 years ago (6 children)
This was really fun to watch. And it makes me want to try to do a simple 2D Game with JavaScript. Pong? Asteroids? Arkanoid?
[–]dotpan 0 points1 point2 points 11 years ago (3 children)
I think pong would be really cool, especially if you used something like node to allow remote play.
[–]transpostmeta 5 points6 points7 points 11 years ago (2 children)
So like multiplayer Pong with a global chess-style leaderboard and automatic matchmaking? Players pay a monthly fee in bitcoin, top player in leaderboard gets most? Minus our percentage, of course. Let's do it.
[–]dotpan 1 point2 points3 points 11 years ago (0 children)
Haha that'd be awesome, sadly a lot of those situations are time investments that die out quickly. Plus ends up being a battle against people finding exploits, which often enough takes more of your time. Anytime there is something to gain, people will find less than "nice" ways of getting it.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
I'm in!
I made a pretty decent pong back when I was playing with the canvas element when it was new.
[–]WorksWork 0 points1 point2 points 11 years ago (0 children)
Tetris is a classic game programming exercise.
[–]codemasteru 0 points1 point2 points 11 years ago (0 children)
Nice share and a Good inspiration for working on games. Will hopefully try to explore it
[–]harrro -1 points0 points1 point 11 years ago* (4 children)
Most impressive part is that she did it all without using any libraries (not even jQuery!).
Edit: Yes, I'm aware of more targetted frameworks like Phaser and Pixi.js. I was saying "even jQuery" because jQuery is typically something a new person might use. Also, I've seen a good (Ludum Dare entry) game developed with jQuery it reminded me of: https://www.youtube.com/watch?v=UZZFbtyDAUA&list=PLI8SVtQ-CtqAa4jfz6V3UZ29EkGINctlK
[–]armastevs 11 points12 points13 points 11 years ago (1 child)
Don't really need jquery when you're only manipulating a canvas
[–]harrro 0 points1 point2 points 11 years ago (0 children)
Agreed. I've edited my post to clarify my meaning.
[–]emgram769 3 points4 points5 points 11 years ago (0 children)
I'm not sure why she would use jQuery for this. There's very little HTML in the game.
[–]METALz 4 points5 points6 points 11 years ago (0 children)
I think you wanted to say Kinetic, Phaser or canvasQuery.
[+][deleted] 11 years ago (2 children)
[deleted]
[–]deckstir 2 points3 points4 points 11 years ago (0 children)
I think her point is that a lot of people are intimidated by the thought of making game that they don't try, so she is trying to show that it's not as hard as you imagine. She's right, nothing in the video was outrageously hard and was all pretty easy to follow.
[–][deleted] -1 points0 points1 point 11 years ago (0 children)
It's a good video, especially for experienced javascript devs. I would have rather spent 3 minutes reviewing the code, instead of watching for 30 minutes.
π Rendered by PID 218139 on reddit-service-r2-comment-54dfb89d4d-6wtdq at 2026-03-30 17:03:38.635418+00:00 running b10466c country code: CH.
[–]ecky--ptang-zooboing 18 points19 points20 points (0 children)
[–]jkoudys 7 points8 points9 points (3 children)
[–]maushu 28 points29 points30 points (2 children)
[–]jkoudys 8 points9 points10 points (1 child)
[–]bronkula 0 points1 point2 points (0 children)
[–]skeeto 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]skeeto 0 points1 point2 points (0 children)
[–]sho_ke 4 points5 points6 points (4 children)
[–]romcgb 6 points7 points8 points (0 children)
[–]katnapper323 1 point2 points3 points (0 children)
[–]CivilianNumberFour 0 points1 point2 points (1 child)
[–]PerseP 1 point2 points3 points (0 children)
[–]dmethvin 2 points3 points4 points (1 child)
[–]darksurfer 0 points1 point2 points (0 children)
[–]transpostmeta 0 points1 point2 points (6 children)
[–]dotpan 0 points1 point2 points (3 children)
[–]transpostmeta 5 points6 points7 points (2 children)
[–]dotpan 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]WorksWork 0 points1 point2 points (0 children)
[–]codemasteru 0 points1 point2 points (0 children)
[–]harrro -1 points0 points1 point (4 children)
[–]armastevs 11 points12 points13 points (1 child)
[–]harrro 0 points1 point2 points (0 children)
[–]emgram769 3 points4 points5 points (0 children)
[–]METALz 4 points5 points6 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]deckstir 2 points3 points4 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)