▲ 23 r/spacegames+6 crossposts

[WebAssembly Preview] Engine update! Progress in indie game! No gameplay, but simulation works efficiently in a browser, some visual, a lot of backend :)

I have published a preview of the engine at (just a technical curiosity, not a game yet!): https://akryllax.github.io/epistrata-runtime-demo/

No download required, only Firefox/Chrome!

I have been progressing on my indie game with my game. After a lot of effort on allowing +16.000 entities doing their thing in real-time, and having some initial dev shaders, a Google Maps-like feel over the whole galaxy.

It's a epistemic knowledge, graph-based simulator, with individuals taking action based on layers of personalities, plans, goals and knowledge (not fully implemented, but POC is there!). I am applying all my simulation knowledge, plus research on other things to build the backbones of what my game will be. All of this is the background, the stenctil, and it will build over this simulation.

And now I ran a small experiment: my project maps nicely into SDL2/3, and code format and architecture is quite strict, so I was able to port to WASM through emscriptem. AND IT WORKS. Way better that expected in fact. Like, less than 2% loss of performance.

But this gives me relief, the simulator model I have been thinking about is not only viable, but performant.

This is not a game demo, is an engine POC, so there is no gameplay.

If you insist on taking control of a ship and issue move commands, you will have to:

  1. Select any ship.
  2. Open the ECS Inspector (F2)
  3. Add the component `PlayerTag`.
  4. Congrats, you have a ship.

For issuing commands, right-click or shift-click.

---

Performance monitor (interesting feedback for me):

  • On the time bar, at the top-right, click the right-most item, it will open Performance monitor:

https://preview.redd.it/ithx8n4nx0ih1.png?width=497&format=png&auto=webp&s=a0975984baa5588a1fc12d93dbb7cc90c02a9ae8

Controls:

In-game:

  • WASD: Pan camera
  • Mouse wheel, Q/E: zoom in/out (Zoom is mouse relative! point at what you want to zoom!)
  • Drag select: select entity
  • F: Follow entity
  • Numbers 1 (default), 2, 3, 4, 5 (recomended): Time speed controls. WASM is unnotimized, so I recommend using AUTO / 5 so engine automatically runs as fast as your PC allows.

Debug

  • F1: log window
  • F2: ECS Inspector (for tweaking values)
  • F3: Open Intelligence Grid map for active system (what each faction know about the world)
  • F4: Planner Panel (Plan Monitor): if you enable the checkbox, it starts tracking the selected's entity plan.
  • Open performance monitor:
  • Toggle Editor Mode: Shift+E

---

Viewing additional things: click buttons on the "Tools", or click the checkboxes at the bottom of the ECS Inspector.

Control are all over the UI cos these windows are NOT intended for the final product, and I have too much to do to change the devUI.

u/Akryllax — 14 days ago
▲ 76 r/gameenginedevs+3 crossposts

SDLTest Engine, because naming things is apparently harder than simulating a galaxy - sharing a lil' happiness

To whoever will listen, I wanted to share my happiness of today:

I have spent 18 months working on a 2D Data-oriented-Design / ECS game engine from scratch. Started from me doing a small test in SDL2 (the repo it's even STILL named "SDLTest"). Now, any small test that works and is fun has some big risks if you value your time.

I am a big, big fan of RimWorld, Kenshi, Dwarf Fortress, StarSector, etc., and have being thinking about what could be my thing to give to show to the World. Professionally I have been in many industries focusing mainly in C++, simulators, high-performance networking, high-reliance oil/fuel management, corporate stability-over-performance solutions...

And I have had a recurring thought of what game I want to play. I love space, I love sims, I love colonies, and I love dynamic storytelling.

Now the stupid question:
"Can I build a game like my favorites, but give it a spin where the world actually knows about you? And make it feel like Google Maps in scale and presence?"

But having the scale I need requires custom engine, very tight design, a different software development paradigm from what I am used to so I started reading.

I have spent SO MUCH TIME learning. SDL2, ECS/DOD/POD design, ImGUI, LOD-rendering, SDF shaders, normal shaders, rendering instancing/batching, streaming technology (residency/lease model), proper memory alignment, DOD/POD design, tick-rates, scheduling, variable tick-rates, and that's just to have "something" on the screen!

Then I went into receding horizon planing, GOAP, HTN (-lite), learnt new damn words (epistemic, hysteresis, blackboard, percept, AND MORE). And optimizing stack caches, look ups, phase-timings. Even I got an "intelligence"/"knowledge" "map" of the world. Each factions only know what it has seen! World "fact" exists, but only an observer conveys "meaning".

And that created a bug where Scouts/Probes (max. curiosity) consistently tried to crash into any other's faction objects "to see their insides" as the colliders hid vision/knowledge disregarding their own safety. That was a fun one.

And game design! User-experience! What is the 1st hour! The 10th? The 100th? What are the goals? How do you make stories from emergence? Little actor that have their own thing going on, a faction that nudges them, and then there's a war?

During all this time I focused on having a few solar systems, a few traders and scouts and some devcontent. Just making the small pieces and systems one by one with the theory that this would all work together.

---

I have finally ventured into testing if my premise was correct. From 3 systems to 11, and now I have spent last 3 weeks moving into a 500 Solar Systems simulation with procedural generation, with 9.000 live entities, each doing their job. In a single thread. AND, IT, WORKS!

All this time micromanaging my architecture, sealing design invariants, finetunning, coding, debuging, making new systems, ductaping things, tools to inspect the tools. And today I have reached it: <9 ms frame. For a 500 solar system galaxy. 9.000 live entities, all pursuing a task. Live view of any part of the galaxy, at any time, at any scale.(*)

This proves to me that I can make my game. There is STILL SO MUCH MUCH to do, but I am so DAMN happy, and I do not know whom to share it with, so this is my welcome message for anyone who cares!

Thank you for reading!

(*) - theoretically, this test prooves it to me, but there's so much left to do.

u/Akryllax — 28 days ago

After 18 months, I finally got my first game engine's PoC online! I thought it was possible, but seen it running... :')

