Mapping LLMs over excel saved my passion for game dev

2025-06-2116:488321danieltan.weblog.lol

Recently I hit a code-block (like writers block except for code) in my game development experiment that I have been slowly doing over a few years now because I absolutely hated data entry. I built a…

Recently I hit a code-block (like writers block except for code) in my game development experiment that I have been slowly doing over a few years now because I absolutely hated data entry. I built a battling card game, prototyped it offline using pen, paper and excel, before creating my game in Unity3d. Everything was going well. I created my battling systems, setup data structures and refactored my code a few times to accommodate some crazy idea I had to support augments ala Warframe.

Data entry, however, was that elephant in the room. I had dozens of characters designed with unique spells and traits. I need to translate my plain English descriptions of spells and traits into my spell system. Before all of this, I have had set up script-able objects and custom editors in Unity using Odin. This worked fine for simple lists and dictionaries but since my spell system required heavy usage of sub-classes and nested components it became incredibly difficult for Odin to present a consistent user interface for my systems. One particular example was around nullable references to complex subclasses. A simple List<Spell> would show up as nullable with no way to change it in the editor. Data entry became difficult because I had to fiddle around the editor UI and figure out the origin of each element.

I kept working on other systems to avoid doing data entry until I got to the point where I more or less need to have more data in the system before I could progress meaningfully. A month or so later, I had a flash of insight.

Why do I even need to use the Unity3d editor for this? Why not store everything as code instead?

Code was easy to edit and manage. Code can be type-checked. Code is what I'm familiar with.

So I began reconstructing my game asset files into code. At first I tried to convert raw unity asset files into c# code. That didn't work. Then I tried storing them as structured YAML using some custom schema. That took on more effort than I would have liked, and was essentially duplicating my c# game structure. Then I said eff it and started rewriting it as just c# code, and that worked beautifully. It was a one way conversion. c# -> asset files was easy. The other way round was not. Kind of like a one way chemical reaction.

After that I realized that since this is just text on a schema now, why can't LLMs map my excel to c# code?

A side note on LLMs

LLMs are extremely good at pattern matching against data. Their magic comes from mapping between stuff and figuring out how to do that based on some internal relationship. Knowing what they do best and how they suck helps alot in figuring out where they fit in the problem-solution spectrum.

However I don't really see anyone providing a proper analysis on how LLMs suck beyond big words like "creativity" and "its not AGI". So here's my take. LLMs suck at handling context poisoning. Humans handle this perfectly well because we forget by default. Our attention span is extremely short even though we can process huge amounts of information in parallel. LLMs however need focus and any extra information, intended or not, may cause the LLM to pattern match against the wrong thing since they are currently incapable of first-degree analysis that humans are fine with.

This means that when working with LLMs you need to be prepared to be the one providing structure and analysis to the table. A simple example for me was trying to find a suitable authorization solution for federated microservices behind a proxy. I had no issues pointing out Biscuit immediately but LLMs struggled even after extended analysis to design something similar even when it was aware of Macaroons. That being said, claude worked the best and grok/openai/deepseek all failed to even propose decentralized, attenuated authorization.

A typical workflow looks like this

  1. analyzing the problem (humans work best here)
  2. brainstorming a solution (AI can rapidly pattern match against known solutions. Humans have the ability to consume the latest information and analyze if any are relevant for the AI to research on)
  3. choosing the best solution (humans work best here)
  4. implementing the solution (AI can help here by filling in boilerplate code)

My game dev solution

Instead of having the LLM just look at my excel and generate c# code, I first engage in a meta-step to generate the prompt by limiting what it can do (focus!).

I started out by saying "dont write any code unless i tell you to. the goal is to generate a prompt such that when provided a few files and a list of attributes, it will generate c# code or something like that. given these columns: ... and a row containing values ... after referring to available spells in Spell.cs and NullableSpellModifier.cs, reviewing structure from BattlerData.cs and BattlerDataDsl.cs, i get BattlerDataDsl_Ally.cs. If i find that the spells cannot be created using Spell.cs i would propose a new spell function by writing some specs and c# code according to the specs. Help me automate this effort by codesigning the workflow/prompt."

