

2048 game to the Atari 2600 VCS - postit
https://github.com/chesterbr/2048-2600

======
jasonkester
Wow, programming in Assembly is so much easier now than it was then. Imagine
the luxury of having _source files_ that you could modify in a _text editor_.
Joy.

I remember my first LDA's on the Commodore 64, directly in the console, having
to assign a memory location to each and every line as you went along, and woe
unto you if you didn't NOP yourself out enough extra space from time to time
to be able to insert code (or at least JMPs) as you added features. I'm not
complaining, mind you. At least we had 3 letter codes we could use for
instructions instead of having to memorize hex codes for everything.

But yeah, even a simple assembler that handled the line numbers for you would
have made me the happiest 13 year old around.

~~~
chesterbr
I get your point, but I must say that the Apple II had LISA
([http://en.wikipedia.org/wiki/Lazer%27s_Interactive_Symbolic_...](http://en.wikipedia.org/wiki/Lazer%27s_Interactive_Symbolic_Assembler)),
which wasn't half bad for the machine - guess I was a luckier 13 year old,
because I happened to have stumbled upon a copy :-)

Also, developers who had a bit more of resources (e.g., minicomputers) even
used them to emulate 8-bit systems (unlikely to have been done for the Atari,
due to the complexity of TIA, but a textbook case is how Bill Gates and Paul
Allen developed the Altair Basic using Allen's 8080 emulator for the PDP-10:
[http://en.wikipedia.org/wiki/Altair_BASIC](http://en.wikipedia.org/wiki/Altair_BASIC)).

------
unwiredben
Very impressive, I'd been thinking of something similar.

In playing it in Stella, I frequently get into a "no move" situation where the
grid looks like

    
    
      2   8   16    2
      4 128    2    4
     16  64    8    8
      4  16    4    _
    

Based on this config, I should be able to move right to collapse the two 8s,
but no input it being allowed. I suspect it's a bug in the "NEW RANDOM TILE"
code not allowing that last cell to be selected for a new item, since in the
Stella debugger, memory at A8 is stuck with value 3.

Update:
[https://github.com/chesterbr/2048-2600/pull/2](https://github.com/chesterbr/2048-2600/pull/2)

~~~
chesterbr
Awesome, thanks for the (impressively quick) fix! Already merged and built
into the repo binary.

------
mambodog
For anyone who wants to try it out in their browser:
[http://jamesfriend.com.au/2600/2048/](http://jamesfriend.com.au/2600/2048/)

(give it time to load, there's about 7mb of JS)

~~~
stelonix
Is this by any chance Chrome/webkit-only? It's been loading for over 10
minutes here (using Aurora).

~~~
jvilk
Hello, JSMESS developer here.

It should work on Chrome/Firefox/Opera/IE 10+/Safari/just about anything with
typed arrays.

Chrome and Firefox have USB joypad support, but you need to activate it (by
pushing a button on the joypad when the page loads) before the emulator
starts.

------
T-hawk
Love the sprite work to fit each of the numbers into 8-pixel-wide sprites.
(The sample screenshot lacking what would be a rather chunky 256 may not be a
coincidence.) The 2600 has no text or character capabilities, so the only way
to display numbers is to use its very few hardware sprites, and there aren't
enough to write out each digit in its own sprite.

~~~
chesterbr
Glad you liked it! I spent some (fun) time to squeeze the different width
tiles in ways that would work well on different sizes, some working better
than the others. If someone wants to improve upon it (the tiles are human-
editable here:
[https://github.com/chesterbr/2048-2600/blob/master/tilegen.r...](https://github.com/chesterbr/2048-2600/blob/master/tilegen.rb)),
I'd be happy to take a look!

------
raldi
The mobile version of the site hides the screenshot, so here's a direct link:

[https://camo.githubusercontent.com/14454ebb4fa0b959a20b15f8a...](https://camo.githubusercontent.com/14454ebb4fa0b959a20b15f8a1901d679a0e09cf/687474703a2f2f692e696d6775722e636f6d2f436d61676331542e706e67)

------
rglullis
I'm waiting for the Kinect version of the game, so I can play it Minority-
Report style.

~~~
chesterbr
I'd love Kinect + Oculus Rift puzzles: you'd have the board surround you, and
manipulate the tiles with your hands. This would convince me that the future
arrived! :-)

------
postit
[http://chester.me/archives/2014/03/2048-2600-the-2048-game-f...](http://chester.me/archives/2014/03/2048-2600-the-2048-game-
for-the-Atari-2600/)

He did a blogpost

------
boomlinde
This is excellent! Hav you considered using hardware the hardware acceleration
available in the Pitfall II mapper to get enough raster time for colors?

~~~
chesterbr
Heh, my current struggle is precisely trying to have tiles with different
colors for each value (my last attempt fell 2 cycles short of achieving it).
David Crane's DPC chip is indeed impressive (like pretty much everything he
did on the Atari), and would at least free one register and shave enough to
allow it, but I'd like to do that with "standard" Atari hardware. Thanks for
the suggestion anyway!

------
OneOneOneOne
It would have been wonderful if this had been released back in the day.

------
LanceH
This is better than an interactive fiction version for me.

------
evo_9
When's the Apple Lisa port coming?

