Live data from Hacker News

Open Golf: A cross-platform minigolf game written in C

github.com

21–30 of 99 posts

Re: Open Golf: A cross-platform minigolf game written in C

#23

Any recommendations to learn to build cross-platform games like this? I work on frontend projects day-to-day. I'd love to build a simple cross-platform game in C/Zig/C++ for some variety and to learn lower-level programming. I've looked at Handmade Hero in the past but its specific to Windows at the moment.

Handmade Hero gives good advice how to modularize to make a game portable. For many things you want to achieve, you can have the platform call the game instead of the other way around. Essentially it's (asynchronous) event driven architecture which enforces modularization.

Think of a system as shipping data packets around, then it should be much easier to see how to swap out the platform parts.

Re: Open Golf: A cross-platform minigolf game written in C

#24
I tried to analyze the running app with the Firefox dev console, but the GitHub hosted page said there were no sources!

Browsing the Sokol Github, it looks like it's compiling to web assembly. I'm not very familiar with web assembly, how does one normally debug it?

Re: Open Golf: A cross-platform minigolf game written in C

#26
Impressive to see C being able to create x-plat 3D games that run in Browser + popular Desktop + Mobile OS's.

Typically there's big companies with large dev teams working on accomplishing such a feat & this project does it with with a 50 year old language and a handful of libs

Re: Open Golf: A cross-platform minigolf game written in C

#28

After spending my career working in higher level languages, I'm always impressed by what people can do with languages like C. It's not just for drivers anymore.

It was never just for drivers. Most of what you use in high-level languages is just syntactical sugar for things that might take three lines in C instead of one line in your usual language.

Re: Open Golf: A cross-platform minigolf game written in C

#30
post #17

After spending my career working in higher level languages, I'm always impressed by what people can do with languages like C. It's not just for drivers anymore.

It used to be the norm to write games in C. In fact it used to be the norm to write them in assembly, C was seen as a higher level abstraction that sped up games development once upon a time.

There's a good Diablo 1 "making of" video, the lead developer talks about learning C while coding the game in assembly. I'll try to find it.
Post reply on HN