r/gamedev • • 1d ago

Community Highlight 4 months of dev and 2,000,000 players - the Dagon postmortem

37 Upvotes

Five years ago today, I released Dagon: by H. P. Lovecraft, my first original game. 

It is a faithful adaptation of Lovecraft’s 1919 story. Some people describe it as a walking simulator without the walking or an audiobook with visuals. You can’t move around - the camera is placed at a fixed position in each scene, and you can only look around within a limited range.

But the original idea actually had very little to do with walking simulators. I wanted to create a classic visual novel, but in a “premium” version: 3D graphics, animations, voice acting, and a much more cinematic presentation.

The lack of movement, and the way you jump between scenes, was inspired by comics, where the reader can spend as much time as they want looking at each panel, without being rushed. Another partial inspiration was a very specific PSP release: Metal Gear Solid: Digital Graphic Novel. That slow, deliberate pace seemed like a perfect fit for Lovecraft’s stories, which rely so heavily on atmosphere and a sense of overwhelming dread.

Although, ironically, I wasn’t a big fan of Lovecraft when I started the project.

I love classic horror literature, but compared to other writers of the period, Lovecraft initially seemed repetitive and overrated to me. I originally wanted to use the works of other authors, such as Algernon Blackwood or Stefan Grabiński. I ended up choosing Lovecraft for, admittedly, a purely marketing reason. He was the most recognizable “brand”, so it seemed like a better idea to start with him.

Choosing the story was relatively easy.

Dagon was one of the early stories from what would become Lovecraft’s most recognizable Cthulhu Mythos period. It was short enough to be a good fit for a first project, and it allowed me to make the game without expensive character animations - something that’s difficult to do on a low budget, while poorly animated characters are one of the quickest ways to break immersion.

I also wanted to add some unobtrusive gameplay, so I decided to include collectibles, inspired by Metal Gear. They contained various bits of trivia about Lovecraft, Dagon, and the historical context behind the story. The idea for this came from the fantastic historical collectibles in Valiant Hearts. I didn’t want to fill the game with dry Wikipedia facts or clickbait-style “fun facts”, though. So I started digging into Lovecraft’s biography, letters, worldview, and the historical context of his life.

And that completely changed my perspective.

It was actually the moment when I fell in love with Lovecraft’s work. To the point where I now believe that it’s impossible to truly understand the depth of his stories without knowing something about the man who wrote them.

As for the promotion, the biggest things that helped were the fantastic reception during Steam Next Fest, the strong response from Lovecraft-related communities on Reddit, who provided valuable feedback from the earliest stages, and an Imgur article where we explained why the game would be free that became the top post that day.

A huge part of the credit goes to my friend Maciej, who joined the project to handle the promotion.

We've also contacted hundreds of content creators of all sizes, from accounts with a million followers to much smaller channels, and many of them covered the game. We think thanks to its bite-sized length creators could fit it between bigger titles, which lead to more exposure.

This helped us reach 21,841 wishlists at launch. A really nice result considering it was the first project and we had such a short development and promotion period. My optimistic estimate was that, in the best-case scenario, we might reach 80% positive reviews and 100,000 downloads over the entire lifetime of the project.

The launch of Dagon was probably the most magical moment of my 17 years in gamedev.

The game exploded and we passed 100,000 downloads in two days. With the review score above 95%.

A crucial moment was getting into Steam’s New & Trending very quickly and staying there for several days. The fact that the game is extremely short also helped here - players could finish it quickly, which meant reviews started appearing just a few dozen minutes after release and helped drive even more interest.

And now, five years later, there have been over 2 million players and more than 12,000 reviews on Steam.

To celebrate all the amazing support from our players, we’ve prepared a free DLC that was previously exclusive to the console version. It’ll be coming very soon.

Thanks for reading,
Hubert


r/gamedev • • Sep 11 '26

AMA Questions For An Game Dev Lawyer

34 Upvotes

Hello friends! 👋

I have a question for all you amazing devs.

