Hacker News new | past | comments | ask | show | jobs | submit login
Flappy Bird Ported to C64 (sos.gd)
221 points by ForHackernews on Feb 24, 2014 | hide | past | favorite | 84 comments



I am starting to understand the "because we can" mentality.

If my estimations are right, we should see a CSS-only version that doesn't use any javascript next month.

ps. in case someone needs css-only ideas http://liveweave.com/wC3DB2


I made an JS+canvas version the other day http://codepen.io/onion2k/pen/ifroz …so I could do one that fits in a 'favicon'… http://ooer.com/flappicon/

(probably only works in Chrome)


That's great, you should enter that in JS1k: http://js1k.com/2014-dragons/demos


here's a quick and dirty fork to make it restart when you click

http://codepen.io/anon/pen/DimBz


I'm surprised there isn't a version built inside minecraft yet.



you made my day.


I was going to do one for the TI-83, but then found out someone else had done it already ( http://www.cemetech.net/programs/index.php?mode=file&id=1039 )... it's getting hard to find a platform that hasn't got Flappy Birds ported to it already!


How about the version written in BrainFuck?


Main problem is graphics; there's no specification about that in the language, so you'd need to be writing to video memory, or do something funky with the print statements


You can probably use terminal control sequences for "graphics".


Excellent!

Soon, you'll be ready for NodeJS.

:D


Dammit, the C64 always gets the good games first. I hope they make a port for my Amstrad CPC.


Don't worry, Ocean is working on a crappy Speccy port right now.


This made my day :D


You may like this: http://mattl.us/aa/


So many memories! I'm just wondering when that copy of Street Fighter 2 is coming out :)


A friend of mine back then was actually in touch with US Gold about coding it (and he was one of the few people who'd have been capable of it). But they suddenly changed their mind and said "no, we're not doing it".

(And yes, I am the Doctor Fegg who wrote http://mattl.us/aa/AmstradAction082-0010.html ...)


You were working on an SF2 clone with.. Rob something? The guy who made Fluff... right? Lethal Moves or something? (sorry 19 years ago)


Rob Buckley, Radical Software. I was going to be doing the music. But there wasn't really any point doing even homebrew CPC development after AA folded - no-one to sell it to. http://www.cpcwiki.eu/index.php/Lethal_Moves


Hey, not bad for 19 years of memory!

Do you know if Rob ever released any of those unfinished things?

It looks like some work has been done recently on a port of SF2 to CPC -- I must admit, it's been a decade since I had a working CPC... I would like to get one, but maybe emulating things is best at this point.


It says "authorization required"


Actually for those living in Portugal, Spain and UK we get 128/48K games first.

I seldom see any C64 around here, besides magazines.

Looking forward to see the game on the demo tape on the next month's Crash.


I'm saddened that there's no kickass SID soundtrack for the game. That would have been a great way to show off the C64's technical advantages over the iPhone ;)


Obligatory zx81 version, video: http://www.frequency.com/video/just-released-for-zx81-is-qua... The official homepage: http://www.bobs-stuff.co.uk/quack.html

This C64 version is pretty awesome though!


I think it makes more more sense as a C64 game than anything else. It just fits the era and machine so well. Made me think back to the good old days where I would spend all day playing games on my C64.


The earliest game I remember where at least one of the levels used the same game logic was Dragonsden from 1983.... But there were at least one more that I can't remember the name of...


Hi! I made this! Thanks for mentioning it here! Let me know if you have any questions!


Is the source code available somewhere?


Well, it was written in assembly anyways, so you can decompile it, but there are many macros I used, so it might be hard to read (for example scrolling is done without a loop, just 1000 separate instructions). There's so much spaghetti in there. I'll probably release that once I have some time to clean up a bit!


Could you tell us which tools you use? Which assembler, emulator, etc.?


I used 64tass (probably the most usable thing out there), Char Pad, Sprite Pad, Exomizer and Vice :)


Thank you!


Beautiful work. In only 64K of RAM and probably more fun than the phone version! :) Makes me so envious of people that actually have a working C64 to try this on!


Actually only ~38K of RAM plus the 4K section starting at address 49152.


Lest people get the impression the C64 does not have 64K of RAM, I am here to assert that it does in fact have a full 64K of RAM.


Technically yes, but the system mapped the ROM into the RAM and so only 38,911 bytes were available to the user. There were various tricks game makers used to get at the mapped, normally off-limits RAM however.


Nothing tricky about it, just flip some bits at address $01. No sense keeping BASIC or the kernal around if you're not using it.

LDA $01

AND #$F8

STA $01


Thank you for that. I never actually learned how to do this as my own games, written as a kid, were way too small.


These days it is so much easier to have access to all kinds of technical information on the C64. I remember travelling half a day to the single bookshop that sold assembler books. Learning anything beyond those books was mostly a matter of figuring out other people's code (e.g. the 'sprites in the border' hack).


Pretty normal tricks for game makers. Someone writing this back in the day probably would have been able to easily use them, if they needed to. Not that this is exactly a game with a ton of art assets.

Hardcore was keeping data in the RAM normally hidden under the audio and video chips' address registers. Or the screen character color attribute RAM.


I think it is possible to get exactly 64Kb - 2 byte. The first two byte should not be written randomly as they tell the system whether it should include the ROM or not. If you use interrupts then the top few bytes (2 or 4 bytes, can't remember) are also occupied by a jump addresses.


Top 6, $FFFA-$FFFB and $FFFE-$FFFF were NMI and IRQ. $FFFC-$FFFD are the 'cold start' address that's run on reset, although as you point out, if you're not using them, they are free RAM.


I think that person meant the game code was actually using 38K of RAM out of the 64K. I'm assuming the system itself may be using some of the total memory?


The system itself is using a few bytes here and there if you let it. Only a couple bytes are totally off limits if you bank switch out the ROMs and turn off interrupts.


I want to see the source code for this. I opened sourced my iOS remake[1] but I would love to see what this code looks like.

[1] - https://github.com/joeblau/FlappyBlock


It's probably mostly written in assembly. (Or Forth, if you are extra lucky.)


The creator of this is Sos, the developer of the game "McPixel". He is well known in the Ludum Dare community.


Kinda similar in its spirit - here's my curses based adaptation for any vt100-compatible terminal: https://github.com/dos1/flasciibird


Delicious, runs great under cygwin.


Here's a video of another version (although I'm not sure if it's available for download (yet)):

Happy Flappy ~ http://vimeo.com/87434521


I still boot into x64 from time to time to play old games. Games that are much more playable than flappy bird. Sometimes I also like to listen to sid music while working.


This is... beautiful.

( the past inside the present: https://www.youtube.com/watch?v=F7bKe_Zgk4o )


Using 'ported' assumes that you gained access to the original source code for Flappy Bird, rather than just recreating Flappy Bird on C64.


Not necessarily. The word just means [trans]port to another platform. It's only relatively recently that writing automatically portable code has been possible, and even then there's usually some modification involved, otherwise we'd just call it "recompiling".

It has been used this way in relation to games for years. Game ports of the 80s and 90s very often involved complete rewrites from the arcade version, sometimes without access to even the original graphics.


I remember reading accounts of ports where the porters were not even given a spec of any sort, but were lent an arcade cabinet of the original and had to essentially test there way through everything to figure out what to implement.


I wanted to emphasise trying to stay as close as possible to the original as possible, while still being a C64 game. I didn't have access to FB source, so it's just reverse engineered. It's still in need of tweaks and fixes tho (I spent 2 days on it).



My C64 is a bit rusty. But shouldn't that load command end with ",8,1"?


I'm probably equally rusty, but I believe ",8,1" loaded programs written in machine language, and ",8" was for BASIC programs (at least that's what I recall doing). So it looks like the port was written in BASIC.


Looks like you might be right...

,0 The program will be loaded to the start of BASIC memory (2049/$0801)

,1 The program will be loaded absolute, i.e. to its stored location defined by the first two bytes in the binary file. Needed for machine language programs.

http://www.c64-wiki.com/index.php/LOAD


With the ,1 you could do fancy stuff like loading your program and executing it with one command. No need for another run command.


You are correct. Actually any non-zero value after the ,8 caused the load to be relocatable. Kind of a cool feature.


Just because it doesn't have the ,1 doesn't mean it's written in BASIC; it could still be written in machine language with a BASIC stub that executes the actual code (which is loaded into the BASIC memory area but isn't necessarily BASIC) when you type RUN.


This appears to be the case, as I do not believe it would be possible for the game to run with this performance level written in BASIC.


The first argument, ",8" caused the load to come from the attached disk drive, rather than the default cassette interface. The second argument, as explained by others, was to load binary files into their defined locations.

So you could also load binary programs from cassette with a LOAD "*",1,1


I forgot ,1 but it still worked, sorry for the confusion!


It's not loading from disk, right?


It's loading from an SD FDD emulator interface, but I have cut the loading, since it was as long as from an actual disk.


Can't wait to see someone ironically port this over to SNES.


What is with this Flappy Bird obsession? I stayed away from it.

Although a beginner could have some fun coding a clone.


Probably something to do with the fact that the game was (allegedly) pulling in ~$50k/day at the top of the charts in iTunes with very little focus on monetization.

That was combined with an exceedingly simply UX anyone could understand.

And then the developer, to many people's shock, decided to pull the game. He said he didn't want the attention.

Like all popular games - especially the simple ones - there have indeed been a ton of clones pouring into the store.


Is Flappy Bird really so much fun? I quickly lost interest after losing a few times.


That's why people write implementations of it instead of playing it.


Sos awesome as always! Keep on going.


[deleted]


Thankfully there was one next to your comment.


having not seen the original comment, i'm going to assume they said something like "i wish there was a down-vote button for this article."


Can we stop voting up the flappy bird stuff.


Yes, more JS MVC stuff please, if a link doesn't have at least 2 of "web", "framework", or "node" in the title it's unfit for consumption.


I upvote C64 and 8 bit stuff, because I find it really interesting and fun to read about. Even if there's a flappy bird on it, I still upvote it.


But then our bird would fall down or hit a pipe or something


waaaa waaa the consensus isn't what I want so can everyone just change their preferences


No.


Oh my ... hackernews, where are you going to?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: