Captain Disaster the Computer Game is the main home of the Captain Disaster adventure games and related projects by Dave Seaman. The site brings together information on the games themselves, along with screenshots, trailers, walkthroughs, media coverage and occasional side projects. Most of the focus is on comedy adventure gaming, with a mixture of freeware releases, commercial titles and experimental smaller works. No generative AI is used in any of the Captain Disaster games. I do experiment with AI in other contexts, and where I've blogged about these, I clearly indicate this.
Showing posts with label chat gpt. Show all posts
Showing posts with label chat gpt. Show all posts

Wednesday, 23 July 2025

Secure Password Generator - made with AI

Secure Password Generator

Your secure password will appear here.


Developer Notes

This was really quick and easy to make (used ChatGPT), probably because it's a very simple operation with clear and easily definable paramaters.

Tuesday, 15 July 2025

Noughts and Crosses and Wildcards, Oh My! - a JavaScript game created using AI tools

Wildcard Grid Game

Wildcard Grid Game

Scores — Player: 0 | AI: 0

AI Move Log

Game Rules

  • 6x6 grid
  • 4 wildcard (?) symbols randomly placed — never adjacent or on outer edge
  • Players take turns (Player = O, AI = X)
  • Wildcards count as either O or X for scoring
  • Scoring:
    • 3 in a row = 1 point
    • 4 in a row = 2 points
    • 5 in a row = 3 points
    • 6 in a row = Instant win
  • Game ends when no empty cells or no further scoring possible

 




Development Notes

