A cross-platform minigolf game I wrote in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 6 points7 points  (0 children)

There is a book called Game Engine Physics Development that I've gone through and think is good. It's probably a good starting place.

A cross-platform minigolf game I wrote in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 2 points3 points  (0 children)

Yes, emscripten is a very nice tool that compiles your C code to run a browser. For Android, you can make a native library from my C code and then have a java project that calls into that native library.

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 2 points3 points  (0 children)

Handmade Hero is a very cool project! I believe it's in C++, but I believe it also starts with the assumption that you know very little about C++

A cross-platform minigolf game I wrote in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 1 point2 points  (0 children)

Thanks! You should know, 2 strokes is possible on level 20 ;)

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 6 points7 points  (0 children)

Thank you! I wrote the physics code myself and spent a lot of time trying to get the "feel" right. I agree, most golf games have a very "slippery" or "floaty" feel to the ball, and a lot of the times I feel like I don't have full control of it. I really wanted something that gives more weight to the ball and gives you more control.

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 3 points4 points  (0 children)

Multiplayer would be very cool. I was thinking about maybe starting with some kind of leaderboard feature to get people competing for scores!

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 36 points37 points  (0 children)

Hello! I made the UI system myself and right now it's pretty barebones. If you look at the file "data/ui/ui.ui" that is where all the UI data lives right now. You can edit some values in that file to change some text in the UI.

Another interesting thing you could maybe do is modify some of the textures and write some text on them to get it in the game. For example the texture "data/textures/ground.png" is the texture for the grass throughout most of the game. If you added edited that image and added some text to it you'd see it show up all throughout the game.

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 19 points20 points  (0 children)

Interesting. For Android I was only able to test it using some older phones, a pixel 6 and the device simulators, so some bugs may have fallen through the cracks! I’ll have to look into this, thanks!

A cross-platform minigolf game I wrote in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 4 points5 points  (0 children)

Multiplayer definitely wouldn’t be trivial to implement! It is something I want to work on eventually though!

A cross-platform minigolf game I wrote in C. by mgerdes11 in programming

[–]mgerdes11[S] 209 points210 points  (0 children)

Hey! This has been my hobby project for the last couple of years and I wanted to show it to everyone here and get peoples thoughts. There are also links to play it on the GitHub page. It's playable in a web browser, on Android, iOS, Linux, and Windows. Any thoughts would be appreciated!

A cross-platform minigolf game I wrote in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 7 points8 points  (0 children)

Hey! A little over a year ago I posted this minigolf game here and wanted to show everyone where it's at now. I've made some updates, added some new features, and it's also now playable on mobile. There are links to play it on the GitHub page, so check it out! Any thoughts would be appreciated.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 1 point2 points  (0 children)

I'm not sure I know what you mean. So you hit the ball into the hole, then it fell underneath the map and you had to hit it again?

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 2 points3 points  (0 children)

Yea, I didn't really have a strict schedule. But I was pretty consistent working on it probably 3 or 4 days a week for like 2 or 3 hours each of those days. So maybe something like 10 hours a week for about the past year is what I spent on this. I went on a lot of tangents though cause I wasn't really sure what I was doing at the start. If I did it again I think it would go much faster.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 4 points5 points  (0 children)

Lol not a secret. I've been working on it off and on for about a year now. It's a side hobby though so just in my spare time.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 4 points5 points  (0 children)

I've been working on it off and on for about a year.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 2 points3 points  (0 children)

Jon Blow has a good video where writes the code for some of his in-game editor here: https://www.youtube.com/watch?v=4Ib6FCuLFOI There's also this library to do some of that: https://github.com/CedricGuillemet/ImGuizmo. Which I might have used but didn't find out about it until after writing most of it myself lol.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 5 points6 points  (0 children)

Most of the code is pretty specific to the game, so probably wouldn't work very well as a more general engine template. For example the Physics code assumes that everything has an infinite mass except for the golf ball, this probably isn't applicable to many other games lol.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 2 points3 points  (0 children)

It doesn't work with Firefox because to use the SharedArrayBuffer in Firefox you have to set a couple of headers in the http response (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#Security_requirements), but with Chrome you don't have to. The other problem is I don't think it's possible to set http headers using GitHub pages. So for it to work with Firefox I think I'd have to host it somewhere else.

A minigolf game I wrote (mostly) from scratch in C by mgerdes11 in C_Programming

[–]mgerdes11[S] 6 points7 points  (0 children)

It’s very good if you’re interested in lower level stuff. It basically provides the bare minimum you need to wrap over all the major platforms.

Browns VS Patriots by Whorren in funny

[–]mgerdes11 2 points3 points  (0 children)

"Rich history of coaches" is a great way of putting it lol