Vibe Coding a Tower Defence Game in PyGame
hive-122422·@makerhacks·
0.000 HBDVibe Coding a Tower Defence Game in PyGame
 Along the same lines as my post yesterday, I wanted to try and post something positive to balance my highly skeptical output about AI so far. Before we do, here is how ChatGPT stopped me signing up for an online digital product. I have a lot of imposter syndrome so sales pages often appeal to me: > It’s positioned as a fast, reliable way to replace lost SEO traffic, backed by the seller’s claim of getting 2M+ visitors and $20K+ per month using this method. > Will You Learn Anything Valuable? > Probably not. Based on what I know about you: > You already understand social media strategy and online marketing. This product is aimed at SEO-dependent bloggers who don’t know how to use Facebook effectively. You’re way beyond that—you already teach social media strategies and are creating a mini-course on social media growth yourself. > The hook is heavily hyped. You dislike exaggeration and hype-driven marketing, and this sales page leans hard into fear tactics (e.g., “bloggers are losing everything,” “Google won’t save you,” “millions of visitors”). > You already know how to convert social media traffic into email subscribers. This product focuses on display ad revenue, not email list building or high-value conversions. > Your audience (introverts, coaches, course creators) doesn’t align with the tactics here. This system likely revolves around high-volume, low-engagement content that works for viral-style blogs (news, entertainment, clickbait). It’s not ideal for your audience, who need trust-based engagement and high-LTV strategies. ## Vibe Coding "Vibe Coding" is essentially telling an LLM *what* you want and letting it figure out the "how". It relies on these models having been trained on a lot of code and being able to "predicatively suggest" over and over. Right off the bat, I don't recommend "vibe coding" for the following reasons: * If gamedev is a hobby then this is like being a hobbyist painter but paying an artist to paint things for you. Are you in this for the result or enjoyment of the process? * These tools are limited so you will get into a rut where it struggles and finally ruins the working parts while trying to squash a bug. It can be both surprisingly brilliant and frustratingly stupid. * Finished code will have all kinds of holes and vulnerabilities. Parts will follow best-practices and others will be woeful. This is because it does not know nor care what it was trained on, and we know they were trained on user-generated content. Some of that user-generated content was maliciously bad or trollish. * Many gamers and marketplaces are turning against AI-generated offerings, plus the legal frameworks for who owns what are not clear. You might not be able to legally or practically sell your work even if it is amazing. ## The Good News It can really surprise you, and it can do things you didn't think of. I didn't really understand how that could happen until I saw it with my own eyes. But, of course it can, it is an autocomplete on [drug reference redacted]! ## Features Implemented So Far - **A* Pathfinding for Enemies** – Enemies calculate the shortest route to the base and adjust dynamically if blocked. - **Grid-Based Movement** – The game runs on a tile-based grid system, making it easy to manage paths and obstacles. - **Home Base at the Center** – The enemies’ goal is to reach and attack the base in the middle of the map. - **Placeable Walls** – I added a **right-click mechanic** to place or remove walls, blocking enemy movement. - **Real-Time Path Recalculation** – When walls are placed, enemies **immediately find a new path** if possible. - **Debugging Path Visualization** – I highlight the enemy’s path on the grid to visualize how the A* algorithm works. ## How It Works - **Enemies Spawn** at a predefined location (currently the top-left corner). - **Enemies Use A*** to **navigate to the home base**, choosing the shortest possible route. - **Players Can Place Walls** by **right-clicking** on the grid. - **Walls Block Enemy Movement**, forcing them to reroute. - **Right-Click Again to Remove a Wall**, reopening paths. ## What I Want to Add Next Here’s what I’m planning for the next steps: - **Multiple Enemies** – Right now, I only have a single enemy moving toward the base, but I want to introduce waves of attackers. - **Tanks That Destroy Walls** – Some enemy types should be able to break walls instead of just rerouting. - **Different Enemy Types** – Speed-based units, flying units (that ignore walls), or stronger, slower enemies. - **Towers That Attack** – At some point, I need actual towers that fire at enemies instead of just walls for blocking.
👍 khalstem, slider2990, zakludick, ripperone, brofund, brofi, joeyarnoldvn, upfundme, technologix, bozz.sports, nfttunz, surrealis, denizcakmak, iktisat, baltai, travelpic, beardoin, dab-vote, brofund-witness, dailydab, clubvote, pewsplosions, mytechtrail, usainvote, lolz.byte, slobberchops, chops.support, wanker, bingbabe, dismayedworld, fabulousfurlough, bings-cards, ninjakitten, grindle, plonketypiano, meesterboom, livinguktaiwan, shanibeer, becca-mac, celestegray, whangster79, kathrynkw, wisbeech, b00m, citizensmith, sazbird, steevc, bagpuss, leighscotford, enforcer48, admiralbot, steemflagrewards, memehub, aninsidejob, steemseph, melbourneswest, nftspecialists, retrodroid, magic.byte, mproxima, web-gnar, minedovermatter, ryosai, blessskateshop, stoken.quest, smjn, spiritabsolute, holovision.stem, stem.alfa,