Tuesday, August 1, 2023

NetMission Engine in 2023

If you're familiar with NetMission already, maybe from playing some of the games it powers, or from engaging with Team SCU's community, then you're probably also familiar with how much of a mystery it is. One developer. Unclear intentions. And he disappears a lot. (Sorry about that.)

Let's fix that with a brand new...

Official Overview, 2023 Edition!

 

 

NetMission (NM or NME) is my private engine for making 2D video games. I started it in 2006 and have used it to produce games of my own as well as games with Team SCU. The most well-known of these was unfortunately discontinued, but it certainly influenced what I've built in the engine.

Today, NME has many features. Here's what you can expect to see in its games:

 

Pixel-Artwork Specializations:

  • Parallax can be difficult in low-resolution pixel-art games. NetMission combines the clarity of the pixel grid with the smoothness of subpixel blending for optimal results. Even without parallax, it lets me be fine-grained about exactly how each sprite should appear each frame.
  • Built-in support for SpinTroid, my 2019 pixel-art rotation algorithm with generally better results than the industry standard (RotSprite). SpinTroid can dynamically rotate entire scenes in real-time, as showcased in past games.

 

Special Effects:

Can be made using NME's GPU-accelerated graphics toolset which enables shaders, intermediate rendering, color operations, fully customizable particles, pre-multiplied texture alphas, sRGB gamma correction, and other such technical terms which I can cover someday. Players have appreciated that NME's games run smoothly on low-end hardware without sacrificing visual quality.


Fine-Tuned Controls:

Not discarding input data under stress: a surprisingly rare feature in the wild.

  • Player input is processed correctly even if the framerate were to drop or stutter, guaranteeing a reliably smooth feel.
  • [NEW!] NME now has controller support! Your feedback was heard!
  • [NEW!] Games can connect any device's signals to any player's actions via any possible data constraints, transformations, or grouped dependencies. Whew! In other words, I can now much more easily add spaghetti important configuration options to my games. Things like...
    • Button-mapping screens
    • Local multiplayer (even within one keyboard)
    • Customizable controls per character/nametag/controller/save slot
    • Arbitrary deadzone shapes
    • Accessibility options for motor control disabilities (e.g. tap-to-hold, rapid-fire)
    • And so on

This system took me forever, but I'm glad I finally did it! Of course, making a nice GUI for all of of this would be its own project, but at least the possibilities are now at my fingertips.

I think the jump signal is coming from the fork actually.


Optimized Asset Management: (aka the nerdy stuff)

  • Uses a thread pool to stream game assets in and out of memory as needed without interrupting gameplay.
  • Handles multi-stage loading and cyclic dependencies with ease, verified extensively with math and tests.
  • At game publish time, processes and packs game assets for fast load times and small file sizes.


3D Audio Soundscape: 

Powered by OpenAL-Soft, which features a wide range of real-time processing (reverb, EQ, positional surround-sound, distortion, etc.), enhanced by NME with seamless chaining of different formats (ogg, mp3, opus, etc.) through an easy-to-use code interface. In NME's games I've been able to implement nifty effects like synchronizing gameplay to music as well as placing large numbers of SFX in the environment for emergent sounds (like a swarm of 52 insects each with their own little pitch-shifting buzz).


Spline-Based Animation Systems:

Just kidding. This system and its custom editing tools were NME's greatest achievement 10 years ago, but I decided to cut all support 5 years ago. (What?!) That's a discussion for another post. For now I get by with other methods of animation, but at least the gifs still look kinda cool.


Saving Done Right:

  • [NEW!] The save system is totally revamped! NME now supports flexible game-specific storage formats with automatic versioning, backwards compatibility, and sanitization. Saving & loading is multi-threaded (so no gameplay interruptions) and can even handle system power failures mid-save (so no data corruption).
  • Relatedly, NME provides easy methods to prevent leaking gameplay events across boundaries, even if you were to like, start a cutscene, pause the game, and reset to title screen all in the same frame. If you watch speedruns, you've probably seen people do stuff like that in other games to exploit bizarre glitches!

 

Physics:

Powered by Chipmunk2D and enhanced by NME with automatic polygon decomposition, tunneling prevention, more powerful abstractions, the ability to change structural state within callbacks, and other confusing phrases that I'll have to explain in a more detailed post again. (Especially since Box2D seems to be back on the rise!)


Multilingual Text Support:

Unicode? No problem. NME unifies BMFont and FreeType as one and can wrap text in a column, align it, scale it, rotate it, type it, and otherwise treat it like any other image. Pretty standard stuff, but it's important for this system to be solid.

 

Instant Publish: 

[NEW!] I can now generate sharable game packages at the push of a button! Yes, everyone would expect this from even the most basic of engines out there, but it used to take me many hours to carefully organize all the right game files and gradually coax NME into forming a new demo. The dark ages...


