Kind of looks like neverball/neverputt ( https://neverball.org/ ).
Open Golf: A cross-platform minigolf game written in C
51–60 of 99 posts
Re: Open Golf: A cross-platform minigolf game written in C
#52Earlier quoted context omitted.
Builds and runs well in Asahi Linux :) Frame rate isn't great without GPU support, but totally playable.
Absolutely crazy that Asahi Linux beats MacOS on even one silly datapoint of compatibility lol. Open source is sick.
Re: Open Golf: A cross-platform minigolf game written in C
#53Any 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.
One way (out of many) to do this is have a cross-platform interface for each non-portable thing, with separate platform-specific implementation files that you swap in depending on which platform build you're doing. For example, if your game has sound, you'll probably have a platform-independent sound.h the rest of the game calls into, and then sound_windows.c, sound_linux.c, sound_mac.c, etc. files that contain the platform-specific implementations of those functions. Repeat for graphics, input, and other things that cannot be done (or you don't want to do) in a portable way.
Another thing is the game loop. Back in the DOS days, when you were the only thing running on the system, you implement main() did something like:
while (game_running) { do_everything(); }
Modern platforms expect to be in the driver seat, and will instead call into your code, so this turns into something like: function windows_call_me_please() {
do_everything();
}
Obviously this is a simplification, and there is a lot more to it, but hopefully it answers some basic questions.Re: Open Golf: A cross-platform minigolf game written in C
#54Great work, awesome orchestration of cross platform libs.
Re: Open Golf: A cross-platform minigolf game written in C
#55Any 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.
Re: Open Golf: A cross-platform minigolf game written in C
#56I 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
#57Level 20, but wish there were more. The fun ones were trying to skip most of the course from the tee. Throw a leaderboard on there and no one's going to be working. Great work, awesome orchestration of cross platform libs.
Have you seen the leaderboards of any online game lately? They usually get wrecked by cheaters and defeat the whole purpose.
Re: Open Golf: A cross-platform minigolf game written in C
#58Impressive 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
Plenty of retrogaming stuff to learn from.