I am a big, big fan of RimWorld, Dwarf Fortress, 4X, StarSector... They are incredible gems. And I always wanted to be a gamedev. I even focused my career to eventually do my own thing eventually. And I have spent on-and-off the last 1.5 years on it.

Today finally I was able to "see" that my idea might be even viable!

500 solar systems, 9k Entities doing their thing in this first PoC stress test of my engine (traders trading and probes for now), zoom in/out and inspect anything, anytime. Whole galaxy sim will run deterministically.

Player and IA (traditional game AI, non-LLM) act on the world on the same knowledge and verbs.

And now fort the first time I have been able to put all of them together before loosing motivation as full solo! And I think that my design CAN work, and the time wasn't wasted! Lot's to do, lot's to do!!!

Time to keep on keepin' on!

u/Akryllax — 29 days ago

Very early galaxy map and Black Hole in my Galaxy Sim

I am making a Sandbox Galaxy system simulation, where player and AI Factions act on the same verbs and information.

Faction AI and Agent (individual ships) are non-LLM AI factions / traditional robot AI. (actual Goal-Pursuing, Doctrine/Policy-following traditional robots on imperfect or biased information).

Knowledge and Intel is the MOST valuable resource. The Player and the Faction IAs fight to contest their own personal agenda, and each perceive the same Physical Phenomenon differently.

A ship exploding might mean your friend dying, but for your enemy? It's a victory! And it will something to remember for both.

---

It's being a long damn process, but I am getting closer and closer to what I want. I am a fan of RimWorld, Kenshi, Dwarf Fortress, Caves of Qud. And now I am getting close to ready to show my World.

And I am learning A LOT about reasoning, simulation collapses, optimization, Data-oriente-Design, hierachical simulations, Shaders. And it's being a blast!

u/Akryllax — 1 month ago
▲ 18 r/gamedevscreens+1 crossposts

Full (traditional non-LLM) Trader Game IA, trading for food between systems!

I am making a Galaxy system simulation, with non-LLM AI factions / traditional AI Factions and Agents. The Galaxy exists, resources are limited, and each Faction hold it's own perspective of the World.

For a Trader a stray bullet is trouble, but for a Pirate? Maybe it indicates there's a little fun from where it came from! Knowledge and Value depends on the observer. And other can lie. Or the Station you saw 1 month ago might not be there anymore. Knowledge is better that your guns!

---

Marketing aside, I am just so proud of having an actual chain-of-though, where my traders are able to scan if they know any profitable routes nearby, if they have enough Credits, enough Fuel, or enough Credits to buy fuel & perform a sale, if trade route (to their knowledge) is safe, etc.

I am only at like 5% of development after more that a sporadic year and a half... But I am happy. And learning!!!

Can run 40k agents in parallel in a single thread, without simulation LOD yet!

u/Akryllax — 1 month ago

Flamegraphs, because I seem to like suffering?

I just reduced ~25% of CPU time per frame... But I am going to sleep now.

u/Akryllax — 2 months ago
▲ 2 r/GameDevs+1 crossposts

Space Dissident - Funny AI bug from emergent functions

I just had to share. Was developing my AI knowledge gathering functions in my game where I rely purely in emergent gameplay, and when doing some test, for no reason AT ALL, the Scout, whose ONLY job is to scan the core of the system, decided to HEADBUTT FOR DAYS any AI ship of HIS SAME FACTION outside of the solar system. Why? Good question! THERE'S NO CODE THAT ALLOWS THIS TO HAPPEN.

u/Akryllax — 3 months ago
▲ 3 r/indiegamedevforum+2 crossposts

Small Update into my simulated 2D Spacesim game! Now it's starting to look like a game!

Small interative progress, but now there's traders, refueling, barebones intel layers, AI FSM, arbitration, player UI, and all very slowly is taking form!

u/Akryllax — 3 months ago