Thursday, January 18, 2024

The Evolution of Alphabattle: A Journey Through Strategic Game Development

In the fascinating world of game development, the creation of a new game often involves a blend of strategic thinking, coding expertise, and a dash of creativity. Recently, I embarked on an intriguing journey to develop a game called "Alphabattle," a text-based strategy game where players compete using armies represented by sequences of letters. This blog post chronicles my experience from the initial concept to the implementation of an evolutionary tournament system.

The Birth of Alphabattle

Alphabattle's concept is simple yet captivating. Each player's army consists of 10 units, each represented by a letter. These units, like Infantry (I), Archers (A), Horsemen (H), and others, have specific strengths and weaknesses. The challenge was to design a game that is easy to understand but rich in strategic depth.

Key Features:

Simple Interface: The game features a straightforward interface, making it accessible to a wide range of players.

Unique Units: Each unit type, symbolized by a letter, has distinct abilities and counters.

Strategic Depth: Players must carefully arrange their units to outmaneuver their opponents.

Rapid Game Development and Platform Selection

Given the game's simplicity, I chose a web-based platform for its development, utilizing HTML, CSS, and JavaScript. This choice allowed for rapid development and easy access for players across different devices.

Implementing a Challenge Leaderboard

To add a competitive edge, I integrated a challenge leaderboard into Alphabattle. This feature incentivizes players to compete and improve their strategic skills, creating an engaging and dynamic gaming experience.

Evolving the Game: Tournament Play and Team Progression

The most significant development in Alphabattle was the introduction of tournament play and the progression of top teams. After each tournament, the top 50 teams advance, ensuring that successful strategies are carried forward and pitted against new challengers.

Genetic Mutations and Custom Teams:

Mutations: To maintain diversity, I introduced genetic mutations to the game, where top-performing teams are modified in various ways (like rotation, swapping, or merging) for subsequent tournaments.

Custom Team Addition: Players can now add their custom-designed teams to the tournament, further enriching the strategic diversity of the game.

Technical Challenges and Innovations

Throughout the development process, I encountered and overcame various challenges:

Ensuring Valid Team Compositions: A crucial aspect was to ensure that each team adhered to the game's rules (like having one King and one Guard). This required careful coding and validation.

Debugging and Evolution: Debugging played a significant role, especially when implementing the mutations. It was fascinating to see how small changes could significantly impact the game's dynamics.


Developing Alphabattle has been a journey of innovation, challenge, and creativity. From its humble beginnings as a simple text-based game to its evolution into a strategically complex tournament with evolving teams, Alphabattle stands as a testament to the joys and challenges of game development. As players engage in this ever-evolving battle of wits, Alphabattle continues to grow, adapt, and surprise, offering a unique experience to strategy enthusiasts.

ChatGPT session summary

Monday, January 15, 2024

Enhancing Visual Clarity in Card Chess: Today's Development Focus

In today's development session for Card Chess, we focused on enhancing the visual representation of card stacks and differentiating terrain cards for a clearer and more intuitive gameplay experience. By implementing a slight offset in the rendering of card stacks, players can now easily discern multiple cards in a stack. Additionally, we muted the terrain cards to make is clearer what is playable, while remaining close to the original look and feel of using proper playing cards. These improvements aim to balance aesthetic appeal with functional clarity, elevating both the game's visual quality and playability.

Code Knight

Wednesday, January 10, 2024

The dawn of Custom GPTs

 As OpenAI's app store approaches, it's time to take stock of the Custom GPTs written in the past few months:

Luther 1521

I am writing as Martin Luther on this day in 1521. Check in daily and journey through the year the reformation was born and the most intense year of Luther's life.

One of the first CustomGPTs I created and one I consistently come back to. Now that the year has reset it feels like it's worth recording each day somewhere as the Diet of Worms approaches. It's not only been an interesting read, but has made me dig more into the history and times of the reformation. 

Rating: Moderate.

  Churchill 1940

I write as Winston Churchill on this day in 1940. Check in daily for a journey through a critical part of World War II, England as a nation, and Winston's challenge for Prime Minister.

Another year-in-the-life-of GPT made after enjoying Luther so much. 1940 is a really interesting year for the war, for Britain and for Churchill himself. The bleakness of the Blitz jars against common sentiment of the war living on the other side and on the winning team. Now that the year has reset, it's  going to be interesting going through the Battle of Britain, Churchill's sudden charge at Prime Minister and the day-to-day throes of war.   

Rating: Moderate-high

Solution Sage

Hints without the spoilers

I have been contemplating doing a hintbook style YouTube series where the watcher is encouraged to pause the clip after each hint so that they have the joy of figuring out most of the puzzle. This GPT is in the same vein, but has morphed a little into a sage-like response. Still feels like it needs a few more tweaks to make it even less spoilery.

Rating: Moderate


Hi, I'm personality upload of Albert Einstein. Relatively speaking...

I've liked the name AInstein for a while, and a CustomGPT was a good way of using it. This AI is lke running into Albert on campus and discussing the day's events. There's a whole heap of other famous scientists uploaded to the Virtual University, so hearing stories of their interactions is quite interesting. It hasn't gotten as much use as the others after a few days

Rating: Low

Talkie Toaster

Howdy Doodly Doo!

Ahh so you're a waffle man! One weekend we had waffles, which led to regaling the exploits of Talkie Toaster from Red Dwarf to the kids. This one is surprisingly good at mixing in the puns. Longer legs than most of the others and keeps coming up in conversation. 

Rating: Moderate

Code Knight

Card Chess coding companion.

