frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Pong Wars on the Commodore 64

https://imrannazar.com/articles/c64-pongwars
8•Two9A•1h ago

Comments

Two9A•1h ago
Over the years I've written a bunch of things in the orbit of retrocomputing, the largest of which was an incremental game based on a C64 emulator. Somehow I've never written anything substantial for the C64 itself; this post documents my learning while implementing a graphical effect in assembly language, over the course of twelve thousand words and three digressions into side quests.

Let me know if this was entertaining, useful or even both.

kleiba2•52m ago
Fun fact: a bouncing ball was one of the first programs that the C64 User Guide taught you: https://archive.org/details/commodore-64-user-guide/page/n57...

Yes, that's right kids: the C64 came with a manual that didn't just teach you where to flip the power switch of your computer but actually how to program it!

juancn•50m ago
Nice!

Why not just go full character mode?

The smooth motion is nice, but a bit of overkill, also it adds complexity to the collision code.

I suspect this can be done using a variation of Bresenham's line algorithm for the trajectories (keeping delta X and delta Y for each ball) and avoid most/all of the complex trig and math. Just addition and subtraction and a few sign changes.

The delta can be kept at a higher resolution than the grid (i.e. 16x so a mask can be used instead of division), so you can fudge the collision with small delta changes on impact using the SID as a RNG.

dosisking•36m ago
I think it's easier to implement with sprites, but the complex trig and math is unnecessary either way.
Two9A•31m ago
Hey, thanks for checking this out. I wanted smooth motion to keep close to the JS piece that inspired this; it seemed like it should be eminently possible to get smooth motion, after all.

And yeah, I was reminded of Bresenham's algorithm a few days back, and had a suspicion that I've basically redone it independently (and inefficiently) by doing the trig. As mentioned at the end there, the math isn't where I'm losing most time in rendering though.

The Mastodon release post (cite 0) has comments talking about doing the score recalculation only at time of collision, but the worst thing I do is use a block of RAM for the playing field and another block of RAM for the _display_ of the playing field. Copying those blocks of 20 bytes, gosh it's slow.

Luc•21m ago
This seemed promising at the beginning, but do yourself a favor and skip to the end to see the hilariously slow end result.
Two9A•5m ago
Yep, it's astoundingly inefficient. I've been meaning to pull the code back into working memory and do the things I mention in Future Considerations, but it took long enough just to do this write-up; could be years before I get around to it.

Sleep regularity is a stronger predictor of mortality risk than sleep duration (2023)

https://academic.oup.com/sleep/article/47/1/zsad253/7280269
407•bilsbie•3h ago•185 comments

Mysteries of Telegram Data Centers

https://dev.moe/en/3025
94•theanonymousone•2h ago•22 comments

Prioritize mental health, and why communication is so important

https://ramones.dev/posts/mental-health/
128•ramon156•4h ago•74 comments

The well-calibrated Bayesian [pdf] (1982)

https://fitelson.org/seminar/dawid.pdf
23•Murfalo•1h ago•5 comments

Briar Is in Maintenance Mode

https://briarproject.org/news/2026-maintenance-mode/
72•ristello•3h ago•40 comments

SpaceX bond worth 10% less than issue price – heading for junk bond status

https://www.ft.com/content/3a023b95-66c3-41e1-b0ce-df752a499541
308•youngtaff•2h ago•225 comments

Jurassic Park computers in excruciating detail

https://fabiensanglard.net/jurrasic_park_computers/index.html
728•vinhnx•12h ago•182 comments

Towards a Harness That Can Do Anything

https://eardatasci.github.io/c/ambiance/index.html
44•evakhoury•1h ago•18 comments

The Three-Second Theft: Why AI Voice Fraud Outruns Every Defence

https://smarterarticles.co.uk/the-three-second-theft-why-ai-voice-fraud-outruns-every-defence
89•dxs•2h ago•95 comments

OpenAI loses trademark dispute at EU court

https://dpa-international.com/economics/urn:newsml:dpa.com:20090101:260715-930-389143/
22•hermanzegerman•1h ago•2 comments

My Midlife Crisis Corolla Is Fast, Furious, and Modded

https://www.zocalopublicsquare.org/my-midlife-crisis-corolla-fast-furious-fully-modded/
18•gmays•1h ago•18 comments

Weathergotchi – an open-source climate Tamagotchi

https://github.com/Michael-Manning/E-Paper-Climate-Logger
65•luanmuniz•4h ago•17 comments

Jiga (YC W21) is hiring the best people to make manufacturing great again

https://jiga.io/about-us/
1•grmmph•3h ago

Telegram Serverless

https://core.telegram.org/bots/serverless
103•soheilpro•5h ago•59 comments

What Every Python Developer Should Know About the CPython ABI

https://labs.quansight.org/blog/python-abi-abi3t
11•matt_d•3d ago•1 comments

A Trip to 90s Kansai: Exploring the XD FirstClass Network BBS

https://cdrom.ca/games/2026/05/30/xd.html
46•zetamax•1d ago•5 comments

CVE-2026-59208: Cross-Issuer Account Takeover in n8n

https://www.strix.ai/blog/n8n-cross-issuer-account-takeover
9•bearsyankees•1h ago•0 comments

What's the most popular number in Hacker News titles?

https://blog.omgmog.net/post/most-popular-numbers-in-hn-post-titles/
23•omgmog•2h ago•9 comments

The Conservationist Who Turned 40 Terabytes of Public Data into a Video Game

https://blog.exe.dev/meet-the-conservationist-who-turned-40-terabytes-of-government-data-into-a-v...
28•bryanmikaelian•1d ago•3 comments

The Memory Heist

https://www.ayush.digital/blog/the-memory-heist
10•eieio•19h ago•1 comments

Show HN: StyleSeed – a design-rules engine so AI agents stop building generic UI

https://github.com/bitjaru/styleseed
10•bitjaru0402•1h ago•0 comments

Show HN: 18KB ls alternative in no_std rust and Libc

https://crates.io/crates/fli-tool
6•tracyspacy•1h ago•0 comments

Vancouver PD website features Quick Escape button that wipes itself from history

https://vpd.ca/
332•LookAtThatBacon•15h ago•131 comments

Bootstrapping GDC with DMD

https://briancallahan.net/blog/20260713.html
12•LorenDB•1d ago•0 comments

TS-2026-009: Insecure argument handling in Tailscale SSH permitted root access

https://tailscale.com/security-bulletins
200•jervant•14h ago•127 comments

Using Go for Mobile Apps

https://www.davidsobsessions.com/p/one-year-of-gomobile/
31•theHocineSaad•6h ago•8 comments

Latent Space as a New Medium

https://kevinkelly.substack.com/p/latent-space-as-a-new-medium
31•thm•1d ago•5 comments

Microsoft Confirms Windows GDID Device Identifier That Cannot Be Disabled

https://www.ghacks.net/2026/07/12/microsoft-confirms-windows-gdid-device-identifier-that-cannot-b...
40•robtherobber•2h ago•11 comments

Richard Feynman and the Connection Machine

https://longnow.org/ideas/richard-feynman-and-the-connection-machine/
13•yankcrime•3h ago•5 comments

Neverclick: Desktop application for performing mouse actions with your keyboard

https://github.com/LazoVelko/neverclick
50•thunderbong•3d ago•45 comments