Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you rely on common game libraries and widely supported web APIs, you can get quite far with C. Here's an OpenGL and SDL2 game running in the browser that I ported (and also maintain):

https://play.neverball.org/

Getting it to render was the easy part; I've since spent the majority of time getting it to feel native to the browser, implementing responsiveness (web dev term for adapting to viewport size), touch controls, GUI tweaks, working around fullscreen API gotchas (e.g., the Esc key/Back button is reserved), and any other small things that might remind you that this is not a native browser game.



I don't think I've ever played a game where the laptop touch pad made so much sense. I think that's the most natural feeling UI I've ever used.


Great game! My four year old got hooked on it too!


That's awesome!


Dude this is really cool. Do you have a repo or other site where you talk about this?





Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: