Saturday, 22 February 2025

From Architecture to Game Development: A New Blog on Echoes of Myth

I’ve launched a new Echoes of Myth Development Blog, documenting my journey into game development and sharing insights from my first commercial game project, Echoes of Myth (https://www.echoesofmyth.com).

As an architect, I’ve always been drawn to designing complex systems. Game development, surprisingly, has a lot of parallels—balancing constraints, thinking procedurally, and iterating toward a final vision. In this blog, I’ll be sharing insights not only for gamers interested in Echoes of Myth but also for other developers and creators tackling their own projects.

  • How do you balance ambition vs. feasibility in a solo project?
  • What makes roguelike progression systems feel rewarding?
  • Why is cutting features one of the hardest but most necessary skills?

If any of that sounds interesting, check it out here: Echoes of Myth Dev Blog

Would love to hear your thoughts—especially if you’ve ever tackled a big creative project!

Saturday, 20 April 2024

Copyright and AI: Prediction on Future Direction

Discussions about AI and copyright are intensifying, with claims like "AI is theft!" becoming more common. As technology continues to advance, numerous lawsuits around the world are beginning to clarify how different political entities view this issue. However, I see these as temporary challenges in the broader context of technological evolution. Driven by strong incentives, technology is likely to develop in ways that navigate around existing legal frameworks. As a layperson in legal matters, in this post, I will explore potential developments over a 4 to 7-year timeline, offering my perspective on how these issues might unfold.

Under current law, copyright protection typically requires human authorship and grants the creator exclusive rights to reproduce, distribute, and display the work. This framework traditionally applies to works that are exact or substantially similar reproductions of original content. However, AI-generated works, which are created without direct human creative input, present a challenging anomaly. These creations often do not replicate existing works exactly but might instead remix or transform them in unique ways, complicating the determination of infringement. Moreover, the concept of training an AI—which involves learning from vast datasets including copyrighted material—hasn’t been explicitly recognized or regulated within existing legal frameworks, leaving 'training data' usage a significant gray area.

However, if we temporarily set aside the issue of copyrighted training data and consider the copyright approach for a hypothetically fully non-problematic AI and its creations, how would we copyright what is essentially a style of music, writing, or art? Given that people already produce works in styles similar to each other, any hypothetical approach seems likely to be overwhelmed by implementation details, edge cases, and false positives.

A common counter-argument involves what happens when someone requests art that resembles the style of a specific artist. I anticipate that most AI companies will implement safeguards to prevent explicit references to specific artists and might even omit such data from training sets. It remains common, however, to request a piece similar in style to an existing work, which could have been created through numerous disconnected steps.

Moreover, the issue of training data might be a temporary one. While current-generation AIs rely heavily on real copyrighted works, next-generation AIs are beginning to use more synthetic data. For instance, a first-generation AI might generate a large array of styles used as training data for subsequent generations. By the third generation, such an approach could involve only 5% original art, with the remainder so detached from any specific origin that mapping a ‘style lineage’ becomes impractical.

As we progress to scenarios involving "synthetic + explicitly licensed training data," the arguments based on lineage become increasingly untenable. The AI effectively bootstraps itself, severing ties with original works.

This scenario poses a dilemma for artists and copyright holders. From their perspective, the future does not seem promising. This piece is not about what should happen but rather what seems likely given current technological trajectories and societal incentives.

Unless a robust method for generically defining style is developed, and a new global copyright regime is established, significant changes in creative industries seem inevitable. And if such a global regime were to be established, it would be both draconian and highly problematic. Who defines a style? The first person to create something in it or someone who popularizes it? What about sub-styles, which exist in an infinite number of variations? Being inspired by any number of prior artists is how people usually find their own style after all, and AI certainly can blend styles.

The ongoing AI-related copyright debate also includes questions about who, if anyone, holds copyright over AI-generated works. On this sub-topic, I don't have a very robust view. Different countries will likely adopt varied stances, and much ambiguity will persist. Consider video games that use AI-generated art: where is the line drawn when half the assets are AI-generated, or when human post-modification is involved?

Ultimately, as the technology progresses rapidly, this debate may become mostly irrelevant. Brands, already a recognized concept, could evolve such that generating art, music, and writing becomes a simple matter of prompting. In such a future, copyright of individual works might become trivial, applicable only in a minority of cases, with content consumption increasingly focused on brands that serve more as quality stamps of a specific style, around which people can gather and share.

P.S. Note: The human touch will naturally retain value for some. I foresee 'artisan works' becoming a popular branding emphasis in the near future, catering to audiences who either abhor all things AI or simply crave the more subjective feeling of human connection. Notably, a portion of these works branded as such will indeed actually be created by humans.

P.S. Note 2: There are naturally many different fundamental assumptions here which, if incorrect, might cause a very different trajectory. Some worth mentioning are that larger utilization of synthetic data for AI training will be feasible (combined with a sensible percentage of explicitly licensed original works), societal movements to inhibit AI will not get significant enough to actually cause a global level slowdown, and capability development of AI progresses from its current state without encountering some entirely unforeseen blocker.



Tuesday, 23 May 2023

Budget-Friendly Revolution: AI's Impact on Game Development Efficiency

Overview

As a longstanding hobbyist and enthusiast of game development, I've gleaned a lot from utilizing AI for programming in my latest project, a topic I discussed in a previous blog post: https://contemplative-architect-journey.blogspot.com/2023/05/leveling-up-game-development-ai.html.


A recurring theme I encounter is the belief that "AI equals fully automated game generation," a notion swiftly countered with skepticism about AI's readiness to deliver on such a promise. This kind of binary thinking—believing AI is either a complete solution or irrelevant—is a misguided interpretation of the issue.


Looking ahead, a more probable trajectory sees AI tools being extensively employed to enhance productivity across the multitude of sub-domains that encompass game development. Games, along with all forms of interactive media, are in essence a complex tapestry of various artistic and entertainment sectors, with game development incorporating elements of many other fields.


Almost every sector has aspects that have already been enhanced by AI tools or have demonstrations of AI automation poised to become widespread in the next year. Granted, achieving the requisite robustness to deliver meaningful value in the short term may be challenging for some.


I anticipate the gradual integration of these AI tools into top-tier game engines like Unreal Engine and Unity, affording the many benefits that come with a comprehensive development environment supported by case-specific AI models.



Development Asset Categories


One key element common to all these use cases is that they don't demand perfection right out of the gate, making them well-suited for the inherently probabilistic AI assistance and generation. There's always the opportunity to generate a wide array of variations and evolve based on the most successful elements of earlier iterations.


Programming: Previously discussed in another post; a topic vast enough to merit its own focus.


2D Textures, Concepting and Art Generation: Tools such as Stable Diffusion, Midjourney, and Adobe Firefly (incorporated into the Adobe ecosystem) are continually expanding their capabilities, demonstrating the effectiveness of AI in this area.


3D Models: Techniques like NeRF scanning convert real-world objects into 3D models. Text generation allows for editing of NeRFs and creating new ones from scratch in a truly generative manner.


Animations: Text-based generative animations are being commercialized, and they can naturally be combined with AI-generated 3D models.


Game Design/Ideation/Mechanics/Story/Dialogue: Textual GPTs have proved to be excellent assistants in generating content for almost every part of the game development process. Specialized, productized tools are available for niche applications.


Level Design: Unity has announced AI integration, hinting at scene/level editing via textual input. Roblox already features some level of integration. Textual GPTs can assist with ideation, though not actual level design or scene population.


Music: Numerous productized music generation services provide consistent styles and themes, suitable for most smaller projects.


Voice and Narration: A variety of solutions offer natural-sounding voice synthesis and these have already been integrated along with GPTs to e.g. Skyrim to provide dynamic voiced NPC dialogue.


Sound Effects: Current tools primarily focus on automated search and matching, with generative models for creating effects from scratch emerging.


AI: Demonstrations of AI-driven NPCs exhibiting human-like interactions and emergent behaviors have been rated highly by evaluators. Tools for AI models to learn 3D environments and behave organically are increasingly being integrated into leading software.


QA: For unit tests, typical code tools apply. For functional level, AI bots can autonomously play the game, report anomalies, and provide valuable data for design improvements.


Marketing and Community: One of the earliest large-scale applications for GPT.


Project Management: Automated data collection, insight generation, and KPI tracking are becoming more commonplace. There are numerous sub-categories with more specific use cases.


Localization: Automated translation and voice synthesis tools are widely available.


Monetization: Machine learning and data analysis have been central to this category for quite some time.


Conclusion


AI's role in game development is not a matter of all-or-nothing automation but rather a testament to the gradual, potent enhancements AI can bring to diverse aspects of the creation process. From design to quality assurance, AI tools are already showing potential, and their integration into mainstream game engines is a realistic expectation. Despite the challenges in achieving robustness, the continuous advancement in AI technology promises a future where these hurdles can be overcome, thus enabling a transformation of the gaming landscape that will redefine our creative potential.


Monday, 22 May 2023

Leveling Up Game Development: An AI-Assisted Adventure

Overview

For the past half a year, a significant portion of my spare time has been devoted to a Diablo/Soulslike action RPG game development project. My productivity skyrocketed once I found my rhythm, and a notable contributor to this swift progress has been the programming assistant AI tools. In this post, I'll delve into the best practices that have helped maximize the benefits of these AI tools.



Tools Used


My game is based on the Unity engine and, of course, C#. I code primarily in Visual Studio, utilizing a few core assets as frameworks, tools or for inspiration, and program the game logic mainly by myself. However, I do borrow some logic from the existing Top Down Engine asset when appropriate.


While I source visual assets from traditional licensed outlets (the Unity asset store has been invaluable!), the programming is self-executed with the aid of ChatGPT premium and GitHub Copilot. Regarding ChatGPT, I've been using GPT4 exclusively as it far outperforms GPT3.5 for coding tasks due to reasons such as the increased token count, which allows for more contextual input, and the reduced error rate in smaller tasks.


For context, I'm quite adept with C#, able to craft high-quality code at a respectable pace, especially when the key design issues have been addressed. This proficiency significantly influences my usage of AI tools.


Approach


Recognizing the strengths and limitations of AI tools is crucial:

  • They're less proficient in creating meaningful structure and architecture – these, I must detail myself.
  • They struggle with large contexts, needing to ingest multiple custom classes or APIs accurately.
  • They excel at executing junior developer level tasks for a method or class of moderate size (100-200 lines max), assuming dependencies are limited to avoid exceeding GPT4 token limits.
  • They're adept at handling larger tasks that have seen frequent reiterations in the training data (complex A* pathfinding algorithms, sorting algorithms, etc.)

Understanding the AI output is also important. There's a growing trend (memes to be precise) of junior devs generating code via AI, which they don't fully comprehend, leading to lengthy debugging sessions. In my experience, having a clear vision of the task at hand, producing code that is easily understandable and refactorable, and then moving on has proven effective. Revisits to these AI-assisted implementations are rare except when the requirements change.


Initially, I leaned more on GPT4 but over time have started to use Copilot more frequently. The basic protocol is:

  • When the scope of a method or class is clear and likely around 50-150 lines (with few dependencies), I write the method signature and a number of TODOs outlining the functional or pseudo code stages. This is then copy-pasted into GPT4 for implementation.
  • More often, I start coding the class manually, letting Copilot suggest code snippets at a consistent pace. Copilot usually suggests 1-4 lines of code and occasionally an entire function. 

An indispensable aspect of using either AI tool is swiftly scanning the code generated by GPT or the suggestions put forth by Copilot. This quick evaluation allows me to determine whether they align with my needs, identify potential issues, and decide promptly whether to accept, modify, or reject them. This step is absolutely vital due to the fundamentally probabilistic nature of these AI tools, which often lack certain key context—some of which might only exist in my mind.


I cannot stress enough the importance of having a clear, focused intention for what you want to achieve at a specific juncture. That is, unless you're consciously employing the AI for brainstorming or finding an initial approach. The dichotomy between implementation mode and brainstorming mode should be well-defined in your workflow when using these tools. I highly recommend this explicit distinction for optimal results.


In addition to the general approach, there are more nuanced rules of thumb that can be difficult to articulate. For instance, Copilot's auto-complete feature works great when adding new member variables with a specific type of initialization logic.


Unit testing


Though Test-Driven Development (TDD) doesn't mesh well with my Unity workflow due to the pervasive influence of the Unity scene context, unit tests remain important for more complex algorithms. I've found GPT4's approach of generating a suite of unit tests based on an implementation of my class to be an excellent starting point. This creates a robust scaffold that I can refine with my specific edge cases meaning my mental focus can be concentrated on what is unique to this situation while automating all the boilerplate.


Where AI Shines


Frequently, I find myself in situations where I need to employ a particular Unity subsystem or API with which I'm unfamiliar, or that I've simply overlooked. In such instances, GPT-4 proves exceedingly beneficial. My typical approach involves providing the method signature and functional tasks as inputs, requesting GPT-4 to generate the implementation. Given its extensive training data, GPT-4 usually nails the API usage impeccably.


This approach substantially eases the subsequent manual adjustment process, as I often start from a base where APIs are already largely correctly employed. I then carry out the final tweaks, which usually entails asking GPT-4 for a few iterations to handle more significant, necessary alterations.


Future Prospects


I recently gained access to Copilot Chat, part of the Copilot X suite, which offers additional IDE-integrated capabilities. Consequently, I may lean more on Copilot variants and less on GPT4 for coding.


Models like Copilot hold immense potential. A significant increase in token limits, coupled with better integration with code structure search tools, could lead to sweeping refactorings, improved large-scale context understanding, and ultimately, a significant leap in the utility of AI coding assistants.


What an exciting time to get stuff done efficiently!

Sunday, 16 April 2023

AI Tools for Productivity - Risks and Mitigations

In the short term, even the internal utilization of AI tooling poses risks that can be highly relevant for enterprises. In this article, I cover some of the primary risks affecting large categories of AI tools, along with potential mitigations that are already possible, as well as some likely near-future approaches.


Note: This article focuses only on company-internal use cases, where productivity can be increased in various ways with current-generation, productized AI tooling (e.g., GPT-4, Stable Diffusion/Midjourney, Adobe Firefly, and other use-case-specific tools). I'm not discussing end-customer, end-to-end processes, which carry significantly higher headaches and warrant a more extensive discussion covering areas such as bias, fairness, lack of explainability, regulatory risks, reliability, robustness requirements, and ethical concerns. For internal productivity use cases, these are, for the most part, not as essential.


Privacy and data protection


The risks:


As of writing this, the most well-known services are still provided from the US, which makes them immediately problematic regarding GDPR (which is why Italy went ahead and banned ChatGPT for now). In ChatGPT's case, there have also been instances of users seeing each other's data, and there's the issue with the material used for further training data. All of these effectively block the utilization of most use cases dealing with internal and sensitive data.


The mitigations and future potential:


Microsoft has been a forerunner in AI productization for a while and is very familiar with European privacy legislation. Using their existing ecosystem, they have already published plans to integrate GPT into their extensive suite of office, productivity, and cloud offerings, which are already GDPR-compliant. They will undoubtedly ensure that companies have full control over whether their internal data gets utilized in training and that GDPR controls are fully implemented. This will naturally force their competitors to respond with similar capabilities.


Another approach is to use open-source AI tools that can be run on private networks without external connectivity, ensuring that internal and sensitive data will not be leaked. The tradeoff is a significantly less productized ecosystem, requiring higher investment and skills to utilize in most cases. The open-source ecosystem is quickly expanding and will eventually mature. Stable Diffusion is already easily locally executable on the visual side, and the recently released Open Assistant seems promising as an alternative to ChatGPT.


Copyright and IPR


The risks:


There are two sides to the IPR risk: 1) company-internal IPR leaking outside (via service bugs, used as training material that happens to be reproducible for others, etc.), and 2) inadvertent usage of others' IPR (if, e.g., code completion/generation reproduces a significant enough portion of a source work directly so that it's considered copyright violation—applicable somewhat similarly to visual, textual, and other content types).


