# Config Development Assistance - Reference Guide > End Goal for this tab is to be able to make Story based games using mechanics based games (Chess, Poker, Sudoku, Rubiks Cube, etc.) as a conduit ## Core Principles - Sometimes a fun game includes unfairness - Elden Ring (Controls and movement restrictions), Boss fights in every game - Jonas Tyroller (https://youtu.be/o5K0uqhxgsE) - This problem changes your perspective on game dev - minimise the cost of exploration so you can explore more (17:00) | dont make the same game again but worse. How can we measure worse? (Negative Reviews (Eg. Steam / Play or Apple Store / Game Journalists) / Reddit posts with complaints / Youtube Video Analysis Conclusions) - Every theme in the world can be turned into a battle story as that is how resource accumulation works --> Resources are normally hard to find and therefore scatter across a map - Ending Conditions --> Main Villain Antagonist Themes --> Travel, Politics and Combat needed to reach ending --> Characters --- ## 1. Some Ideas About Games Fundamentals - Is the universal rule as something done in less time is always harder and sought after - Games are ruled by one rule that determines win / loss (personal objective / competition). The main rule comes from the environment of the game eg. soccer = field + players + ball + marked goals and only then main rule is when ball goes into goal then goal scored. After that extra rules try keep the game interesting and sustainable eg. offside, deadballs, cards - **Tangible environments** (mainly real life) - **Intangible environments** (void / in your head / fictional places) - Fun = Avoiding Negatives and experiencing all content. Need a list of negative things that can happen - A game is alive when the same decisions wont work over and over - this means the game is designed to have the user answer all options and then have random choices get random answers - Good environments for randomness = anything with a queue like traffic or even the weather (rain / flood chance) - lead to player being overprepared for some situations and underprepared at the same time for others --- ## 2. Simple with Consequences and 'Fun' Built - Ask for x stories reached through x decision points - **Prompt 1** - Is there a way to tell 8 stories from the same opening using 2 decision points to reach them - **Prompt 2** - For each verb item list things a normal person wouldn't want to happen --- ## 3. Simple Structure > AI is good walking a tightrope but not setting up the tightrope. Structure in final format (JSON / Twee) --> current prompt: what would this config look like in Twee? ### 3.1 Generator - A long game is a bunch of short games - Click the button to generate a random timeline and story based on UI elements and story events. Ask an LLM to use this to write a story around --- ## 4. More Robust - The main idea is locations + Personal Relationships + bystanders = foundation to write game mechanics into eg. random bystander = candidate for a DLC / sequel story and can be rewritten as character acquaintances / relatives - Conflict Ideas - in Overengineered Tab --- ## 5. Overengineered > Current [Timeline] Workflow = [Precreation] Mermaid Diagram to (1) Story to (2) [Creation] Initial JSON (through LLM and fix JSON by hand) to (3) [Postcreation] JSON Corrections (through LLM and fix JSON by hand) to (4) Media prompts to (5) Asset Generation to (6) JSON Media field population ### 5.1 Pre - Qualitative Considerations - Ending Conditions --> Main Villain Antagonist Themes --> Travel, Politics and Combat needed to reach ending --> Characters - Modern game commonalities = travel, 'politics' (cheatcode is related family members in high positions) (personal relationship effects on the world) and combat (physical or verbal eg. negotiation) - Politics within a group origins = Easiest to understand interpersonal issues = betrayal and lack of sympathy, unfair expectations (Oblivious Decision making) or misinterpretation of actions under these categories - A game is about conveying an experience to the user - this is why media is heavily used - Need to learn how rules (our preferences) affect the config creation process. eg. core game loop - Write a story where the plot only moves based on - [insert core game loop] #### 5.1.1 Ending as the Start - The issue with a comprehensive game is that decisions with consequences can be made therefore as many endings as possible so one ending as the start is an incorrect approach **Prompts:** - "Analyse the following statement and provide 50 ideas for good starting points to develop from - A good ending is predictable in shape from the beginning of the story but the finer details hidden till the very end" (Tested with o1) - "List 30 stereotypical story endings" (Tested with groq llama-3.3-70B-specdec) **How to turn an ending into an intro:** - What is the furthest away point from this that the main character can be? #### 5.1.2 In Between the Ending and the Intro - Travel, Politics and Combat needed to reach ending and Character development #### 5.1.3 Review / Parody as the Start - For a story Movies are a better source of inspiration for structures you can use (There's way more popular movies than popular games) - Screen Junkies (For Cliches Exposure) / Cinema Sins (For plotholes/inconsistencies to avoid) #### 5.1.4 Game/Story Wiki Contents Pages - Game/Story Wiki Contents pages are normally long lists so they help you to see how many lists you need and the length of the lists to give an idea / reference for whether you need more or less complexity #### 5.1.5 Media as Inspiration - Models like QVQ-72B-Preview can turn any picture into a list of potential scenes the image can represent. Need to find a way for LLMs to judge melodies and songs - Some Songs I would like to be able base a game around - Tank and Various = If you Dream, Michael Buble = Home #### 5.1.6 Main Parts of Stories to Put into Structures **Purpose (The types of decisions you want the user to make) (Main Theme):** - Unpredictable Nuances (Any movie) / Simulation (eg. Work - mixing rare industry crossover) (eg. A phrasebook into interactive game) / Time capsule / Tangible Metaphor / Song Concept as game / Advert as a game - References: https://en.wikipedia.org/wiki/Philosophy, https://en.wikipedia.org/wiki/Moral_injury **Conflicts:** - Most stories are based around conflicts **Setting:** - Reference: https://en.wikipedia.org/wiki/History#Periods **Locations:** - Jungle, Sea, Desert, Snow, City, Village, Space **Character Relations:** - Friend or foe **Character Archetypes:** - (To be expanded) **Additional Themes:** - (To be expanded) #### 5.1.7 Generalized Inspiration from Existing Games - Random Scenario / Song to 'full game' manual or auto is end goal - Components (outside Code Support for Config): Decisions (and context explanation), Nested Sections, Media (Especially to affect decisions), Replayability (GTA and Tekken type mechanics in text form), Theme integration (Modified Variables that affect UI or config order) - Existing Games eg. GTA Heists - Same Map with overlapping branching narratives, Battlefront - Elites amongst Commoners, Tekken Casino (one mistake = 1/2 or 1/3 of your Resources) and Turn based: 'Tactics' type nintendo games, Chess (and any other tile based game) - Existing Game Rules for text - Cyberpunk RED - Community playthrough = Tally of players choices, Random item placed in a random location - first person to get it wins, Survival by location or characters met - Some Kinds of game skeletons ideas - Timelines, Graph as State machine paths, Economy ecosystem **Structural Inspirations:** - GTA Heists - Replayability and stakes - Tekken - 2/3 mistakes = lost round - Elden Ring - Story telling by traversal of map - Sports Scores **Test Prompt for Models:** > Please make 10 python lists for the types of media files and their purposes in a game and then use those lists to random generate a timeline of 20 items when the function is called. Great next suggest ways to improve this function to create better timelines #### 5.1.8 Worldbuilding Tools - Good worldbuilding makes new scenarios automatic - In a game awareness = directly affect one of the characters - Any time fights are involved, paralympics categorisations can be inspiration (watched paralympics and wanted to learn the categories eg. s10) **Using Law as inspiration:** - SA Constitution - SA Companies Act #### 5.1.9 Concept Combination Brainstorm - The story and the gameplay don't have to occur at the same time - A timeline is the most important part of the story - once that is set you can do anything? - Media Critiques (eg. Youtube Rants) as Prompts to whole games as interactive explanation --- ### 5.2 Mermaid Diagram / Structural Considerations to Story #### 5.2.1 HF Datasets as Scenario Inspiration - https://huggingface.co/datasets/thesven/gsm8k-reasoning - https://huggingface.co/datasets/HuggingFaceFW/fineweb - HuggingFaceFW/fineweb-edu - https://huggingface.co/datasets/HuggingFaceFV/finevideo - https://huggingface.co/spaces/HuggingFaceFV/FineVideo-Explorer - Translations: https://huggingface.co/datasets/opencsg/chinese-fineweb-edu #### 5.2.2 Structure - (Non/)Linear Storylines > Trying to abstract the process into one workflow is beyond me so multiple paths to goal (config) is the aim now **Branching - Decisions / Timeline Creation:** - Structures for interesting timeline progression - Claude Artifacts to illustrate nested structure brainstorms: - https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e - https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false - Consideration: Story from the perspective of Main character or NPC in the LLM generated story **Linear - Existing Media eg. Songs and Screenshots:** - Media position in the story part: beginning, during or end - Create media first and then ask LLM to make join points in the config. For images need to add the location to every prompt or images will be in random locations **Linear - Machine Learning Architectures as Game Maps:** - Transformers, SSMs, Image and Video Generation Architectures, GANs, RNNs, etc. **Linear - Prompt Engineering as Basis for Ideation:** - Current Assisted workflow idea: Story timeline events suggestions (LLM / Premade List) | Merging events with premade mermaid structures (LLM + Story Text + Mermaid Text) | Edit mermaid till satisfied (LLM + Story Text) | Ask LLM to convert to config (LLM + JSON Text) | Edit config (LLM / User with format assistance or not) | Playtest and go back to mermaid or config if there are problems - Interactive movie (UI interaction or no progress) vs Branching Paths (Maze) - Things that can change the workflow: Asset First (Make Asset and make the transitions using LLM), Export First (Custom JS config, Playcanvas, Unreal Engine reverse engineered to this spaces config?) Game Mechanics First (eg. Player Stats, Inventory and NPCS not implemented yet, so traversal type games best aka graph like structures) - Config writing = Remix old one, Ask LLM to make one, Endless combination testing using the prompt engineering above or writing by hand (prompt engineering on yourself) - Can use song lyrics as thematic source **Branching - Network Analysis to Game Config:** - Placeholder for analysing multiple stories for their network structures and creating general rules for a structure generator based on named entity recognition and bias to locations or people - The extreme long way **Linear - Chess PNG to Game Config:** - Any Chess match can serve as end of game final battle **Note:** Below 70B (April 2024) seem to struggle here --- ### 5.3 Config Creation > Can use Mermaid scaffold or not **AI Generates Scaffolds - Notes:** - 8b size models make Format mistakes. For extension purposes this step specifically might have to be function call only if you explain the tool can take as many blocks as necessary **Extension Ideas:** - The basic idea is just make a new story and fight the JSON issues to make them fit and then rinse and repeat - Extension = any description in original JSON as the theme using the prompt template - Ask for incorporation of mermaid structure into JSON or ask for how the mermaid structure would change the JSON / story --- ### 5.4 Post-creation > Assumed story is complete at this stage / will be continued in separate config #### 5.4.1 Initial Media Generation - Placeholder for verb extraction from description and choices - to help guide initial media population - To do a full test need media - Fast and quality: https://huggingface.co/spaces/black-forest-labs/FLUX.1-schnell #### 5.4.2 JSON Corrections **Prompt:** "Let's critique this JSON to find areas to fix" #### 5.4.3 JSON to Media Prompts - This Step specifically has to be function call only - Gemma-9b and Mistral 8x7b is better at this prompt than llama 3.1 8b and 70b. Can add (each media field must get an entry) and (in python list of list format for plug and play) but they affect final output **Prompt:** "Let's make a list for the prompts we will use to make media objects in this JSON. Make one for a person to interpret and one for direct media generators that focus on keywords:" #### 5.4.4 Media Prompts to Asset Generation to JSON Population - This Step specifically has to be function call only - This Step can be merged with the next if we can make an editor like in the semi-Auto space in test and edit tailored to just accepting the JSON and exposing only media part for editing **Prompts:** - "For each Media item described classify it by media type and comment if in a story setting it would need timing" - "Here is a list of file names - assume they are in the order of the empty media sections of the JSON and rewrite the JSON" #### 5.4.5 Quick Ways to Evaluate Current Config **Prompt to use with SOTA LLMs:** > This config is for a basic text based game engine. I don't have any structural metrics to assess the quality of the config. What JSON things can we look at to see if it may be too bland for a person testing the game? **Original Claude 3.5 Sonnet Response snippets:** 1. **Limited state variety:** With only 13 states across 5 locations, the game might feel short and lacking in diversity. Consider adding more locations or states within existing locations. 2. **Low average choices:** An average of 1.92 choices per state might make the game feel linear. Increasing the number of choices in more states could improve player engagement. 3. **Limited consequences:** Only 3 states have consequences, which might make player choices feel less impactful. Adding more consequences could increase the sense of agency. 4. **Short descriptions:** The average description length of 13.15 words might not provide enough detail to immerse players. Consider expanding descriptions to create a richer narrative. 5. **Lack of media:** No states currently use media elements, which could make the game feel less engaging. Adding images, sound effects, or other media could enhance the player experience. 6. **Limited narrative branching:** While there are some loops and choices, the overall structure is relatively linear. Adding more branching paths could increase replayability and player interest. **To make the game less bland, consider:** - Adding more states and locations - Increasing the number of choices in each state - Implementing more consequences for player actions - Expanding descriptions to create a richer narrative - Incorporating media elements - Creating more diverse paths through the game #### 5.4.6 Improvement of the Default Config - Example of how to advance a game config with LLM - end goal is to have automatic workflow that takes these considerations into account - Things missing from the game engine - Economics and Basic Politics (NPC affiliation) --- ## 6. Translated/Transposed Mechanics - Interactive Fun (one form) = Avoiding something you don't want to happen in as dramatic fashion as possible = in '1D' format that can mean avoiding deadends and if you stack stories on stories the deadends can pile up - 1D games fun = ??? (Haven't figured it out yet) same as a navigation game? Reaching the end is the current end aka the game is essentially a number password and wrong input means a deadend where the full password = full story - chained stories with deadends = same missing back story in a long story = a punishment to some and a reward to others - Ideas for options based on existing 2D / 3D games - Most game mechanics = button press + animation == in 1D animations = text description / picture - Tekken - Kick and Punch in extreme detail + complex input buttons