I am going to be interviewing Jacob Vela, who runs Argo Law (https://argolawyer.com/), a law firm that specializes in law for game developers! (Oh, and he has also launched his own game on Steam, just as some icing on the cake.)

When talking with Jacob about some fun topics, we both loved the idea of going to the community for their questions and running a Q&A style of interview.

So my question for all of you is;

WHAT QUESTIONS DO YOU HAVE FOR A LAWYER REGARDING YOUR GAME/STUDIO⁉️

Thanks everyone! I appreciate you jumping in. 🙏


r/gamedev • • 8h ago

Industry News Epic Games delays Disney game and tells developers to go "AI first"

Thumbnail
gamesindustry.biz
204 Upvotes

"We have a huge pivot underway here at Epic, moving developers around to retool for maximum AI acceleration.

The aim isn't to do the same stuff with fewer people, but to enable everyone here to build MORE and BETTER stuff, and to bring the benefits to all teams using Unreal." Tim Sweeney CEO.


r/gamedev • • 12h ago

Discussion Seeing many (indie)games copied, should we stop showcasing our work ?

144 Upvotes

Hey everyone,

I think most of people are aware of what is going on with the whole decompiling software stuff where some game devs have seen their demo / game copied and marketed somewhere else before they could even get the game out themselves.
At first most of devs including me thought it was probably because the concepts and looks were simple to replicate, but today after spending a while scrolling on X, I changed my mind.

I am seeing a LOT, many many games concept that are copied few days after they get attention somewhere.
The latest I saw was 'The Ninth Legion', it was a top down game where you lead a Rome legion army against enemies. It looks great, and it seems interesting on the gameplay side too. It was featured 2 days ago by Indie Game Joe and got a lot of attention.

I saw at least 5 projects today that popped out of nowhere with almost the same artstyle, the same view, the same combat feels. When I checked the profile of the creators, it was devs that were seemingly developing completely other games genre before, and all of a sudden swap game projects from 1 day to another, with almost finished product to showcase and playtest.

And that's just one example, latest blatant examples was also the 'archeology tidying up' wave on steam where almost 10 games with just reskins popped in a single week.

Everyone is free ( for now ) to use AI as they want, but we are entering a full appropriation and iteration over ideas and concrete commercial projects.
Is this the time where we stop showcasing anything on internet because then we start competing with 50 other peoples that will steal and market your project before you?

On the marketing side this is terrifying, wish lists and community build up was something important but if we can't do this anymore, what are the solutions ?

I don't have the solution personally, and would love to discuss this with fellow devs.


r/gamedev • • 17h ago

Discussion Strategy Games are Experiencing Hexinization

75 Upvotes

Carcinization is the evolutionary theory in which non-crab crustaceans converge on crab-like features because these features are exceptionally well suited to ocean floor living. Similarly, thousands of strategy games are following a process I’m calling Hexinization, choosing hexes to make up their game boards.

I think in many cases, I think hexes are likely the best solution. For games like Civilization or Age of Wonders where there will be hundreds or thousands of hexagons making the game board, a hex grid is the best solution. Zoomed out far enough, moving along hexes looks very similar to moving freely in an open 2d plane. There are also enough hexes that small groups of hexes can form biomes within the greater landscape. 

But this hexagonal freedom struggles to convey into gamestate the strategic importance of locations on a map. Take the Risk Godstorm map for example. A player who controls Iberia, Atlas, and Hibernia will have complete control over all traffic between the Atlantis continent and the rest of the board. While it wouldn’t be impossible to represent this using a hex-grid map, I don’t think it would feel natural, and these types of scenarios are rare in my experience with hex-grid games. 

Hexagons also tend to provide both too much freedom of movement, and not enough choice to a player simultaneously. On one hand, you need to be able to defend a structure of interest (i.e., a city) from 6 directions. While at the same time, when moving armies towards a target location you will almost always just pick the one shortest path from A to B. Hexagons give too many routes from a defensive perspective, and the illusion of choice on offense.

I think we should continue to innovate on how we are making game boards / maps in strategy games, particularly in small-map scenarios, or games where positioning of armies/units at key points provides a major strategic advantage (i.e., entrance to a water feature, narrow land pass between mountains, etc).

My attempted innovation was to subdivide a hexagon into 6 territories, 1 central and 5 exterior, with the 5 exterior territories randomly aligned with bisections or the corners of the hex edges. This generates territories with 4, 5, and 6 edges within the same hexagon, giving some variety to the number of directions needed to defend. I stuck with a hexagon as the starting shape, because I need a shape that efficiently tiles a plane. Additionally, I wanted to avoid the diagonal grid manhattan distance problem of square grids, and triangle grids feel unnatural/janky (no straight line paths can be taken)

I wanted to do a bit more, so I also randomly placed mountains on 3 of the hexagon edges (mountains cannot be placed adjacent during randomization), which allows for territories to dip into the 2 or 3 edges regime.

Lastly, I wanted to bend the movement/adjacency of territories across hexes, so I made 1 territory per hex into water. Water can connect and become continuous, and instead of inhibiting movement, water makes all territories touching it considered adjacent. This has had really fun consequences and I will talk more about it another time.


r/gamedev • • 22h ago

Question My game will be released soon and someone filed a trademark for the name last week. What should I do ?

163 Upvotes

My game will soon be released on Steam but this morning I noticed that last week someone filed a trademark for the name of my game.

The trademark seems to be for a car software company. I say company but it seems to be just one dude.

The goods and services numbers are 9, 35, 42.

The company didn't start doing business. I'll be starting before them.

What should I do ? My game is small and not really going to go viral or anything. I'd be glad if it were to make more than 5k...

Oppose them ? It costs money and I'm not sure it's worth it.

Contact them ? I might put myself on their radar for no reason. My game is small, they'll probably never hear about it.

Do nothing ? Again, they'll probably never hear about my game and worst case I've to change the name if they complain to Steam. And changing the name wouldn't be too much work to do.

EDIT: Thank you for all your answers.


r/gamedev • • 13h ago

Discussion What makes a game a "real" game that ppl will buy (commercial), and anther shows as a cheap one?

21 Upvotes

As a game dev, I noticed how much my game look "cheap", I cant even imagine it as a "commercial" game, and it's easy to tell the difference between a cheep game and a steam-like game, a one with a publisher behind it, and one that doesn't, but how?

IDK how I even do it, but just from screen shots of the game, I can tell if this game is a "cheap" game that I shouldn't even buy, or a "real" game that most likely will enjoy it.

And even so I said enjoy, but I mean like I can tell it's a "commercial" game rather then just something you can find in itch.io (with all respect).

what makes this visual difference?


r/gamedev • • 17h ago

Question What do you think of a game system with no HP, where taking damage only inflicts status ailments like 'bleeding' or 'fractures', and you can randomly die over time based on probability?

35 Upvotes

Are there any existing games that use this system?


r/gamedev • • 10h ago

Discussion How do I store data?

9 Upvotes

I'm working on a card game, and I'm planning on adding roughly 150-200 cards into it.

How should I store all that data? In separately files for each card, or save them all in one file?

Some clarifications:
I'm newbie, I only made one shitty game last year, so I'm not exactly familiar with all terms and tricks.
I'm working on Godot.
Hopefully I will make single player, Inscryption like card game.


r/gamedev • • 12m ago

Question Godot, RPGM Ren'py - question regarding game engine.

• Upvotes

I’ve been making small game projects for about 2-3 years, almost entirely in HTML. It felt pleasant, easy, and intuitive; ifs, loops, and the rest just made sense. A few of those projects even had more complex systems like inventory and turn-based combat.

I decided it was time to level up and try a proper engine. My first choice was Godot. It’s somewhat manageable with AI help, but damn… C# is a completely different beast compared to HTML. I’m already wanting to rip my hair out, and I’ve barely scratched the surface and done the basic systems: saving/loading, inventory, character menu, and moving between locations on a world map.

(Styling custom boxes and image layouts is actually easier than in HTML, which is nice… but still.)

So I’m here looking for advice from more experienced devs on engine choice.

Here’s what the game needs:

  • World map travel by clicking on location names
  • Action buttons inside those locations
  • Combat (probably turn-based)
  • Territory management
  • NPC's management
  • Random events
  • Interactive scenes
  • Sandbox-ish gameplay
  • Rather more text than less

I’ve already decided I want to move beyond Twine/HTML, so I’m asking: is Godot the best overall choice for a solo dev with this kind of project, or would another engine handle it better?

I've been wondering as well on RPGMaker (which version? MZ or MV?).


r/gamedev • • 10h ago

Question I think my playtest is getting spammed by bots and I don't know what to do about it.

5 Upvotes

I have a playtest for my game called Lost Legends. Its just friends I know and it's around 20 people.

Yesterday, I enabled the "Request Access" button on my store page thinking it might be good to get some non-biased people playing the game.

24 hours later and I have 100+ requested access. To be clear there's no traction for my game so the amount is not explainable by normal means.

Only 10% are in the US which is where I'm based. The rest are across several countries.

This is my first game and I'm assuming it's primarily bot traffic, maybe crawling Steam for playtests to opt into.

Point being, I don't really know what to do. I feel like I can't just accept new testers this way, right?

I don't really know the intentions of what the bots would be, and meanwhile I don't really know another method to find playtesters.

Looking for any advice for anyone who has been in this situation and how you would handle it. I feel stuck with not being able to get more playtesters without whatever risk would come from granting more access (if there would even be any risk).


r/gamedev • • 12h ago

Question Advice writing characters not of your culture and culturally sensitive stories/topics

7 Upvotes

The setting of my game is a mildly historical setting (not explicitly about specific historical events/places, but a setting grounded in history) and includes indigenous peoples.

This is not a super narrative heavy game with tons of dialogue nor is it the type of game that would have room or be the right place to explore the impact of colonialism, the erasure of culture, etc., but though they are not main characters there are character interactions and characterizations of them, and their experience is an important part of the setting of the game. So to ignore it or pretend it doesn't exist wouldn't do it justice, but to overfocus on it would take away from the game and make the characters stereotypes or inauthentic. Not to mention, though colonial contact was undoubtedly catastrophic over a long period, the lives of the individuals are not necessarily lives of victimhood, nor were their interactions with Europeans always hostile, they were people with experiences good and bad and everything in between.

I've done research on the historical setting and subject matter and tried to stay true to that; in this case they're Inuits in roughly the late Victorian era, and the characters represent as best as I can find how they would have lived and interacted. I've tried to write them as characters and people first, with their ethnicity and culture then integrated into that. Currently they simply speak fluent English, unless referencing something distinctly Inuit, and I don't think they fulfill any pre-conceived stereotypes. Likely later on something like a sensitivity reader would be something I'd find just to make sure it reads ok. But it's a bit hard to know how much to make something like the impacts of colonialism on their culture a part of their personal story, or how much to emphasize their Inuit-ness.

How can I best strike this balance? Do you have any advice writing about other cultures or sensitive topics?


r/gamedev • • 11h ago

Discussion How often do you feel like your game is a sh*t?

6 Upvotes

I've started working on my project and everything is fine, I love it. However, time to time I feel like my game is piece of sh*t. haha, but then again looks very interesing and again I feel frustrated. Does it happen to you oftner guys?


r/gamedev • • 3h ago

Question Solved: world-locked screens juddered because I copied the head pose once per frame — plus two open Quest 3 questions

1 Upvotes

Hey all — a short solved report first, then two things I am still stuck on.

I'm building a Quest 3 app in Unity 6 (6000.5.6f1, OpenXR 1.15.1) that streams my PC monitors into VR over WebRTC (com.unity.webrtc 3.0.0-pre.8). H264 comes in through MediaCodec, and the received textures log at full size — 1920x1080 and 1920x1200.

Solved, 2026-10-09: the judder. My world-locked screens shook when I moved my head. The cause was my own bootstrap: it copied the head pose onto the camera in LateUpdate, sampling once per frame. Replacing that with TrackedPoseDriver set to UpdateAndBeforeRender fixed it. Worn verdict: "screens sit still", badPoses=0. The fixed build still ran at 72 Hz and still showed the same 336/336 GPU reading, so neither of those was it.

Still open:

  1. Refresh rate. Core Unity has no API to request a display refresh rate, so I have written a custom OpenXR feature that uses XR_FB_display_refresh_rate directly. It enumerates the available rates first, then calls xrRequestDisplayRefreshRateFB at session create and at session begin, with a read-back after each call. Written, not verified on device yet. Has anyone on core OpenXR, with no Meta package, seen the FB request refused or stepped back down outside thermal throttling?

  2. Soft text — cost only. Each screen already Blits into its own mipmapped RenderTexture before display, trilinear filtering, aniso 4. What I do not know is the measured cost on Quest of a per-frame Blit plus full mip regeneration across several video quads — my code copies every frame. Has anyone measured it, and at what point do OpenXR composition layers become the better route for readable desktop text?

Happy to share what the next device run proves. Thanks.


r/gamedev • • 15h ago

Question accidentally copying a game? any advice will help

9 Upvotes

hello everyone im new and dont make reddit posts often so dont hate too much lmao but im just here to get some advice on my situation. Im currently making a game right now that i've been thinking of for 10+ years. ever since i was in intro to game design making games on gamesalad my freshmen year ive been "crafting" (last 10 years has just been mostly head crafting) but Im actually in dev of it now and im finding a game thats VERY close to my exact vision for my game. I mean they even use the same assets I plan on using (syntystore poly/sidekick assets, ik a lot use this but im broke and cant afford custom personalized assets but I will make adjustments to their assets to make some personality to it yk?). I've never heard of this game until I was showing my brother my play test area and told him my vision for the end game and he showed me the game. so Im just kinda sitting here wondering if anyone has faced something similar and what should I do? I think it would be different if the game wasnt well received. Should I pay homage to that dev? I personally dont think so since I never heard of this game until now but i think how similar they are, will be too uncanny to not say anything. should I even bring up the fact the games look/are similar? i really feel defeated in this icl. almost every idea I have/had they have in the game. I think my style of VA and such would be different, and mine is more story orientated in a handcrafted open world area but the shell of both games are basically identical. Im just wondering if anyone has advice for my situation, as I dont want to step on toes but I also dont want to abandon my entire game ive been wanting to make for years. My brother enjoyed the game but gave me key points what he didnt like and I will still stay away from but then isnt that in a way affecting the dev for my game and then should I give homage? im pretty conflicted in all of this


r/gamedev • • 14h ago

Discussion How to increase demo playtime?

6 Upvotes

tl;dr if you've launched a game demo that initially had quite a low playtime but has since improved, what did you change/fix to achieve this?

I appreciate that this question will probably have answers specific to "a/your" game, but they may trigger some "oh I never thought of *that*" type insights which I think could be useful for myself and hopefully others too!

I launched a demo for a game on steam three weeks ago and I've had 50 players go through it. Currently, the Median playtime is sat at 15 mins and - from my understanding that ideally playtime should be at least 30-60 mins - I'm guessing thats a sign that something isn't quite right. Players are running into a technical issue, like not being able to configure settings how they want (I've had one person contact me to say they couldn't get the game to fullscreen nor select the resolution they wanted). Or they ran into bugs. Or there just wasn't enough going on to hold their attention? Or maybe they went into it thinking it was one kind of game but quickly found out it was a different kind of game (in which case, perhaps the problem is the store page?)

So, for those of you who have released a demo (on Steam or otherwise) that initially had quite a low playtime that you've since increased... how did you achieve that? What did you change/fix and how did you go about finding out that was what needed changing/fixing? Or, did you do nothing and it improved on its own (and I'm fixating on numbers too early on?)