There are several pending lawsuits alleging copyright infringement simply for producing work that is of similar style as copyrighted original works and specifically that copyright was infringed by those works having been utilized as part of the training of the generative AIs.


EFF effectively argues that this should fall within fair use, and I sincerely hope that interpretation will be widely applied. However, before we start getting precedents from courts, this will remain a risk: https://www.eff.org/deeplinks/2023/04/how-we-think-about-copyright-and-ai-art-0


The mitigation:


There is little that can be done to fully mitigate the risk, as an end consumer has no way of knowing when a generative tool produces something that happens to be close enough to an existing copyrighted work.


There are a few approaches to this:


  • Wait for services where the service provider explicitly carries the copyright risk.
  • One variant is using AI tools that have been exclusively trained on content explicitly licensed for training purposes, such as what Adobe did with their Firefly. This effectively sidesteps the issue.
  • Realize how minuscule the risk is and simply accept it.
  • Mitigate by never using generative output exactly as-is, but make manual modifications or only use generative AIs in a more assisting fashion that completes your manually provided base. This naturally reduces some of the benefit, but it can be a necessary part of the process in some use cases.


Regulation


The risk:


With the upcoming impact of AI increasingly clear to legislators, it's a certainty that AI legislation and various additional regulations will start forming in the near future. The first taste of this is the EU's draft AI Act, which, in addition to covering some essential and necessary steps, also overshoots significantly by placing unrealistic requirements on general-purpose AI providers, such as full explainability of everything, understanding all possible scenarios and preventing misuse, as well as requiring full understanding and errorless training data.


