logoalt Hacker News

Coding Tricks Used in the C64 Game Seawolves

99 pointsby atan2today at 12:24 PM8 commentsview on HN

Comments

solarisostoday at 6:41 PM

There is something incredibly refreshing about looking at C64 optimizations. Today we throw gigabytes of RAM at simple CRUD apps, while these developers were counting every single cycle and byte. It’s a good reminder that 'efficiency' used to be a core requirement, not an afterthought.

show 2 replies
Luctoday at 1:19 PM

> However, you can save 1 byte of RAM by using the branch instructions instead, as long as you know which flag(s), if any, are guaranteed to be on or off at the jump point.

> For example, if you know the carry flag will always be clear at the jump point, and if the jump distance is within branching range, you can replace JMP with BCC.

However if the BCC crosses a page boundary it'll take 4 cycles, one cycle longer than a JMP.

diydsptoday at 1:17 PM

Ah so with splites you can have a 24 pix wide column of arbitrary data that can be slid around left to right....and may act as an "echo" of the players movement like in this game...or possibly even different physics...

I love the stacking of boolean ops before branches, too.

empressplaytoday at 4:05 PM

Interesting stuff! Regarding game sales, other developers have had more success putting their games on physical media (particularly cartridges).

LocalHtoday at 6:34 PM

[flagged]