The LLM then went on to create an example prompt which had a bunch of errors because they tend to hallucinate and assume things instead. Fixing the prompt was a matter of providing more context and data. In the final prompt, the LLM helped provide lists of helpful mappings like "if you see these text, it usually maps to so and so functions", which would otherwise be done by hand for me. I even had it map localization keys and handle nested structures by identifying them as "pattern modifiers". The final prompt structure was like this

  1. context
  2. input format
  3. column mapping
  4. analysis steps 4.1. Parse Basic Properties 4.2. Analyze Spell Descriptions 4.2.1. Identify Core Actions: 4.2.2. Direct Actions: 4.2.3. Pattern Modifiers: 4.2.4. Conditional Patterns: 4.2.5. Complex Combinations: 4.2.6. Identify Targets: 4.2.7. Identify Attributes: 4.2.8. Identify Costs: 4.2.9. Identify Timing: 4.3. Map to Existing Spells 4.4. Identify Missing Functionality
  5. Output Format 5.1. Option A: Complete Implementation (if all spells exist) 5.1.1. CRITICAL TRANSLATION REQUIREMENTS: 5.1.2. Available Translation Patterns (from TranslationsReference.cs): 5.1.3. Examples from existing keys: 5.1.4. Option B: Implementation + Missing Spell Proposals
  6. Quality Checks
  7. Example Analysis Process
  8. Instructions

This was way more detailed than I could have done in a short amount of time and helped result in a satisfactory output that ultimately saved a lot of my time and prevented me from being burnt out from data entry. All in all, it let me continue do what I like, analyzing problems and writing solutions!


Read the original article

Comments

  • By BoorishBears 2025-06-2423:383 reply

    It's been a long minute since my Unity days, but I'm pretty sure what OP wanted was ScriptableObjects with a custom Inspector

    If you setup asset serialization to use text, the ScriptableObjects map to semi-editable YAML files (semi- editable because there are some internal members that show up, but nothing an LLM couldn't handle)

    • By danieltanfh95 2025-06-252:54

      I already use ScriptableObjects with a custom inspector that outputs to YAML files. the problem was that with increasing use of nested generics+components I would need to spend alot of time customising the inspector. I rather not spend time on tooling and focus on writing game logic.

    • By energywut 2025-06-2423:58

      Scriptable Objects are exactly what I would use in this case. There's even a whole host of fancy tools to work with them and import/export to csv or other file formats.

    • By npinsker 2025-06-251:00

      The downside of that is that cards often have to hook into custom functions that interface with the engine (unless they're sufficiently boring). You can still go with ScriptableObjects if you're willing to e.g. write those functions in Lua and have an interpreter layer, but for all but the largest projects, making each card its own class works well.

  • By jayd16 2025-06-2423:241 reply

    > Why do I even need to use the Unity3d editor for this? Why not store everything as code instead?

    Some answers are... you need to recompile ever time you want to iterate on the data. You need to do a full reinstall if you were doing anything past play in editor. You need to do a week long store update if you actually shipped a game on an AOT only platform.

    But yes, Unity assets don't support polymorphism like this. The data container needs to get massaged a bit.

    • By danieltanfh95 2025-06-252:57

      In this case I'm still converting to assets so I can ship asset files in future updates, but yes play testing, while doable on the editor, has to be recorded in code as well, which may not be as accessible to a non-technical designer in the future, but that's for future me to solve (maybe at that time i'll finally have time to write a fully custom inspector for this) :D

  • By chatmasta 2025-06-2423:095 reply

    I’m surprised that Google hasn’t integrated Gemini more natively into their workspace apps like Google Sheets or Google Slides, and has instead been developing a more ringfenced NotebookLM. I think they have some very basic integration in sheets but it feels like they’re keeping it intentionally subdued for now.

    I suppose they want to take their time to get it right, but there are some killer use cases for LLMs in spreadsheets. Of course, the typical corporate idiot will make a giant mess of this when they use it in the wrong scenario… and I’m dreading the day I need to look at LLM-generated slides. But it still feels like Google is keeping Gemini in its own little box, rather than letting it seep more naturally into the rest of their products.

    • By sidewndr46 2025-06-2513:08

      Google has added a button for Gemini to nearly everything I touch. Sometimes it has been added where UI elements previously were for other things. How much more "natively" do they need to integrate it? A dialog box saying "use Gemini or we'll delete your document!" ?

    • By sadeshmukh 2025-06-251:00

      It's been increasing. They have the =AI function, generative tables, and a thing to read and "analyze" your stuff for you (though it generally says things you could probably guess). But I'm sure it'll get even better.

    • By emmelaich 2025-06-253:46

      I'm happy they're cautious with spreadsheets. Wrong numbers can really mess up people's lives.

      That said, I saw an add for Gemini for Google Sheets today.

    • By conception 2025-06-253:10

      They saw copilot be… copilot.

    • By ycombinatrix 2025-06-2423:47

      good

HackerNews