Live data from Hacker News

Show HN: I AI-coded a tower defense game and documented the whole process

github.com

51–60 of 163 posts

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#51
post #44

Earlier quoted context omitted.

Huh, that's actually my exact bug. I didn't realize this was so hard, thank you.

I have a reasonably good solution for this project of mine you might find useful: https://grack.com/demos/adventure/ The trick for me was just using a hidden input and updating the state of an in game input box. The code is ancient by today's standards but uses a reasonably simple technique to get the selection bounds of the text. It works with auto complete on phones and has been stable for a decade.

That's promising, thank you! I'll ask the LLM to implement it.

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#54
post #30

I'm really enjoying reading over the prompts used for development: ( https://github.com/maciej-trebacz/tower-of-time-game/blob/ma... ) A lot of posts about "vibe coding success stories" would have you believe that with the right mix of MCPs, some complex claude code orchestration flow that uses 20 agents in parallel, and a bunch of LLM-generated rules files you can one-shot a game like this with the prompt "create a…

> what works best with AI-coding: a strong and thorough idea of what you want, broken up into hundreds of smaller problems

A technique that works well for me is to get the AI to one-shot the basic functionality or gameplay, and then build on top of that with many iterations.

The one-shot should be immediately impressive, if not then ditch it and try again with an amended prompt until you get something good to build on.

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#55
post #6

This is awesome. I've been in software for 20+ years now as well. One thing I've noticed is many (most?) people in our cohort are very skeptical of AI coding (or simply aren't paying attention). I recently developed a large-ish app (~34k SLOC) primarily using AI. My impression is the leverage you get out of it is exponentially proportional to the quality of your instructions, the structure of your interactions, and t…

> The difference is the specific leverage is 10x any other "10x" tool I've encountered so far. So, just like every tool, only more so.

One of the best comparisons to me is languages.

The old "lisp [or whatever] lets us do more, faster" idea, but with a fun twist where if you can reduce the code you write but still end up with generated code in a fast, high-performance language, without the extra work you would have to do to go add type annotations or whatnot everywhere for SBCL.

But with a gotcha that you are gonna have to do a lot of double-checking on some of the less-easily/obviously-verified parts of the generated code for certain type of work.

And of course highly-expressive languages have resulted in no small number of messy, unmaintainable codebases being built by people without well-specified advance plans. So we're gonna see a lot of those, still.

BUT to me the real, even bigger win - because I spend less time writing 100% new code than integrating old and new, or trying to improve old code/make it suit new purposes, is supercharged debugging. A debugger is a huge improvement over print statements everywhere for many types of things. A machine that you can copy-paste a block of code into, and say "the output looks like [this] instead of like [that], what's going on" and get a fresh set of eyes to quickly give you some generally-good suggestions is a huge improvement over the status quo for a lot of other things as well. Especially the type of things that are hard to attach a debugger to (sql, "infrastructure as code", build scripts, etc, just to start).

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#56
post #6

This is awesome. I've been in software for 20+ years now as well. One thing I've noticed is many (most?) people in our cohort are very skeptical of AI coding (or simply aren't paying attention). I recently developed a large-ish app (~34k SLOC) primarily using AI. My impression is the leverage you get out of it is exponentially proportional to the quality of your instructions, the structure of your interactions, and t…

I've come to this same conclusion pretty strongly in the past few months in particular. I actually had negative comments on my experience with AI previously. For all the talk of AI hitting a ceiling the latest tools have improved greatly. I'm literally doing things in hours that'd previously take weeks with little issue. I do of course have to think about the prompts and break it down to a fine grained level and i al…

> I'm literally doing things in hours that'd previously take weeks with little issue.

What's an example of this? Some of the ones I see most are: converting legacy code to something modern, building a greenfield app or feature in an unfamiliar language / framework / space.

But at work I don't have these types of jobs, and I want to get this productivity speed up, but right now I'm stuck at it helps a lot but not turning weeks of work into hours, so trying to get there

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#57
post #12
post #6

This is awesome. I've been in software for 20+ years now as well. One thing I've noticed is many (most?) people in our cohort are very skeptical of AI coding (or simply aren't paying attention). I recently developed a large-ish app (~34k SLOC) primarily using AI. My impression is the leverage you get out of it is exponentially proportional to the quality of your instructions, the structure of your interactions, and t…

I commented on this before, I'm in this weird "opinion arbitrage" spot where I'm relatively skeptical by HN standards but I'm actually pushing for more usage at work. Hell, I'm typing this while I wait for Claude to be done. The reason for my skepticism is the delta between what they're being sold as and what they actually do. All AI solutions, including agents (especially agents!), are effectively worse-than-worthle…

My stance has long been that LLMs are currently worse than the evangelists are claiming they are, but are significantly better than the detractors and skeptics think they are.

Like most things, the truth is somewhere in the middle. But unlike many things, they are changing and advancing rapidly, so it's current state is not the resting state.

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#58

After scanning through the video, the first 20 minutes is a guy doing coding with no AI involved. He's manually designing a level in a pre-made level editor. He's manually writing code in a pre-made IDE. He's not having AI code. At the 20 minute mark, he decides to ask the AI a question. He wants it to figure out how to prevent a menu from showing when it shouldn't. It takes him 57 seconds to type/communicate this to…

One could find a 5-minute slice of any highly successful project I’ve worked on where my actions look foolish and my tools look broken.

Isolating your analysis of this to a single unflattering interaction is intellectually dishonest; you have a bone to pick.

Re: Show HN: I AI-coded a tower defense game and documented the whole process

#59
Thanks for sharing! This aligns with a workflow I've been converging on incorporating traceability and transparency into LLM-augmented workflows[1]. One of the big benefits I've realized is sharing and committing prompts gives significantly more insight into the original problem set out to be solved by the developer, and then it additionally shows how it morphed over time or what new challenges arose. Cool project!

[1]https://colinmilhaupt.com/posts/responsible-llm-use/

Post reply on HN