There are many more features, but those are the current highlights in my view.




NetMission also falls short in many ways. Here are some things I hope to improve in the future:

  • The "Net" in "NetMission" was supposed to suggest online play, which is nonexistent so far. (Lol)
  • NME is Windows-only. Native support for other platforms (Apple, Linux, web) would be nice.
  • There's no lookup system for text. All text is typed directly in the game scripts. (Yikes!)
  • Making games in NME means mostly just writing code, with minimal support for visual editors.
  • The graphics capabilities are not reaching their full potential. NME runs well on older hardware, but someday I'd like to take better advantage of modern GPU architectures. I'm behind the times.
  • The GUI-making system is incomplete. I sometimes just roll a new GUI system on the fly. (Bad!)
  • We're missing rich-text features, like stylizing specific words or handling right-to-left scripts.
  • It'd be nice to have model animations back, using standard formats instead of my custom system.
  • There are two phantom bugs that are incredibly rare but have been haunting me for years.
  • I believe NME has a lot to offer as a 3D engine, but certain modules restrict it to 2D for now.

It'd be so awesome to resolve all the above, so I'll try to make it happen!




Lastly, I'd like to discuss the development process so you know what to expect going forward.

Side note: As mentioned, NME is private. If you're excited about making games and want to get started, you should definitely check out the well-established engines out there like Godot, Unity, Unreal, Game Maker, RPG Maker, and so on. NetMission isn't equipped for wider use right now.

Well, what to expect is that things can move pretty slowly. As a professional musician, I don't always have much time to work on NetMission, and that isn't anything new. If I can get in maybe ~3 hours of coding most weeks, then something that a full-time programmer could accomplish in two weeks might take me over half a year.

It might sound like I should recruit help from others to make it go faster, but that would defeat why I work on it. For a number of reasons I could go into, opening NetMission at this stage could quickly hurt my motivation, momentum, and design philosophy. That said, when the time is right, I do hope to make NME available for others to use. One of my dreams is to make fun educational games, and if NetMission itself can be someone else's fun educational experience, too, that would be amazing. It's just not ready for that yet.

For now, I'll scratch my itch of making fun educational content by posting to this blog, and you can get involved in NME by leaving comments and suggestions on what comes next. It will take patience, but I'm treating this site the same as the engine: write a bit when I get a chance, keep the process fun, go all out, and occasionally I'll have something cool to show. I hope you can be on board with that. :)

 



Thank you for reading this far. I'm sure you have questions. Every paragraph and bullet point in this overview could easily be the topic of its own post and beyond, so I certainly have my work cut out for me!

 ~ Troid92

Wednesday, June 7, 2023

Hello, World!

...

It's about time I write something here.

I've had this Blogger subdomain set up since February 2016. "The story of a videogame engine, in the hands of a busy musician." I always got a kick out of the fact that this subtitle was followed immediately by "No posts." Sounds about right.

But despite my busy music career, the lack of posts on this page has been very misleading. In fact, I even continued posting my development stories elsewhere, although the images there didn't survive long. I'd like to bring those essays here, as soon as I figure out how best to treat them in this new context.

 

"Hold on. What exactly is this 'NetMission' you're developing?"

NetMission is my game engine. Kind of like how Microsoft Word is software for making documents, a game engine is software for making videogames. Over the years I've used NetMission to make a handful of games with others, which I'll talk about in other posts.

If it sounds unusual for someone to make their own engine from scratch, you'd be right! Nowadays if you want to make a videogame, you have many delightful engines to choose from, each backed by huge teams of hard-working and talented professionals.

But when I wanted to make an online multiplayer game 17 years ago, those options weren't ready yet. At the time, it somehow made sense for aspiring indie developers to grab a beginner's programming book and go about it the hard way. I had no idea what I was getting myself into, but I've stuck with it ever since!

Anyway, I haven't posted a significant write-up on NetMission in nearly five years, even though I've still been coding up a storm. Part of that is intentional, as I've had several good reasons to keep it under wraps. But things have changed to a degree, I suppose. Lately I've been getting the sense from others and from myself that it's time for me to start writing again, so... let's get started!

 

"What exactly should I look forward to, Troid?"

Good question! I do have a few guidelines for myself:

  • No programming experience should be necessary to follow along with my articles. Even as I dive into advanced technical topics, I want to make them as approachable and entertaining as possible.
  • This site should become the definitive center for everything NetMission, since information about it is currently scattered and/or nonexistent.
  • I should feel free to branch out into loosely related topics as needed. Games can reach into so many aspects of life, and a game engine should understand and support that.
  • I must write at least 1 article per year. I'll try to do more than this, but you'll have to forgive me as I am a very slow writer.

Otherwise, I am not totally sure what direction I'll go in yet. If you're reading this I am definitely open to questions and topic suggestions.

I guess we'll see how it goes!

 ~ Troid92