r/gamedev • • 8h ago

Question "clutter" asset pack?

2 Upvotes

I'm trying to find an asset pack of "dirty clutter" for tables and shelves and things inside of a horror game house -- like the set dressing in the house in Resident Evil 7, or Visage (although Visage's clutter is messy but fairly clean).

Piles of old newspapers, rotting food, dirty dishes, empty / broken bottles and cans, etc.

I haven't had any luck finding something like this on the Unity Asset Store or Fab. Does anyone have any suggestions for where I can find these? I know I could bash them together from a whole bunch of different asset packs, but I'd rather find one pack with a variety of "pre-filthy-fied" things.


r/gamedev • • 11h ago

Discussion Quick survey for solo/indie Steam devs — how do you actually decide on pricing and track your launch? (5 min, anonymous, university project)

3 Upvotes

Hi all - I’m part of a small university team (Dublin City University, BSc in Computing for Business) researching how solo and small-team developers make pre-launch and post-launch decisions on Steam (pricing, competitor research, tracking reviews after launch, etc.). We will have to present the results as a part of our final year project so any help will be greatly appreciated !

We put together a short, anonymous survey (~5 minutes) and would really appreciate answers from anyone currently developing or who’s released a game on Steam - regardless of how big or small.

No names, emails, or Steam handles collected, and it’s entirely voluntary - skip anything you’d rather not answer (just put "Prefer not to answer").