https://www.technologyreview.com/2022/05/13/1052223/guide-ai-act-europe/


The AI Act also poses a significant risk to open-source AI models and tools due to potential legal liability around general-purpose AIs, not necessarily on the application side but rather for the general-purpose model provider.


https://techcrunch.com/2022/09/06/the-eus-ai-act-could-have-a-chilling-effect-on-open-source-efforts-experts-warn/


Mitigation:


There is little we can do at the individual or most company levels, except keep our ears to the ground. The impact on internal productivity use cases will likely be significantly less and will depend more on how service providers respond (if entire categories of tools end up being effectively banned).


Competition


The number one risk is waking up to this too late while your competitors start realizing productivity benefits, allowing them to move faster and faster.


Why I'm Talking About AI All the Time: Preparing for the Productivity Boom and Its Implications

Why have I been discussing AI so frequently lately? AI, more specifically the current and upcoming generations of machine learning and large language models (LLMs), represents the most substantial leap in productivity ever. This is due to its broad applicability across numerous domains and the speed at which the benefits (and downsides) can likely be realized.


I have personally been following AI capabilities development, AI alignment, and futuristic discussions on singularity for over ten years, and it is now that we're witnessing the hype actually making its way to real world productivity. Avoiding a deep dive into societal discussions here, if we manage to evade major catastrophes, it's almost inevitable that, in the distant future, most individuals will be unable to produce something generating additional economic value beyond what AI can already achieve for cheaper and better. This is a massive subject, and while avoiding catastrophes is crucial, it's also a topic where few individuals can make meaningful difference.


