NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Starfling: A one-tap endless orbital slingshot game in a single HTML file (playstarfling.com)
iceberger2001 2 days ago [-]
Hey HN, I built STARFLING, a simple hyper-casual space game you can play right in your browser.

You orbit a star with a ball. Tap anywhere to release and sling it through space. Catch the next star to lock in orbit and keep going. Miss and it's game over.

The whole thing is just one HTML file with vanilla JS, Canvas, and Web Audio. No frameworks, no build step. Loads in under 2 seconds on phone or desktop.

There's a combo system if you release quick, a skip bonus for jumping over stars, and it gets harder the longer you last. When you die you get a cool trail art picture of your whole run that you can share.

Audio is all generated on the fly and it has haptics too. Pretty satisfying once you get the timing down.

Play it here: https://playstarfling.com?utm_source=hn&utm_medium=showhn

Would love your thoughts on the feel, difficulty, and whether the trail art is fun or not.

Thanks!

metalrain 19 minutes ago [-]
I noticed that gameplay speed depends on the window size. I'm assuming that larger canvas takes longer to render. It seems too fast at small window sizes and maybe too slow at 4K, not sure what is the intended speed.
jonwinstanley 1 hours ago [-]
Really like this game. A few bits of feedback:

- Can you add a keyboard key that also launches, rather than always have to be a click - Can you make it so it restarts without having to click the play again button? Maybe use the same keyboard button as above? - When fail, why does the ship fall to the floor? Maybe a gentle curve away would be more "realistic" - Why is the bg squares? Maybe it should be more of a subtle space bg

Thanks for making it!

tuyiown 1 hours ago [-]
It’s great but the animations when catching a new orbit (sparks and combo announcements) is making hard to follow the ball, I realized I missed many shots due to this after some games.
jonwinstanley 1 hours ago [-]
Oh, and it’s completely different on mobile. Game is slower and much easier to score well.

My feedback above was on desktop.

hirako2000 8 minutes ago [-]
I don't get the gameplay.

Ok on touch gravity of the orbiting takes off. And if I don't land the next I start again and get promoted for email each time.

It reminds me of certain games on NES which could be played for hours, once you lose your 3rd life you start all the way from the beginning.

Here it's the same. With one life.

cpcallen 2 hours ago [-]
I am completely confused about the orbital mechanics in this game. They seem completely broken; at any rate they do not work remotely like any other simulation I've played with (e.g. Gravitation or Kerbal Space Program). The bodies other than the first body appear to actively deflect the spacecraft away!
andai 1 hours ago [-]
You have elucidated a real gap in the marketplace: physically accurate mindless tapping orbital mechanics sandbox.
wolframhempel 2 hours ago [-]
I don't think it has any expectation of being an astrophysics simulation. I mean, if the "spaceship" misses, it falls towards the "floor"...
muti 5 hours ago [-]
Fun. Not sure if this applies on desktop, but on mobile the quick/fast/blazing/skip text often blocks vision of the ball making it harder than it should be to make combos
tux3 1 hours ago [-]
Very much applies on desktop. The restart button is also strange on desktop, it plays animations instead of restarting. I recommend pressing pause and restarting from the pause menu, which is instant.
high_priest 2 hours ago [-]
Major problem
disillusioned 5 hours ago [-]
This precisely.
ericskiff 6 hours ago [-]
Fun, but the way they fly doesn't quite match my intuition. Why would an object curve when I send it out on the tangent? Wouldn't that be a straight line unless it's affected by a different gravity well?
lemagedurage 5 hours ago [-]
Yes, you have to imagine a much bigger star beneath the viewport.
kaffekaka 4 hours ago [-]
I imagine it as slingshotting my way up a tree.
yuppiepuppie 4 hours ago [-]
This is good fun! I’ve added it to the HN Arcade :) https://hnarcade.com/games/games/starfling
Twirrim 5 hours ago [-]
Fun, but dark grey text on a dark background? Bit hard to read a bunch of the text.

It also seems like there's gravity coming from off screen assets (or maybe it's the bottom of the screen?) causing the projectile to curve in unexpected ways, and not be captured as strongly by the gravity of the visible objects as I'd expect.

haarlemist 2 hours ago [-]
Looks and plays quite nicely. I don't know how well it represents the real slingshot physics, but it's quite fun.

I've made a similar little web game based on Lunar Lander, check it out!

https://landed.theelderscripts.com/

rkagerer 1 hours ago [-]
Neat, and nice audio, but I wish it were a little more forgiving. Eg. Combos or surviving several jumps might collect "lives" that recover your last orbit if you screw up.

Might also be fun if you encountered powerups as you explore deeper into the map (eg. gravity attraction, project path, etc), or even got to pick between forks in the route. The trail art reminds me of Out There.

foresterre 4 hours ago [-]
Fun :)

Small idea for improvement: the "fast" text is often over the same space as the ball, which makes it harder to see where the ball would be going.

RobotToaster 2 hours ago [-]
>single html file

Looks at imports

>Google Tag Manager

-_-

systemsweird 4 hours ago [-]
Seriously fun! A first it felt frustrating but it was interesting that at a certain point (after about 10 minutes) I suddenly got an intuitive feel for the ball’s trajectory and it became addictive at that point.

My only gripe is you render the bonus notification too near the ball and it distracts me and makes it harder to keep a combo going.

b3orn 2 hours ago [-]
Reminds me a little of an old game called Slingshot[0], I think it implemented the idea much better as you actually had to slingshot and consider gravity. Someone should turn it into a browser game, would be much more fun than this.

[0] https://sourceforge.net/projects/slingshot-game/

