I just launched this little game of mine - Astro Golf. You can think of it as Desert Golfing but in space, where the gravitation pull of the planets create some interesting levels. I think it was on an HN comment that I first heard about Desert Golfing many moons ago, so it felt fitting to post this back here.
All the levels are procedurally generated, and are guaranteed to be hole-in-one-able. I did this by computationally testing a huge amount of levels offline.
This is my first game, and I learnt a lot doing it. Happy to answer your questions! I hope you enjoy it.
So simple, yet incredibly fun, well done! Could you share how long it took to build it ? I've been thinking about creating a small game, for fun, and to learn stuff along the way, and I am wondering how much time it would take me.
Thanks. The goal of this project was to actually get something out there, so I deliberately set myself quite a small goal. I probably got "80%" of the way there in 2-3 weekends back in March, then I got busy with some other stuff. I didn't want to let this become another project that falls to the wayside, so I then spent another ~6 weekends polishing, refining, etc in the last 2 months. It was a great learning experience, and I would 100% recommend making a game. It's such an interesting mix of programming, animation, design, art, sound.
Oh, actually I'm also interested in how you made the levels. Because of the computational difficulty of solving similar things (eg the three-body problem is hard) and you've got several variables to work with, did you just experiment with each level and place the holes retroactively based on an interesting shot you found?
Or did you have to do a bucketload of math to work out where to place things?
Lots of interesting troubles - quite a few surrounding Unity itself. E.g. they have a physics API that gives different results when run automatically by the engine at 1x speed and when you run it manually as fast as it can go. This came up because I wanted to test every level automatically offline, using the exact same physics simulation as the player would experience.
The procedural generation of the levels was also an interesting problem. I used rejection sampling to basically place non-overlapping circles in a box, but when you want to create quite a dense level this becomes very inefficient (it can be very hard to slot the final few circles in). I tried a number of heuristics and other methods to speed this up, but none of them actually improved over brute force. One of the most interesting was using Gibbs sampling - i.e. generate an initial valid level configuration, then move one planet at a time and sample from the ensuing Markov chain (basically sampling from the marginal distribution of each planet given all the others). This ~kind of worked, but was annoying for a few reasons so in the end I just brute forced rejection sampling on a beefy AWS server :)
Not a stupid question - I did some small amount of experimentation with voronoi, but I also had some global constraints / parameters that I wanted the levels to have and these were more easily implemented in the sampling method.
I like it. Only thing I'd change is maybe the stars to be a fainter, more blue hue, and maybe have them as points or subtly x shaped, just to help visually distinguish the ball.
Stupid question, but I see your logo is on there as well. Might you be able to just make a larger image, or make a background image that blended in with the colors so as to make it illegible? I'm sure that was not top priority, just curious.
I loved Desert Golfing, and also love gravity games (Angry Birds Space is great, and Mario Galaxy is one of my top games ever) but I really wasn’t enjoying this until I read a comment here mentioning hard mode being more fun. I never would have tried out hard mode on my own, or bought the full game, due to the main mode being so hard and, for me, unrewarding.
I’m finding hard mode easier in a way. I learn something between each shot, where I don’t necessarily when I land on different planets and have to make a brand new shot. This also just keeps my motivation up. Coming into a new level in Desert Golfing I usually see some way to get the hole in one, and can evaluate less risky plans that make progress — I get very little of that in this game. So having a mode that lets me learn from each shot helps.
I think what I’d really like is a mode that resets unless you land on the target planet. Let me make the putt. The aforementioned ghost arrow would be nice too.
Thanks, that's interesting to hear. I need to think about how to make hard mode more discoverable.
I do think you can actually get good at zen mode as well, but it takes a bit of practice. Having played a lot, I can usually set up the trickshot I intended and get it most of the way there - and when it doesn't, it's usually quite funny anyway. It's definitely a steeper learning curve than DG.
I'm definitely coming round to the idea of a ghost arrow in hard mode. Your idea about a shot and a putt is also very good - perhaps that could even be the default mode..
Oh I’ve got no doubt it’s possible to get good at zen mode — just a brutal learning curve for me that I wasn’t going to make it past without the helpful tip from another poster. :)
I don't normally install games on my phone, but this looks fun so I just installed it. Seems like something I could entertain myself with for some time!
Finished the demo and enjoyed the experience. Fun! Thank you!
Some ideas that would have made it even more fun for me, though which might change the game too much from your original vision:
Ghost arrow: show what shot I played last time, so I can tweak my strategy.
Reset: some sort of gesture to quickly go back to the start, so I can tweak based on the ghost arrow.
Escape velocity: a fun part of orbital mechanics, and a way to penalize me for just using a “hit as hard as I can” strategy where the only changes I make are shot direction.
Hard mode was the most fun because getting a cool hole-in-one felt really fun. I almost missed that hard mode was even an option — the help screen says “hard mode” so I assumed that was the mode I was in, but it turns out it was the button to play in hard mode, which turned out to be a lot more fun because of the reset mechanic.
Thanks for the detailed feedback - some really good points.
Ghost arrow is something I thought of, but I was concerned it would make the game too easy.
Reset: you can long press without dragging to reset. There's a tutorial-prompt for it, but it only comes up when you appear to be stuck in a gravity well (which can happen).
Escape velocity: I did have this initially, but playtesters found it very frustrating and preferred to see a crazy figure-of-16 through lots of planets. I understand your point of view though.
That's very good feedback on hard mode - I wonder what I can change to make that more obviously a button. I personally prefer hard mode too.
This is brilliant! I've put hours in to Desert Golf, and this is an improvement on every level.
In particular, I find it much more relaxing that Desert Golf, which I think comes down to a couple of factors. The design is one – the cute graphics and colours really help. Music is another – you've done a great job there.
I think the most important bit is the gameplay though – with not showing the score constantly, I'm not as worried about trying to keep my stroke count as close as possible to the hole number constantly. The gravity dynamic also adds enough whimsy that I don't feel like I "absolutely should have got a hole in one" like I did on some holes in Desert Golf.
All in all, great job! Instant purchase from me and I think I'll be spending a lot of time with it.
Yeah I'll second that. This game -- on hard mode -- is hitting exactly the same notes as Desert Golf but even better. Super relaxing and very strong on the "one more hole". I've been playing on and off throughout the day, up to level... 58. And now 61 because of course I couldn't just put the phone down.
Extremely impressed that this is your first game. There's a ton of polish in there. Love how pleasing the animation between holes is; you can just tell that went through many iterations until someone with the exact vision said "Yep, there it is".
The gravity mechanic is really amusing! I was actually laughing at a particularly poor shot I made that somehow went into the hole after a minute or so of fast-forwarding. I also really like your use of typography in the tutorials. Well done.
Congratulations on making something and seeing it through to the end (launch). I love posts on HN like this, people like you out there hacking away, learning, and make something useful/fun/cool like this.
Bravo!
Odd bit of feedback for you and others - you should register your domain and put some placeholder content that at least a week before posting the link everywhere. Many corporate firewalls block brand new domains!
It says any level can be beaten in one shot. Okay challenge accepted. Give me a quick way to reset if my first shot fails. (or if there is, make it more obvious please)
I love how fast it loads and how seamless it is. I love love love games that don't have level transition screens.
Okay I think I figured out how to reset. Hold down tap when not moving. But it doesn't reset the shot count. Why not??
Yeah by all means you don't have to implement what everyone suggests.
Another suggestion: replay shot.i just had a hilariously roundabout hole in one. I wish i could replay it to grab a video to share (and therefore advertise your game!)
Wow, absolutely fantastic mate! So cool; a friend and I tried our hands at making a game in Unity called Galactic Putt a while back, with a similar riff, but sadly the physics got the best of us and we never finished. It is really inspiring to see someone with a one man team put out something so stellar. Keep up the good work!!!
Great game! Purchased. I think you could have a lot of fun visually by giving the ball some trailing particle effects or some other creative coloration of the trajectory. Especially on the long shots that loop around a bunch of planets, i want to see the curve I've traced out!
That's too awesome a feature to keep hidden away as an easter egg! Your trail should start looking cooler and cooler the longer it continues on a single shot, and you should be able to unlock designs by doing stuff like making long shots, orbiting around a planet several times, making N holes in one in a row, etc.
I remember playing a game like this when I was a kid (25ish years ago) at school, except it wasn't golf, but rather a two player game where you shot gravity-assisted missiles at each other (think Worms-in-space). I remember it being on an Acorn Archimedes, but it may have been a PC.
It was called !Gravity on the Acorn Archimedes. It was written in BASIC (and possibly some assembler) and I remember it being a popular game at school to hack - change the number of planets, acceleration rate etc.
This is a lot of fun and so simple! Congrats on the release.
What was your experience with using Unity? I have been dabbling with Game Maker for the last few months and find it fairly easy to work with, but I haven't attempted anything for mobile.
Thanks!
I personally wouldn't use Unity again. I've run into so much trouble and so many little bugs. An example: just yesterday I updated Unity itself (a minor patch upgrade), and it broke half the links in my project, I had to manually downgrade some official unity packages to get it to compile, etc. I also find the fact that C# is garbage collected to be very annoying - in a real-time application, I just want total control over when stuff is allocated and deallocated. Even in a simple game such as Astro Golf, I spent ages tracking down silly allocations that lead to stutter-inducing GC.
Unity physics is also a right PITA - I could go on and on..
A lot of these bugs seem to also go unfixed, I think with the intention that you pay for Unity Pro which gives you source code access to the engine and you can work around them / fix them yourself.
Ah, my misunderstanding. That's good to know. I imagine Unity pays more attention to Pros though? If you're free and you open tickets / post on the forums, they seem to just get totally ignored.
Each level gets better support, right up to getting roving Unity engineers in to help you out.
I don't think they are deliberately leaving bugs unfixed in order to up sell people though. More its just an enormous software project with an awful lot of people using it in lots of different ways. Basically an enormous surface area to try to tackle.
I've been looking more and more at Godot, and I really like it. Open source, you can script in C++, and it seems to have most of the features necessary for a simple 2d game like this (perhaps not for some AAA 3D game of course).
I built a game based on gravity and other physics and pool a long time ago on iOS which did not go anywhere; possibly because the next game that came out on the same day was called "Angry Birds".
Oh man, that really sucks. Getting anywhere in the app store is so difficult nowadays. I'm a complete marketing rookie but atm I'm just trying out random ideas to see what sticks.
Thank you, I was hoping it would appeal to the DG crowd. I couldn't go as full minimalism as DG since I felt that some explanation / tutorial was necessary (the game being a little less obvious). I also wanted to play more on a "Le Petit Prince" theme!
This is a great game! One request: there's a way to turn off the music but the sound effects keep playing. Could you make that button turn off all sound, not just the music? Or add another one to turn off the effects as well?
I don't usually install apps (especially games) with in app purchases. The only time I sometimes do is when I know what they are up front. Can you explain what the in app purchases are in the description?
Ah yeah, I'd not clocked your link takes us to the relevant App Store so I'd assumed it was an iOS only game.
It's great by the way! I've played a bit of desert golf over the years after reading a HN comment about it, and your game is a delightful improvement =]
I don't know whether you have access to the "Taptic Engine" API on iOS, but a tactile ping when striking the ball and thuds when it hits a planet surfaces could be nice.
That is a nice idea indeed. I'll have to look into it. I'm always a bit concerned about vibration in games since you don't know how intense it will be on different devices: it can be very tacky if it is over-the-top.
I really don't know. I'd like the iOS version to be lighter, but I'm at the whim of Unity. I've tried a couple of ideas to make the iOS bundle smaller, but no luck.
I don't know if it supports family sharing - do I need to opt in manually on my end? It's just a normal IAP to unlock the game, so if IAPs work with family sharing then it should be OK
Hadn't heard of spaced penguin, but I make no claim that the gravity mechanic is original. There are a long trail of similar games going back to the 80s!
I just launched this little game of mine - Astro Golf. You can think of it as Desert Golfing but in space, where the gravitation pull of the planets create some interesting levels. I think it was on an HN comment that I first heard about Desert Golfing many moons ago, so it felt fitting to post this back here.
All the levels are procedurally generated, and are guaranteed to be hole-in-one-able. I did this by computationally testing a huge amount of levels offline.
This is my first game, and I learnt a lot doing it. Happy to answer your questions! I hope you enjoy it.
Peace