Code Incomplete

codeincomplete.com · Personal blog · on HN since 2011

Jake Gordon writes about JavaScript and HTML5 game development, including a racing game, a platformer, Boulder Dash and CSS sprite packing.

What HN saysHN commenters recommend its JavaScript game write-ups, especially the pong tutorial and the Outrun-style racer, and discuss its bin-packing approach.
20HN people shared it
9linked it in comments
11stories submitted
137story points
3 years agolast shared
2011people per year2026

Most-shared posts

  1. 1
    How to build a racing game
    4 people · 114 points · first shared 2012 · 16 comments on HN
  2. 2
    How to build a racing game in JavaScript
    2 people · 4 points · first shared 2012 · 1 comments on HN
  3. 3
    Open Source JavaScript Games
    2 people · 2 points · first shared 2015 · discussion on HN
  4. 4
    Bin-Packing Algorithm for CSS Sprites
    2 people · 1 points · first shared 2022 · discussion on HN
  5. 5
    Boulder Dash in JavaScript
    1 people · 6 points · first shared 2011 · discussion on HN
  6. 6
    Rotating Tower Rendering
    1 people · 3 points · first shared 2013 · discussion on HN
  7. 7
    Software Startup Roles
    1 people · 3 points · first shared 2014 · discussion on HN
  8. 8
    Software startup roles
    1 people · 2 points · first shared 2017 · 1 comments on HN
  9. 9
  10. 10
    Javascript pong
    1 people · first shared 2019
  11. 11
    Javascript tetris
    1 people · first shared 2023
  12. 12
    Example
    1 people · first shared 2011
  13. 13
    Javascript state machine v2
    1 people · first shared 2011
  14. 14
    Javascript racer
    1 people · first shared 2021
  15. 15
    Homepage
    1 people · first shared 2012

What HN people wrote when they linked it

jakesgordon · 2012-06-25
I have purchased a few tracks from Lucky Lion studios in the past for some personal projects (http://codeincomplete.com/) and been very happy. I highly recommend them. Good luck(y lion)!
rednab · 2022-07-12
The bin packing problem is NP-hard, but rectangle packing is "merely" NP. However, most people just use a recursive biggest-fit-first ¹), a simple heuristic that is surprisingly hard to beat for most workloads. I couldn't figure out what Aseprite is doing from their website or documentation, but if it's not that then it might be worth it writing your own sprite packer. ¹) https://codeincomplete.com/articles/bin-packing/
zappo2938 · 2015-10-05
Jake Gordon at Codeincomplete.com has lots of great write ups about javascript game development. It's worth checking out. Start with the pong implementation to see the most basic parts of a game including game loop, painting to canvas, and collision detection. http://codeincomplete.com/games/
chrisco255 · 2023-05-30
Right, but efficient can mean a lot of things. Though Java was used, this game is inaccessible to Mac, iPhone, and Android users. Porting to all these platforms is inefficient compared to just using the web. It also requires a 60MB download, which is not very space efficient for a relatively simple 2D game (NES Tetris fit on a 24KB ROM). People have implemented Tetris in as little as 446 bytes [1]. Full color JS versions have been done at 16KB or less [2][3]. A JS version from 2004 came in at 1.5kb [4]. Haven't done memory efficiency analysis, but willing to bet the average JS Tetris implementation has dramatically better memory efficiency as well. [1] https://hackaday.com/2016/10/06/tetris-in-446-bytes/ [2] https://github.com/cztomczak/jstetris [3] https://codeincomplete.com/articles/javascript-tetris/ [4] https://joriszwart.nl/games/javascript-tetris-1.5kb
dataviz1000 · 2021-11-28
Here is another example of making a 3D look with 2D graphics using JavaScript from the CodeIncomplete blog building an Outrun type car racer game, https://codeincomplete.com/articles/javascript-racer/.
keeper7777 · 2019-01-27
Implementing a game loop in JavaScript (2011) [0] [0] https://codeincomplete.com/posts/javascript-pong/
tluyben2 · 2015-01-06
qohen · 2011-09-01
There are other JS FSM libraries, but I ran into this one recently, which has an online demo: The blogpost about it: http://codeincomplete.com/posts/2011/8/19/javascript_state_machine_v2/ The online demo: http://codeincomplete.com/posts/2011/8/19/javascript_state_machine_v2/…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close