fathermarz 1 hours ago [-]
I love this and it’s very clean. Only piece of feedback, put the play again button where the scores are as that is where the thumb sits on the phone to do the tapping. Mind numbingly groovy
Uncorrelated 5 hours ago [-]
I got 54, allegedly better than 99% of players. But I also note that a score of zero is apparently better than 32% of players.

Very fun.

falcor84 2 hours ago [-]
I actually love the idea of opening the game and then not playing resulting in a negative score. To quote Garfunkel & Oates, "It's better to be a loser than a spectator."
4 hours ago [-]
hamandcheese 4 hours ago [-]
Scoring 0, 1, 2, 3, or 4 all say better than 32% of players. Something isn't right.
swiftcoder 3 hours ago [-]
You have to get up to about 8 or 10 before you really start climbing the ranks
modinfo 2 hours ago [-]
Cool game! I scored 7581 (120 stars) on STARFLING :P

https://pod.sekor.eu.org/@modinfo/statuses/01KNXT3ZQDTHZBDYF...

mixtureoftakes 2 hours ago [-]
who are you.
ewatch 3 hours ago [-]
Really nice and very fast becoming addicted :D. Feedback from my side:

- on desktop (tested in Brave Browser) the speed is faster than on mobile (is this supposed to be ?)

- on desktop would be nice to have a short cut to instantly start a new game (may be on mobile you could calculate early on if the balls curve would have a collision and show a button to directly restart)

vunderba 2 days ago [-]
Nice job. Consider allowing the use of a key (Z, spacebar, etc) in addition to the mouse.

Related but I played a similar orbital minigame a while back on Itch.io which has a bit of a 2D Mario Galaxy feel to it as well.

https://danceswithpixels.itch.io/orbital-slingshot

fifilura 2 hours ago [-]
Took a little bit of figuring out why I always exploded. The restart button was right where I tapped to launch.

I loved the simplicity, it was fun!

NooneAtAll3 4 hours ago [-]
I don't see the "orbital" part. Ship flies in straight lines

Doesn't seem that hard, just a boredom endurance

panstromek 2 hours ago [-]
The game is pretty fun. Page height is a bit wrong on mobile, you probably need some dvh height?
panstromek 2 hours ago [-]
Also, the game is much faster on desktop, looks like it's maybe not framerate independent?
rikschennink 5 hours ago [-]
Nice, enjoyable.

I did however expect the stars to attract my ship, that combined with the top down gravity vector made it less intuitive.

It also makes it feel like a game happening in earths atmosphere instead of space, it impacts the possible sense of scale.

Still fun :)

tuo-lei 4 hours ago [-]
The single HTML file as a distribution format is really underrated. No server, no CORS issues, no CDN — just open the file. It works offline, you can email it, and it'll still work in 10 years.

I ship self-contained HTML files for a different project and the sneakiest gotcha is </ sequences inside inline <script> tags — the browser sees </ and tries to close the script tag prematurely. You have to escape them as <\/. Curious if the author ran into that one.

Fun concept for the format too — games are the perfect use case.

cubefox 3 hours ago [-]
That's the silliest LLM comment I saw in a while.
est 3 hours ago [-]
hmm, it isn't strictly gravitational projectile movement isn't it?
rustyhancock 3 hours ago [-]
Love it, but bro you got to make the process of staying playing in the first 2 minutes simpler.

Right now the first 5 or so times you miss. Probably the first 5 times you try.

You get an annoying process of having to shift you hand to press the play again button.

The solution is easy as checking what the game score and high score is, if it's 0 just restart.

I don't need or want to hear about how to sign up to your mailing list if I've just fallen flat on my face!

There's a reset button but it seems to do nothing and you end up at the play again screen.

dawie 2 hours ago [-]
Super cool, super addictive :-)
JohnnyLarue 5 hours ago [-]
I have never been worse at a game than I am at this one
thenthenthen 2 hours ago [-]
Same! I suck at this! I noticed that clockwise slingshots seem harder to time for me than anti-clockwise ones… weird
kortex 3 hours ago [-]
Super fun! But the text does get in the way mid-combo.
russellbeattie 4 hours ago [-]
The use of the Web Vibration API Navigator.vibrate() is well done! I haven't seen it used much, but it really adds to the game.

(Apparently iOS still doesn't support it [1]? It's been in Chrome for the past 12 years. Maybe someday.)

1. https://developer.mozilla.org/en-US/docs/Web/API/Vibration_A...

lagniappe 5 hours ago [-]
This thing is so fun. My best was 17, better than 94% :)
karim79 5 hours ago [-]
Brilliant game. Thank you so much for this.
potatoproduct 5 hours ago [-]
Good fun, my highest was 30, it took a while!
WhereIsTheTruth 2 hours ago [-]
When you go fast, the text in the center ruins visibility, hurts gameplay

Good art style, terrible UX

You didn't play the game you created

imiric 2 hours ago [-]
This is neat, but the tap to release controls are unintuitive for me. I much prefer the variant of this game that uses hold, drag and aim as input. This allows much greater control, is more engaging, and thus feels more rewarding and fun. Plus, there's no waiting period for the ball to circle back to where you want it to be.

Tangentially, this is also why I dislike the modern trend of auto-shooters and idlers. The twin-stick shooter is by far the superior control scheme for this type of game, yet for some reason people enjoy having less control and engagement. I never got the appeal.

kokopelli 2 days ago [-]
This is great. Very addicting.
4 hours ago [-]
neuzhou 3 hours ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 10:37:16 GMT+0000 (Coordinated Universal Time) with Vercel.