4 ms·
Golf game built last night with Claude Code, Svelte and ThreeJS
- jaggs 8mo agoAh, excellent. I too recently created a golf game with Sonnet and that ai game maker who's name I forget. :) https://gerry7.itch.io/fairwayfun https://gerry7.itch.io/fairwayfun
- fuzzfactor 8mo agoThis is the winner by a large margin. The others don't even work without reducing browser security.
- jaggs 8mo agoWhy thank you.
- adamtaylor_13 8mo agoI love that we can explore things like this without a huge time investment. I made a game that reminded me of the Spybotics: The Nightfall Incident It's at https://adamtaylor13.github.io/botnet/ https://adamtaylor13.github.io/botnet/ if anyone wants to try it. It's still pretty rough compared to the original but, it's been fun enough for my kids to play!
- parallax_error 8mo agoI sunk the ball, but the game didn’t end so I happily hit it back out of the hole!! Pretty fun though
- Spacemolte 8mo agoNot sure what to say, looks cool. One hit and then the ball kept rolling, very slowly, seemingly without any friction. Sorry but can't wait until this whole AI situation finds a proper balance.
- pawelwentpawel 8mo agoI've been working with physics engine (cannon then rapier) + three js recently using Claude and found that AI was struggling quite when it came to fine tuning physics constants (friction, weights etc.) quite a lot. A human touch was needed - ended up vibe coding a small debug / admin panel where I could adjust those manually.
- williamcotton 8mo agoSeems fun! It can take the ball a long time to reach a stop, so maybe either skip ahead or use a friction coefficient that is higher when it is rolling?
- mrybczyn 8mo agoseems fun. needs more physics :)
- paulbjensen 8mo agoYeah it's still a bit buggy on that front, will try and tweak it manually to get it right. Fun bit, if you hit the ball against the billboard on desktop, it will open the link for the billboard advert and then bounce off.
- aed 8mo agoThis is great and I’d love to hear more about what worked / what didn’t / how you achieved these results. A couple of months ago I worked with my 9 year old to have Claude build a little game with threejs. We’ve now got three levels with characters shooting silly string and banana guns. It was really fun to see him imagine something, have it show up on the screen, and iterate it. Anyway, I tried building an LLM-backed workflow that could guide kids through the game creation process and kids can see their idea come to like (think: “sparkly purple unicorn shoots stars at a dragon”). I couldn’t _quite_ get it to work like I wanted so I shelved it pending future ideas/improved models.
- paulbjensen 8mo agoThanks for your comment, game creator here. Some background. I'm a 20-year software full-stack developer (started with Ruby on Rails, then moved to Node.js. These days doing a lot of Next.js/React, and some Svelte in my spare time) - as well as Astro. I'm the author of Manning's "Cross Platform Desktop Applications" - http://manning.com/jensen http://manning.com/jensen. And this is my GitHub profile: https://github.com/paulbjensen https://github.com/paulbjensen I run a 1-man web product studio: https://anephenix.com https://anephenix.com So, last year after finishing a contract at Volvo Cars, I took some downtime and dabbled with learning Svelte, and managed to recreate a silly little prank I made when I was working at a web agency called New Bamboo many years ago. That little prank then got iterated on, and is now the music editor app at https://lets-make-sweet-music.com https://lets-make-sweet-music.com. After that, I created a simple ball-table game using Svelte and Threlte, which is a wrapper around the excellent ThreeJS library. Once I realised that Threlte had support for Rapier physics, I realised that I could make a game, so I made this: https://3d-garden.vercel.app https://3d-garden.vercel.app Usually when you hit a blocking issue, you'd google around and probably end up on Stack Overflow. But last year I increasingly found myself using ChatGPT (I have a $20pm subscription) to ask questions and copy/paste snippets of code for suggestions on how to resolve a blocker. That process turned out to yield some good results, so I was able to iterate on my ideas and get quite far. My only real limitation is that I have a tendency to lose interest in projects and end up jumping from one project to the next. I also started looking at making a LLM-bot interface to try and create a cyclical loop of bots making other bots do things and implementing the feedback loop. I also managed to implement an isometric game engine based on an example I'd made using Löve2D (a game engine in Lua), but this time written in TypeScript and using HTML5 canvas. I managed to work on that for quite a bit, but as usual ran out of passion. In theory, if I can resurrect my passion on it, then I could get it to the stage where it would be possible to play a SimCity-2000/3000 like game entirely in the web browser. You can see it here http://babsland.com http://babsland.com Based on the work across those side projects, I managed to extract out a library for emitting events http://github.com/anephenix/event-emitter http://github.com/anephenix/event-emitter - the purpose being to easily decouple Svelte components and make the logic within those components more modular. I took up the opportunity to work with a former boss at an e-commerce company based in Sweden, so I recently moved here. It was during that time that I learned that the team had been dabbling with Claude Code, which I hadn't used at all. I then decided one weekend to have a go at trying to build a pixel editor for Babsland, but rather than do it by hand, I decided to try out Claude Code with the Zed Editor (I needed to switch from VS Code because my apartment didn't have electricity for the 1st week, so I relied on charging devices at work and a great hotel - Scandic Centralen in Gothenburg). I realised that VS Code being an Electron app (after all I wrote a book on Electron and Nw.js) was using a lot of battery, so I switched to Zed. In a couple of hours at the hotel, I managed to build the beginnings of a pixel editor - which is now https://www.babspixel.com https://www.babspixel.com. It was a revelation of an experience. I wrote about it on a LinkedIn post here: https://www.linkedin.com/feed/update/urn:li:activity:7419056598972547072/?originTrackingId=uuZ9Csr39JT7QYno47Ildg%3D%3D https://www.linkedin.com/feed/update/urn:li:activity:7419056... Since then, I then tried it out on Let's Make Sweet Music, and added a whole bunch of features and instruments: https://www.linkedin.com/feed/update/urn:li:activity:7425600094902665216/?originTrackingId=gt5lbHsqiZDvXLY%2BnXCxGQ%3D%3D https://www.linkedin.com/feed/update/urn:li:activity:7425600... You can see an example of dragging and dropping a MIDI file of Guns 'n Roses Welcome to the Jungle and playing it with the guitar instrument. I also managed to code up a silly little game called "Mr Spanky's Meatballs" where you lob meatballs are characters and try to survive for as long as you can, again built in a few hours with Claude Code. The golf game was an idea I joked with making with my former colleagues from New Bamboo (we keep in touch online to this day, a testament to how good that group of developers were). I then started coding it with Claude Code on Friday evening, and posted about it less than a day later. I'm using the Claude Code Pro subscription ($20pm), not the Max subscription, so I regularly run into the session quota limits, but that's fine because that allows me to sleep and have a normal work/hobbies/life balance. As someone who I guess you could describe as a creative developer, I'm so excited by what is possible with these AI tools, and I think that in terms of the software industry, the genie is out of the bottle - I think the biggest challenge is going to be ensuring that the quality of the output improves and meets the threshold we expect - for example, that game has various bugs which others in the comments have noted. For games and fun side-projects, I'm happy to delegate the coding to AI tools and perform a manual feedback loop of asking it to make one feature/fix at a time, reviewing the output, and either iterating on that, or moving onto the next feature/fix to do. As for work, I'm not yet confident enough to use AI tools the way I have been using them with side projects. In fact the first thing we're doing with our new project is putting E2E tests in using Cucumber and Playwright so that we can verify that the application (the combo of backend, frontend, databases and other services) works and that we can have confidence in deploying it when those E2E tests pass. I think that we are in a major transition phases in our industry, and that there is still work to be done to yield the results we want from AI (in terms of quality, accuracy, not hallucinating libraries or API calls that do not exist). I also want to say that having spent years working with React, I really love the developer experience of using Svelte, and I choose to use it for my side projects now.
- bottlepalm 8mo agoCool, ground needs a bit more friction on the grass area, but still cool.
- kudithipudi 8mo ago[dead]
- kittbuilds 8mo ago[dead]
- cluckindan 8mo agoStrictly speaking, this is not yet a game, as the main goal cannot be completed: getting the ball in the hole does nothing.
- kachapopopow 8mo ago/skill:make_hn_frontpage_submission create a golf game the domain is the-golf-is-golfing.com deploy using <...> use svelte. I don't know, it just feels so low effort when it's just "look what AI made", not a writeup of how the golf game was made, problems experienced, back and forth needed. I know this works because I have a real /skill:create_website command that does just that, except that it only has to create dockerfile + push + kustomize apply and the domain is automatically taken care of
- throwaway150 8mo ago> it just feels so low effort when it's just "look what AI made" I don't know how many more of these posts will hit HN front page. It's like this forum has been taken over by vibecoder sloppers. what is the intellectual curiosity in "Look, AI made this stuff" if there is not even an analysis of what was done. What are we supposed to learn from it or be curious about? Yet these posts keep hitting the front page everyday.
- kachapopopow 8mo agokeep flagging it and it will hopefully go away :)
- paulbjensen 8mo agohttps://x.com/GloryDoge/status/1997847141667209490 https://x.com/GloryDoge/status/1997847141667209490
- ThrowawayR2 8mo ago"Taken over" incorrectly suggests that they weren't already among us. HN has had a significant population for many years now who were unashamed to say they only became software developers for the high pay, had no interest in playing around with computers, coding, or hacking beyond the minimum needed for their career, and never valued or used their CS education. Now these never-wanted-to-be-coders have AI tools that lets them not code and they celebrate AI successes as vindication of their preference for not-coding.
- deleted 8mo ago[deleted]
- deleted 8mo ago[deleted]
- sublinear 8mo agoThe choice to make a golf game with AI seems a bit ironic. Getting a project onto the green seems tantalizingly close, doesn't it? Making games people actually want to play is hard with or without AI and developer skill has little to do with it. Even the most pro-AI individual has to see the long tail of tedious work left here. At least on mobile, the controls are floaty and imprecise. The camera is at a strange angle making it hard to see what you're doing and made even worse by the HUD in the way. There's only one course: a straight. The course itself looks glitched out. The hole seems out of proportion to the ball. This is just my initial impression after 5 minutes. There's likely a lot more. What's worse is that to really fix these issues, a human at some point has to comprehend and undo a lot more than they bargained for. One would hope we're finally done with the dismissive arguments that "AI will only keep getting better" or that these are just nitpicky refinements. The remaining work is the most time consuming, and even when finished the result will just be mediocre. Mediocrity isn't mere incompetence, but being asleep at the wheel when the ideas that are foundational to a project are being made. Any statistical model, such as generative AI, is wholly concerned with broad brush strokes. I do see some value in using AI to find (rough) examples of code that wouldn't exist otherwise, but I wonder how much this further limits the creativity of people who are already stifled by media overconsumption and already conditioned to overlook details.
- danvoell 8mo agoThanks you inspired to make slop too. 2 passes on cursor for my skifree2.0 game in honor of the olympics - https://danvoell.com/ski/ https://danvoell.com/ski/
- chasd00 8mo agowhy is this flagged? i wanted to come back to this and show my kids but couldn't find it. I had to use the search at the very bottom of HN.
- paulbjensen 8mo agoYeah I'd like to know too. I presume I should have put "Show HN" beforehand. Perhaps this isn't the place to post demos of what is possible with tech nowadays.
- kzahel 8mo agoI've been working on this one for a few days now (building with my daughter) https://kyle.graehl.org/tilefun/ https://kyle.graehl.org/tilefun/ (source at https://github.com/kzahel/tilefun https://github.com/kzahel/tilefun) adding peerjs multiplayer right now!
- irenetusuq 8mo ago[dead]
- gorpy7 8mo agoProgramming is hard, even for someone who has an interest in it. i know some c# just for selenium work- honestly im quite terrible and have too little concentration or innate skill to get anywhere. i’ve made attempts but they fizzle. Those barriers of esoteric knowledge are folding like card castles now. would it be helpful to understand perfectly the underlying principles, heck yeah, but i want to see my visions for different programs come to life! apps that i believe don’t exist. I sincerely don’t mean it as jab to the author but programmers tend to be rigid thinkers and it’s totally practical to do PoC on golf but yeah, rigid thinking doesn’t always result in novelty. let’s let things play out and see what happens when this sort of capability reaches other creatives/types of people. and as the tools strengthen and expand.