https://docs.google.com/forms/d/e/1FAIpQLSe_T2u-Pgh2a6flJZFUEFC8YEKXTPJs_v2TvDxJYE-UeU4H1g/viewform?usp=dialog

Thanks a ton to anyone who takes a few minutes - the results of findings will be posted in the pinned comment once enough responses are collected !

Edit: added university, major, and purpose of the survey.


r/gamedev • • 6h ago

Question Getting 50k+ views/week creating my own content. Is it worth the time sink?

0 Upvotes

I'm a solo indie game developer. I've been posting content on and off. When I do focus completely on it, I've been able to get over 50k views per week across Instagram Reels, Tiktok, and YouTube Shorts. (This includes Instagram's Trial Reels, which have been incredibly helpful as they maximize reach to new audiences tremendously.)

I'm curious about the tradeoff between creating your own content versus contacting content creators, since I've heard of game devs contacting hundreds if not thousands, with little to no success.


r/gamedev • • 6h ago

Discussion Anyone have experience paying streamers to play your game?

1 Upvotes

Basically title - I'm curious cost, views, and return in terms of wishlists / sales.

If anyone has experience with this would love to hear it!


r/gamedev • • 10h ago

Discussion Just a thought on puzzles

2 Upvotes

I have seen a lot of games with puzzles that can have its last step brute forced, and I think that is a problem.

