opticfluorine | Sovereign MMORPG Engine

opticfluorine | Sovereign MMORPG Engine

@sovereignengine.com

Developer of Sovereign Engine, an open source 2.5D MMORPG engine. https://sovereignengine.com | https://github.com/opticfluorine/sovereign #gamedev #mmorpg #programming #software #gaming

2K followers4K following75 posts

I've been using Lua coroutines for dynamic entities in Sovereign Engine. They're a very intuitive way to model complex dynamic behaviors. But how well do they scale in memory with large numbers of concurrent entities? opticfluorine.dev/posts/lua-co... #lua #scripting #gamedev #performance

opticfluorine.devMemory Overhead of Lua CoroutinesLately I’ve been working on adding NPCs to Sovereign Engine. Sovereign uses Lua 5.4 for server-side scripting, and after playing around with behavior scripts for a while, I’ve settled on a design I li...

Sovereign Engine's NPC support is now 50% complete! The integrated NPC editor together with Sovereign's powerful scripting engine will allow creators to make rich dynamic game worlds for their ORPG. Stay tuned for some demos in the near future. #gamedev #rpg #orpg #mmorpg #indie #opensource

Thinking about procedural generation of large worlds... The Minecraft approach - multiple noises feeding elevation, surface decoration, biome picking, etc - is very interesting. I want to try using wavefunction collapse for tiled noise as input to a higher layer - should be interesting. #gamedev

Just added to the server-side scripting in Sovereign: entity creation! Pass in a table of components, get back an entity. Doesn't get simpler than that. My to-do list of how to use this: * Put starter packs in new players' inventories * Spawn monsters everywhere #gamedev #mmorpg #indiedev #lua

Another fun bug: all of the sprites drawn on my GUI kept flickering, but only on AMD GPUs. Never NVIDIA. I was updating a uniform buffer for the texture offset. The graphics lib missed a barrier for uniforms. Patched library, sent a PR, works now. And that was my intro to Vulkan. #gamedev #bugs

View full thread

3/ I found out by breaking it with another bug. I made a typo that accidentally blew up the sprites to around 5x their usual size. Suddenly it was clear that it wasn't noise - it was the font atlas from the previous draw call. The texture offset in the uniform was still pointing to it - sometimes.

4/ From there it was straightforward. Inspect the barriers around the buffer update, find that the barrier scope didn't include uniform buffer operations. NVIDIA either implicitly applied a barrier or was just fast enough that it didn't happen. AMD on the other hand showed a race condition. Fun!

Another fun bug: all of the sprites drawn on my GUI kept flickering, but only on AMD GPUs. Never NVIDIA. I was updating a uniform buffer for the texture offset. The graphics lib missed a barrier for uniforms. Patched library, sent a PR, works now. And that was my intro to Vulkan. #gamedev #bugs

Favorite bug so far: early on I ran into an issue where the engine reported the mouse was hovering over an object one space down from the cursor. Turned out the mouseover code was fine, the renderer was drawing everything off by one and the whole world needed to shift. Oops! #gamedev #bugs

Modernizing the engine code is off to a great start - just got the server running again, but now with the built-in Dependency Injection and Serilog instead of Castle. Startup times are dramatically faster, and the code is much cleaner! Next up, getting the client to run again. #dotnet #gamedev

The old way of doing dependency injection: reflection-based containers that compose from the inside out at runtime. Switching to a modern outside-in container is a mental shift, but gives much cleaner architecture and better alignment with .NET source generators. Worth it. #dotnet #ioc #programming

Taking a break from implementing the Lua scripting backend in order to eliminate some technical debt. .NET has changed a lot since I started tinkering with this project, and it's time to catch up with Generic Host and the built-in dependency injection. Big effort, but worth it. #dotnet #gamedev

“What if you just actually modeled another world, in as much detail as possible, and let players loose?” -- Raph Koster, Ultima Online's Influence This is what inspires me. I think an open source engine, free of any commercial obligations, can achieve this. And it's fun to build a game like this!

I've been working with C#'s Incremental Source Generators to generate bindings between the engine and the Lua scripting language. I'm really liking it so far - it makes it very easy to apply functional programming to the syntax tree and generate code. It's readable too! #dotnet #gamedev #lua

opticfluorine | Sovereign MMORPG Engine reposted

If Balatro proves anything, it’s that less is often more. You don’t need flashy graphics, a deep story, or a sprawling universe to make something great. Focus your scope, define your vision, and absolutely crush what you set out to do.

I upgraded the engine to .NET 9 and did some basic performance testing. Didn't see a significant increase in framerate (makes sense, it's probably memory-bound rather than CPU-bound). Saw some good improvements around compressing world data for network transfer though! #dotnet #performance #gamedev

To support my MMORPG engine, I maintain a fork of the #Veldrid graphics library for .NET. Since the main repo is dormant, I've been releasing bugfixes for its #Vulkan backend. Happy to share that opticfluorine.Veldrid 4.9.6 package is on NuGet, adding .NET 9 support! #dotnet #opensource #rendering

opticfluorine | Sovereign MMORPG Engine reposted

The #holiday season will soon be upon us, and I've been thinking of NGC 2264, "The #Christmas Tree Galaxy" image from #NASA Chandra (full credit in alt text). Obviously highly modified, but still a fun way to integrate #stem into holidays. It's the "star" of my holiday collection: bit.ly/3ZkPiJz 🧪🥽

Thinking about what #LLM and similar technologies could do for #MMORPG accessibility. Imagine if you could have a hotkey that piped the latest frame to a local LLM like #llama and have it read out a description of the scene? Instantly turn any MMORPG into a more accessible #MUD! #gamedev

View full thread

How about a #guild system like every good #indie #MMORPG has? How about #AI for #NPCs? Script it! How about letting the player buy plots of land and build whatever they want on it? A little different, but a key feature I want to add. And it's going to put the scripting engine to the test!

View full thread

Not so simple when you consider the usual instinct to keep doing what you're already doing. In the case of Sovereign Engine, that means developing every single feature in C# and leaving scripting to the users. And that's what I was going to do until I stopped to think about it. Bad idea!

So here's my new plan, and let's see how this goes: I'm going to build a scripting API early and start delivering real features as scripts instead of deeply buried engine code. We will start small: displaying a message to a player when they first log in. But we will build up from there - what else?

View full thread

You can try to anticipate future needs by writing #UserStories, listing out nouns and verbs, all the classic methods. This is what we all do, right? Suure. But here's the problem: even if you do this rigorously, you don't know what your real needs are until you are using the scripting APIs yourself.

That's where #dogfooding comes in. It works for #startups, it can work for #opensource game engines too (I claim with no proof... yet). The idea is to use the tools you are building for real development early and often, creating an internal feedback loop for continuously improving the APIs. Simple?

Sovereign is an open source 2.5D #MMORPG #engine, in a similar vein as Mirage and Intersect. The idea is for a hobbyist or indie dev to be able to pick it up and immediately start building something. That means we need a scripting engine so that you don't need to dive into the core of the engine.

A common pitfall with easy-to-use #scripting engines is that they aren't flexible enough to do everything you want, or the APIs were designed with the wrong #abstractions that makes it cumbersome to do anything but simple toy examples. This is something you have to overcome early in the design.