In the short term, the impacts at individual, team, company, and national levels will be significant, with considerable differences between those who can effectively and rapidly adopt these technologies and those who lag behind. Disruption has been a buzzword for some time, but previous waves (internet, mobile, cloud, etc.) pale in comparison to the forthcoming AI-driven disruption.


Of course, there are factors that may slow progress: legal uncertainties and risks, the manner in which various regulatory bodies exert control, and the interplay between societal responses and these factors. However, these can only decelerate progress, not halt it, despite calls for a global pause in AI development.


At the individual level, effectively utilizing the variety of AI tools available can realistically lead to productivity increases in the hundreds of percent (depending on job and level of exposure of different tasks to current AI capabilities). It's essential to note that overall productivity doesn't scale linearly with the number of people due to communication overhead. If one person could genuinely double their productivity, their total output would likely equal that of a team of 3-4 people. Although there are key personnel risks to consider, companies cannot afford to ignore these potential gains for too long.


Individual-level progress begins to reflect at the company level, and market forces will ensure that early adopters gain a significant competitive advantage over laggards. An initial study by OpenAI estimates that 80% of the U.S. workforce could have at least 10% of their work tasks affected by the introduction of LLMs, while approximately 19% of workers may see at least 50% of their tasks impacted (https://arxiv.org/abs/2303.10130). This is only the current generation of GPTs, with further productization just beginning.


So, what does this mean? As an individual, you should familiarize yourself with AI tools and consider how to enhance your personal productivity. As a company, you should invest in short-term AI strategy, understand how large-scale utilization can be realistically achieved in your context, and determine which risk-benefit tradeoffs make sense.


This is not your typical overhyped technology. The results and products are already here, they're real, and they're only getting better.


Monday, 10 April 2023

Colossal Change in Software Development - AI

 Software development is undergoing a colossal change - AI. I can now honestly say that GPT-4 is at the level of a junior developer (in almost any specialization, of course). The business impact across multiple sectors is going to be huge, and there will definitely be winners and losers in how extensively and quickly they manage to adopt efficient AI assistance utilization. This impact obviously extends far beyond software development - it's simply the focus of this post.

While GPT-3.5 was already useful, and I've been using GitHub Copilot on my hobby projects for a while already, actually testing out GPT-4 more seriously a few days ago really brought home how imminent an actual paradigm shift is.

At the time of GPT-3.5, I noticed that I didn't really end up using it that much due to how many errors and bugs there were. With GPT-4, the level of quality in a smaller context is sufficient that it's a very significant productivity boost. In 5 hours of hobby game project coding, I managed to create around 800-900 lines of meaningful functional code with GPT-4 assistance.

Currently, the key to efficient utilization is having the specific goal and structure in mind, perhaps fleshing that out manually along with a few instructions and TODO comments, and then letting GPT-4 create the implementation. With this approach, the implementation was often correct on the first attempt, and while there were a few issues, they more often than not resulted from my unclear instructions or me missing some key aspect of the overall structure.

The same 5-hour period also included me learning new things, which slowed progress. I estimate that with an entirely manual approach, I might have only accomplished around a quarter of that in the same time, considering there were many aspects that I wasn't already familiar with.

With Copilot X in tech preview (i.e., GPT-4 capabilities integrated into Visual Studio) and many other similar and even better productized approaches incoming in the very near future, it's very realistic to talk about practical 5-10X productivity boosts. Even when a significant part of the overall time expenditure in overall development is not simply coding, the same approaches work for many other individual tasks as well.

From Architecture to Game Development: A New Blog on Echoes of Myth

I’ve launched a new  Echoes of Myth Development Blog , documenting my journey into game development and sharing insights from my first comme...