The main thing I see is, people actually brute force stuff, so if you had something cool at the last part of a puzzle, a new environment, a new enemy, an important piece of the plot, people will miss it.

*Anti-disclaimer (I don't think that is a word lol): I'm not putting any spoilers, you can read it.*

One example, the newest Silent Hill that came out, there was a puzzle that I saw A LOT of streamers just brute force the last step, it was so frustrating as a viewer (thankfully the player had to at least get to the room where the last piece would be), but I think that is lame, but I can't blame the player. We should do better.

What if that was your indie game? It would hurt!

So, here goes my thoughts.

When you're making a puzzle, think what people would try and do to break them, brute force them, etc... Not just if the puzzle is cool.

Example:

inputting 4 numbers you get on the rooms close to the puzzle

Last number -> brute forced

A solution -> force the player to go to the last room, block paths etc... Sometimes players want freedom, and blocking places might not be the best thing to do (unless it makes sense plot wise)

Another solution -> instead of having the player input 4 numbers, add a fifth one, and deliver the last 2 numbers at the same time! The player, generally speaking, won't try to brute force it, and will follow through your full puzzle!

What do you think? What other ideas you have?


r/gamedev • • 11h ago

Question What would be the best engine for making a narrative game?

2 Upvotes

I started developing my game called "It's Better to Sleep," but I have a question: what's the best engine for making a narrative game, like those from Telltale Games? (I love that company)


r/gamedev • • 8h ago

Question No idea where to start

2 Upvotes

Ok, so I have this idea for a game(its basically chess+ card wars) and I really want to make it. My idea is super simple, but I have no idea how to code(besides base block stuff) and have no idea where to start with this. Any tips?


r/gamedev • • 1d ago

Discussion Improving heuristics for A* search

Thumbnail redblobgames.com
24 Upvotes

Distance heuristics ignore map structure, so A* wastes effort when they point the wrong way. The fix precomputes shortest-path costs to a few "landmark" nodes using Dijkstra's or BFS, then applies the triangle inequality, cost(B,X) ≥ cost(B,L) − cost(X,L), taking the max across all landmarks and the usual Manhattan estimate. Landmarks help most when they sit "past" the goal, often at map edges. Placement depends on the game, though random-path analysis can pick spots automatically. Only the heuristic changes, often in about 20 lines, and memory grows with landmarks × nodes. Demos on Dragon Age, Cogmind and maze maps show A* searching far less of the map.


r/gamedev • • 9h ago

Discussion Separating logic & visuals with model-view-control and assembly definitions

1 Upvotes

Hi Gamedevs,

I've been working on a Unity project for the last 4-ish months, and I think I finally really understand the two most common pieces of gamedev advice that I've seen:

  1. Separate game logic from visuals
  2. Build a prototype, then start the real game from scratch

I just spent the last couple of weeks refactoring my game (#2!) using a model-view-component architecture (#1!), and I thought it would be useful to share some concrete details for this abstract advice. I also have some diagrams and more info in a devlog if you're interested: https://karum.dev/2026/10/12/decoupling.html

For some background, I started Kārum in July 2026 as a economic strategy game set in the ancient near-east. I prototyped it my usual way, by dragging GameObjects into a scene and attaching all of the game logic as MonoBehaviours. This works fine, and I think it's a great way to quickly iterate on game jame and prototype projects, but I started running into a few issues:

  • I had too many public fields and kept confusing myself (e.g., did I just adjust the market or temple or crown silver on this city object)?
  • Who should own non-physical systems like trade routes? A new GameObject? Cities? A TradeManager? A TradeHub component?
  • Everything was coupled, and new systems required a lot of dragging-and-dropping.
  • I am starting to have some real gameplay, and each system used an ad-hoc logger that was painful to set up and use for balance.

These are all self-inflicted problems that can be solved with good discipline... but after reading about assembly definitions in Unity, I realized I can also have the compiler force me into making good architecture decisions.

Assembly definitions are basically self-contained C# libraries. This makes it really easy to enforce a model-view-control architecture, because the compiler will throw a compile error if you try to call View/Control code from the Model, for example. I ended up with a handful of .asmdef files:

  • Sim asmdef: this is the core gameplay logic, which updates per tick. This has no other dependencies and is not allowed to call any UnityEngine code.
  • Authoring asmdef: this contains all of the data for the game, including the initial resources/buildings/trade routes of each city. It depends on sim asmdef.
  • Interaction asmdef: this holds the model and view components, and it depends on the sim, authoring, and Unity.InputSystem asmdefs
  • UI asmdef: this is a special UI-only asmdef that depends on Interaction and all of its dependencies; this makes sure nothing outside of the UI can reference it.
  • Editor asmdef: these are custom editor scripts that depend on sim (to pull state data), interaction (to sit on GameObjects) and authoring (to display outside of play mode)

Pulling the sim into a separate asmdef also means I can run it headless as plain C# code. I can simulate about 100 years in ~5 seconds in the Unity Engine now. In headless mode I can simulate 100 years in about 2 seconds, and I can run 64 parallel simulations in ~5 seconds. So I've effectively increased my throughput 64 times!

I think this is important for simulation-heavy games, because now I can do parameter sweeps as part of balancing, and find configurations (prices, supply/demand coefficients, decision thresholds) that look fun.

This might be obvious to many of you, but I figured it's always helpful to have another concrete example of how to implement this and why it's important.

And please share any of your own architecture hot tips!