Well, this was a weird one in terms of development, as I seemed to be constantly battling Chat GPT missing out new bits, or putting in the new bits but omitting what was already there. I'm still not quite sure whether it was because I didn't provide enough clarity in my prompts at times (I didn't think that was the case, but certainly something was going wrong!). I repeatedly hit the free data analysis limits and had to wait till the next day. What I present here is fully playable and incorporates all my game design ideas, although the AI opponent is pretty lacking in any meaningful challenge still.

For this game I took the classic Noughts and Crosses (Tic-Tac-Toe) idea and quadrupled the playing area - to a 6 x 6 grid - and allowed for runs of 3, 4, 5 and 6 in a row - the last one being an outright game winner, although technically it should be pretty much impossible for it to happen unless one player is really not paying attention! Then I added a scoring system for the runs, obviously longer runs bringing higher scores, and also added 4 randomly-placed wildcard symbols ("?") which could work as either O or X, depending on what was next to it. That was probably the trickiest aspect for the AI to understand and build working code for.

With the slightly hit-and-miss results from asking the GPT to update the code, there are a couple of things missing from this build. (It was like a game in itself, where version control had random elements!) I did have it highlighting the scoring phases briefly but this got lost from the "final" code. I may possibly go back to it and re-implement this, and improve the AI, but for now it's a playable enough game so I'm going to leave it alone for now. May be for my next project, I'll try creating a game that doesn't involve an opponent - I wonder if this will be easier. 

We shall see!!!


See also my first game experiment - just standard Noughts and Crosses.

More about my experiment to make simple JavaScript games with AI Tools.


Wednesday, 9 July 2025

Noughts and Crosses - simple JavaScript game created with AI

Your turn (X)





Development Notes


Gotta start small, right? So I started with the smallest game project I could think of - noughts and crosses, or "Tic-Tac-Toe", if you prefer. Since the visuals are extremely basic and the game logic is about as simple as it gets, not to mention that AI knew the rules without me having to tell it, getting an initial mockup was ridiculously easy. What took a little more effort was fine-tuning the AI opponent - even though (apart from the "unbeatable" level - draw on that to see a quote from War Games, an 80s movie I love) , it was basically a case of combining randomn placement and probability weighting to make the best moves (obviously, the easier the opponent, the lower the probability of it choosing the best move).

Then things like adding choices (difficulty level, who goes first) and how the game responds to game-ending events. It's very simple, but quite playable. I was glad I started with this as it was easy but also very informative as to how to structure the next, more ambitious project.

This game took 8 prompt iterations to reach the final stage. With prompting, testing and thinking time, I guess it took about an hour to put together. There is scope to expand it but I'm not really planning to (although I may possible get it updated to work better on mobile devices) as this was absolutely just a learning project and the real fun will be trying to create a game with a unique ruleset. 

About my experiment to make simple JavaScript games using AI tools

 In case anyone’s thinking that using AI tools to help create games is just a case of typing into ChatGPT “make me a game like Tetris, but better”, it isn’t. (Well, I guess in truth I haven’t actually tried that, but…) The thing with AI is that the quality of output you get is very much dependent on the quality of input you give it. Also, don’t expect that you can get what you’re looking for on the first go – you can try to front-load the first prompt with context and information, but that will still only get you so far.

So why did I want to experiment with using AI to make simple JavaScript games in the first place?

·         I have no interest in actually learning to code JavaScript – I simply don’t have the time. It took me long enough to learn AGS script (which is very similar to C++) which means I can usually follow what’s happening in JS due to similarities in the two languages structures, but I can’t code it. (I did code HTML many years ago, but really even back a couple of decades ago, most people were using a visual editor rather than hand-coding it anyway.)

·         I use AI quite extensively in my day job and have become fascinated by the possibilities. Like most people who have actually spent significant time learning about and using AI, I see it as simply a tool that can be used, and rather than deskilling it can be used to help people in certain professions focus on what their jobs actually should be, rather than spending most of their time on repetitive documentation tasks. I do appreciate that there are specific use cases where use of AI is highly controversial – art generation for instance – and I fully understand that viewpoint.

·         Linked to that, it seems to me that AI has been trained on coding that has been intentionally made publicly available. My goal is to leverage the strengths of AI – which is in producing clean, usable boilerplate code and implementing simple game logic – while avoiding trying to get it to do anything too complex. That’s where a real coder is still (from my understanding, at least) miles ahead of what a GPT can do.

·         Given that, I’m using an AGILE methodology – my process is a very simple three-tiered loop:

o   Think about what I want to achieve on this iteration

o   Create a prompt that explains this to the GPT as clearly as possible

o   Test the results, and go on to the next iteration (unless I feel the game has already reached its target state)

o   This is very small-scale stuff, just me working with AI, so I’m not bothering with even thinking of anything in terms of “sprints” etc.

What’s required from me in this case, since I’m not doing any of the actual coding? Well, first of all, I need the original idea. (My very first project was a simple noughts-and-crosses game, just as proof of concept, but my plan is to create some small but unique games.) Then it’s a case of knowing how to write high-quality AI prompts, and how to give it comprehensive, clear instructions that are not open to AI hallucinations. Along with this, understanding how the game should work at a fundamental level is required – if you’re just remaking noughts and crosses then yeah, no specific knowledge is needed, but if you want to create something unique, you need to first understand yourself exactly how it should work “under the hood” and then how to get that across to the GPT.

In theory, each iteration should take you nearer to the goal. In practice, I have found that whilst this is usually the case if my prompts are very precise, there is still room for the GPT to misinterpret what I’ve asked it to do (the blame for this can be shared between me and the GPT!)

 I’ve set certain limitations for myself – I only want to create something in vanilla JavaScript (with a little HTML / CSS thrown in for the page design), so no libraries allowed, it must be either a single player or player vs AI opponent, and it must run within a Blogger post (so I can put it here along with a short explanation of how the game was designed). I will also be using only the free Chat-GPT model, and (potentially barring some very small modifications to the HTML components) not directly editing the code myself.

My goals with this are simply to have a bit of fun seeing what I can come up with and learn a bit more about the possibilities and limitations of current free GPT models. I also needed something a little different to kick-start my brain – with what time I have available, hand-crafting games in AGS is still my main focus. When all’s said and done, there’s nothing quite like solving a tricky coding problem yourself!

Another small AI-adjacent experiment I’ve put together is a browser-based Eliza Emulator, inspired by the classic 1960s chatbot.”