17 ms·
Show HN: My first game, minimal procgen gravity golf inspired by Desert Golfing
- mrspatula 7y agoHi HN, 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
- seanwilson 7y agoGreat job on completing it - looks fun! Any comments on troubles you ran into and surprises on the way?
- mrspatula 7y agoThank you. 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 :)
- kleer001 7y agoStupid question... Did you try a voronoi diagram?
- mrspatula 7y agoNot 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.
- petargyurov 7y agoIt's funny isn't it... just a pretty space golf game on the surface; but a monster of mathematics underneath it. Impressive stuff!
- zubi 7y agoCare to share the tech stack behind the game? Seems that you used a cross-platform technology to make it runable on several OSes.
- azhenley 7y agoThe splash screen says Unity on it.
- mrspatula 7y agoYes, exactly. Have to pay $$ to remove that splash screen logo!
- big_chungus 7y agoStupid 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.
- mrspatula 7y agoNo, they don't make it easy (and more importantly, it would violate their terms). You just have to pay to remove the splash screen.
- ablation 7y agoIt's really not much of a bugbear anyway. I actually found it useful to see it was built in Unity!
- TheRealSteel 7y agoEven if you're technically able to cover the splash screen, you aren't legally or morally able.
- 7y ago
- albi_lander 7y agoSo 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.
- mrspatula 7y agoThanks. 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.
- pryce 7y agoI 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.
- pryce 7y agoOh, 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?
- thescribbblr 7y agoAwesome, downloading now!!!
- thescribbblr 7y agoI think a leaderboard feature would be awesome an a way to share the score with friends
- mrspatula 7y agoDo you mean to compare scores after a specific number of levels?
- thescribbblr 7y agoAbsolutely
- xelti 7y agoThe 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.
- mrspatula 7y agoThank you. Yeah, a fluke trickshot after 10 loopy orbits feels pretty epic!
- azhenley 7y agoThis 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.
- mrspatula 7y agoThanks! 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..
- asdf21 7y agoWow, surprised to hear this! I had assumed in a project that large and longstanding, most of the bugs would have been smoothed out.
- mrspatula 7y agoSo had I :( 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.
- meheleventyone 7y agoPro doesn't give you source code access, just you need to at least have a Pro license to buy source code access (which is very expensive).
- 7y ago
- CathedralBorrow 7y agoGreat job on completing it, and great job on nailing the same beautiful simplicity of Desert Golfing, but with planetary gravity.
- mrspatula 7y agoThank 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!
- gorgoiler 7y agoFinished 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.
- spatulagames 7y agoThanks 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.
- Xophmeister 7y agoI 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.
- mrspatula 7y agoYeah, there are a few games with a similar mechanic! Probably not the one you're thinking of, but there is: https://sourceforge.net/projects/slingshot-game/ https://sourceforge.net/projects/slingshot-game/
- lufte 7y agoI've been looking for this game since I played it many years ago, but I had forgotten the name. Thanks for the link!
- 0-_-0 7y agoWarheads? I played it too!
- spatulagames 7y agoWow, warheads looks fun. Very complex. I'll be giving it a play tonight!
- TeMPOraL 7y agohttps://www.youtube.com/watch?v=Vu3jzhwK60A https://www.youtube.com/watch?v=Vu3jzhwK60A This one? If so, I played it three! One of those non-AAA games I most fondly remember from my teenage years!
- JamesAcorn 7y agoIt 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.
- choward 7y agoI 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?
- spatulagames 7y agoSure thing - that's a good point. I will add something to the store descriptions. The first 10 levels are free (and you can replay them endlessly). To unlock infinite levels, there is an IAP for ~1.99 USD.
- fatboy 7y agoYou can expand a section lower down on its App Store page to see what's the iaps are. In this case I think it said unlock full game.
- spatulagames 7y agoThat's good to know. Not sure if that's the case on Android - I don't think it is.
- fatboy 7y agoAh 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 =]
- spatulagames 7y agoYup, it's a smart link that should redirect to the right platform (hopefully..)
- Insanity 7y agoI 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! Also kudos on having a Linux version <3
- frou_dh 7y agoI 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.
- spatulagames 7y agoThat 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.
- frou_dh 7y agoSome of the good quality iOS apps that aren't even games use the TE in multiple places, so it definitely can be used tastefully.
- blairbeckwith 7y agoThis 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.
- mrspatula 7y agoThank you, those are very kind words. Have you discovered Hard Mode in the menu? That might scratch the high-pressure itch if you every get bored of relaxing! PS: and please tell your Desert Golfing friends!
- CathedralBorrow 7y agoYeah 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".
- mrspatula 7y agoThanks - people seem to be really liking hard mode! That level transition took a lot of iterations indeed - I'm glad people are noticing it!
- coldcode 7y agoI 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".
- mrspatula 7y agoOh 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.
- baxtr 7y agoHas anything sticked so far that you could share? I am also thinking to do a small little video app.
- randrews 7y agoThis 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?
- mrspatula 7y agoThank you - that seems sensible, I'll fix that shortly.
- randrews 7y agoThanks! That'll make me play this game a lot more. :)
- spatulagames 7y agoPresumably you want to listen to music over it?
- randrews 7y agoMostly I just want to play it in situations where my phone making sounds might bother people.
- spatulagames 7y agoCan you turn down the volume? On Android, there are separate volumes for games/music/videos, and for notifications - are you on iOS perhaps?
- deleted 7y ago[deleted]
- soared 7y agoOdd 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!
- mrspatula 7y agoThat's a really good point. Currently I have astro.golf just set up to redirect, so there's no "content" as such. How do you think that could work?
- furyofantares 7y agoI 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.
- mrspatula 7y agoThanks, 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.. Great feedback!
- furyofantares 7y agoOh 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. :)
- mrspatula 7y agoYeah, perhaps it is a bit too hard for a mass appeal. I'll have a think about what I can tweak. :)
- arayh 7y agoGreat game! Reminds me of Gravitee which was also a blast to play, but requires Flash https://www.kongregate.com/games/funkypear/gravitee https://www.kongregate.com/games/funkypear/gravitee
- codesushi42 7y agoCongratulations on your first game, and keeping it simple and fun.
- ensiferum 7y agoLooks like a rip-off of the good old "spaced penguin" shockwave (flash?) game.
- mrspatula 7y agoHadn'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!
- LoSboccacc 7y agowhy no portrait? it also wouldn't be bad to have the previous launch vector shown
- mrspatula 7y agoHmm, the game can be played in portrait with one thumb without much loss. The only thing that has an orientation is the shot count.
- LoSboccacc 7y agoand the notification drawer, app switch gesture etc, the orientation change has a lot of annoying side effect on the os itself
- robertbalent 7y agoI was little frustrated in normal mode. But hard mode is so much fun.
- Waterluvian 7y agoFeedback: 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??
- mrspatula 7y agoWhat you're looking for is "Hard Mode" which you can access in the menu. Good luck ;) As for the reset not resetting the shot count: that would be too easy!
- Waterluvian 7y agoAha perfect! Also idea for a power up if you're so inclined: when you get a hole in one on normal mode, visualize the gravity wells for the next level or two.
- mrspatula 7y agoThat's a nice idea - might be a bit tricky though. I'll consider it. I like the ghost arrow idea a lot - I'm thinking of adding that to hard mode.
- Waterluvian 7y agoYeah 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!)
- mrspatula 7y agoYeah, the replay is an idea I'd like to implement - just need to work out how to do it easily without going down a rabbit hole..
- martin-adams 7y agoSuch a great game. This is exactly the type of pick up and play game I enjoy. Very well done!
- jefftime 7y agoReally well done! This is a very great idea and well executed
- heyitsguay 7y agoGreat 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!
- mrspatula 7y agoIt's probably a bit buggy, but there's an Easter egg if you tap 3 times on the middle right planet during the loading screen.
- heyitsguay 7y agoThat'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.
- robodale 7y agoCongratulations 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!
- meritt 7y agoMostly just curious: Why is the android version 9MB, the iOS version 62MB, and 3 different desktop versions a fixed 22MB?
- mrspatula 7y agoI 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.
- sohkamyung 7y agoOn Android, is there a way to restart the whole game from the first hole? If not, I presume erasing user data will do the same thing. :-) In Zen Mode, a way to retry a previous level would be nice, for practice and to try to get a better score, even if it's not a hole in one.
- mrspatula 7y agoNo way to restart the game - you'll have to reinstall :)
- turbo_fart_box 7y agoCool game! Played till the end. Does this suppose family sharing? Would buy it instantly if it did
- mrspatula 7y agoI 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
- melonbar 7y agoWow, 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!!!
- ablation 7y agoThis is very, very good. Congratulations.
- kid_cubi 7y agoThat's really neat !! :) You should add a trail to the golf ball so we can see its trajectory.
- mrspatula 7y agoThere's a little easter egg if you triple press on the big top right planet during loading
- pohl 7y agoBrilliant first game! How does one make the in-app purchase? Do I have to complete multiple levels in an on-boarding flow first? Edit: I found it: I needed to play 10 holes.