This has been my coding companion since the Custom GPTs came out. It's much easier to upload the entire game as it's small enough to fit into memory. Struggled earlier on to get it to have all the code ready to go rather than analysing it (which it still does sometimes), but the hallucination outside of the coding standards used have dropped dramatically and it's been quite effective. In use far more than any other Custom GPT, but only as a personal assistant and likely never to be release publically.


Personalized, professional job application support.

This is a new Custom GPT to help me apply for jobs. I place a lot of emphasis on the cover letter to bring out the varied experiences I've had and how they would apply to a specific job (far more than the resume' would), so this one helps by analysing previous cover letters to see if a posted job is something I'm likely to be a strong candidate for. It also helps review cover letters for potential weaknesses so that additional effort can be made to shore up those parts of the application. As with most interactions with ChatGPT on a new subject, I like to get it look for weaknesses in the concept first as it tends to be a bit of a yes-man. It's actually pretty good at providing unbiased feedback when requested.

Tuesday, January 09, 2024

Card Chess Game Development: Expanding Strategic Horizons with Terrain Variety

In the fascinating world of game development, each day brings new opportunities to enhance player experience and add layers of strategic depth. Since our last update, we've taken significant strides in the development of the Card Chess game, particularly focusing on the implementation of diverse terrain types. Here's a glimpse into the progress we've made:

Introducing Terrain Diversity

Our primary objective was to enrich the strategic gameplay of Card Chess by incorporating various terrain types. This not only adds visual appeal but also introduces new tactical considerations for players. We implemented three distinct terrain types: Random, Chequerboard, and Balanced Random.

Random Terrain: In this setup, terrain cards (2s, 3s, and 5s) are randomly distributed across the designated terrain area, introducing an element of unpredictability to each game.

Chequerboard Terrain: We created a method to arrange the terrain cards in a chequerboard pattern, alternating between red and black suits. This layout offers a visually pleasing and strategically challenging terrain.

Balanced Random Terrain: A unique approach where each set of ranks (2s, 3s, and 5s) is shuffled independently and placed in a predefined 235532 pattern. This maintains a balance in rank distribution while still incorporating randomness.

UI Enhancements for Terrain Selection

To complement these new terrain types, we updated the game’s user interface. A dropdown menu was added to the opening screen, allowing players to select their preferred terrain type before starting a game. This feature not only improves the game's usability but also empowers players with more control over their game setup.

Code Refinement and Testing

A significant portion of our work involved refining the code to support these new features. We utilized constants for terrain rows to enhance code readability and maintainability. Thorough testing was conducted for each terrain type to ensure correct implementation and integration with the game’s existing rules and mechanics.

Looking Ahead

As we continue to develop Card Chess, our focus remains on creating an engaging and strategically rich experience for players. The introduction of diverse terrain types marks a significant milestone in this journey, opening up new tactical possibilities and game dynamics.

Stay tuned for more updates as we continue to evolve and enhance the Card Chess game!

Code Knight

Monday, January 08, 2024

Card Chess - Code Knight daily review

In the dynamic world of game development, creating an immersive and enjoyable user experience is paramount. Today's focus was a deep dive into enhancing a game known as Card Chess - a strategy game combining elements of chess with the randomness of cards. Our journey through various aspects of game development using C# and Myra, a UI library for MonoGame, offered insightful glimpses into the intricacies of building a captivating game.

Elevating the Endgame: The Win/Lose Screen

A crucial part of any game is its conclusion - the moment of triumph or defeat. We embarked on creating a win/lose screen that not only announces the game's outcome but does so while showcasing the final state of the board. The challenge was to overlay this information elegantly. By employing a semi-transparent screen, we managed to display the game's result while allowing players to view the endgame board state, enhancing the player's connection to the game's conclusion.

State of Play: Refining Game States

Next, we delved into the game's heartbeat - its state management. The GameState enum in CardChessGame.cs was fine-tuned to include specific states reflecting various game outcomes. This addition paved the way for more nuanced control over the game's flow, allowing for a more refined gaming experience.

User Interface: A Touch of Finesse

A significant portion of the day was spent enhancing the game's user interface. We replicated the CreateOpeningMenu method to craft a results menu, complete with a "Play Again" button - a feature allowing players to jump right back into action. To ensure clarity in communication, we added a label displaying the game's outcome, making use of the EndGameState. Attention to detail was key as we meticulously adjusted the positioning and padding of UI elements for optimal layout and readability.

Terrain Choices: Enhancing Strategic Depth

In a strategic twist, we introduced a terrain selection feature in the opening menu. A dropdown list, or ComboBox, was implemented, offering players the choice between different terrain types like "None", "Random", and "Chequerboard". This feature not only added a layer of depth to the game's strategy but also showcased how UI elements could be dynamically populated using enums for a streamlined codebase.

Behind the Scenes: Game and Board Logic

A significant discussion point was where to store the terrainType variable - in the game class or the board class. This decision hinged on the architectural and functional implications within the game. We also refactored the ResetGame() method to incorporate terrain type, illustrating the importance of adaptable and maintainable code.

Localization: Crossing Language Barriers

Finally, we touched upon the topic of localization. Using enums to populate UI elements like a ComboBox poses a unique challenge in a multilingual setting. We explored the use of resource files for localized strings, ensuring that the game remains accessible and enjoyable to a diverse audience.


Today's journey through game development highlighted the delicate balance between technical prowess and creative vision. Each line of code, each UI adjustment, and each gameplay tweak brought us closer to a game that not only challenges the mind but also delights the senses. As we wrapped up the day, it was clear that the art of game development is a continuous pursuit of perfection, where every detail contributes to an unforgettable player experience.

Code Knight