NetMission Engine


I wanna see some videos!!! :smiley:>


So you’re saying there is a chance even someone like me can use the engine? Because that would be awesome, yo.


No guarantees or release dates yet, but sometime in the distant future I might release my engine as a game development tool for others to use. Every line of code was carefully designed by the same person, so what it lacks in sheer numbers of contributors it makes up for in creative style, uniformity, and thought.

Except for the many areas where the design just outright sucks. Time for some history!

Check out the first 18 lines of the original DefendYourFlaahgra sunchamber code (June 2013):

sounds/cry.wav,sounds/geemer.wav,sounds/low.wav,sounds/panel.wav,sounds/pause.wav,sounds/tentacle.wav,sounds/transform.wav,sounds/zoomer.wav, sounds/explode.wav,sounds/gas.wav,sounds/place.wav,sounds/cry.wav,sounds/bombu.wav,sounds/crate.wav,sounds/event.wav,sounds/ready.wav,sounds/beam.wav, sounds/spit.wav,sounds/spit2.wav,sounds/growth.wav,sounds/hello.wav,sounds/double.wav,sounds/ghost.wav,sounds/threat.wav,sounds/scythe.wav,sounds/ghostcry.wav, sounds/ding.wav,sounds/ding2.wav,sounds/ding3.wav,sounds/ding4.wav,sounds/ding5.wav,sounds/metroid.wav,sounds/ridley.wav,sounds/falling.wav,sounds/crash.wav, sounds/gunship.wav,sounds/no.wav,sounds/burn.wav! calm.ogg,gameplay.ogg! Arial.fnt,CourierNew.fnt! badZoomer.png,goodZoomer.png,flaahgraClosed.png,marker.png,badTentacle.png,goodTentacle.png,goodSky.jpg,goodCrate.png,badCrate.png,sunchamber.png,ground.png, goodGeemer.png,badGeemer.png,badBombu.png,goodBombuExtra.png,badBombuExtra.png,badEyon.png,goodPhazon.png,badPhazon.png,phazonParticle.png,badPuffer.png, goodSmoke.png,badSmoke.png,goodBlast.png,badBlast.png,badChozo.png,goodChozo.png,goodSap.png,badSap.png,goodHive.png,badHive.png,spit.png,badTangle.png,goodTangle.png, goodFish.png,badFish.png,goodTank.png,badTank.png,leviathan.png,orpheon.png,goodRidley.png,badRidley.png,gunship.png,badMetroid.png,badPanel.png,goodPanel.png, glass.png! zoomer,flaahgra,tentacle,crate,frameInit,circleEmitter,chamberBG,panel,geemer,pulseBombu,pulse,eyon,phazon,puffer,distraction,gasExplosion,fungus,blastcap, ghosts,spit,beam,fish!! newFlaahgra.nmem,pulseBombu.nmem,goodBombuExtra.nmem,eyonOpen.nmem,eyonFire.nmem,eyonLaser.nmem,eyonDeath.nmem,puffer.nmem,goodSmoke.nmem,badSmoke.nmem! flaahgraIdle.nmma,flaahgraGrowth.nmma,pulseBombuIdle.nmma,goodBombuExtra.nmma,flaahgraDoubleSlash.nmma,flaahgraDance.nmma, eyonOpen.nmma,eyonFire.nmma,eyonLaser.nmma,eyonDeath.nmma,puffer.nmma,goodSmoke.nmma,badSmoke.nmma,flaahgraIdle2.nmma, flaahgraSpitLeft.nmma,flaahgraSpitRight.nmma,flaahgraSlashLeft.nmma,flaahgraSlashRight.nmma!

YUCK. That is every single resource used in the Sunchamber room, formatted in a specific way. I was in a rush, and I just didn’t have the right knowledge to whip up a decent parser in such a short time between homework assignments. It worked and that’s all I cared about.

As you can imagine it was one of the very first things I fixed after releasing DYF. It turned into this (still back in 2013):

--[[ @NetMissionResources [Font] Arial.fnt; CourierNew.fnt; [Image] marker.png; [Music] calm.ogg; gameplay.ogg; [Sound] sounds/tentacle.wav; sounds/transform.wav; sounds/place.wav; [Object] flaahgra; frameInit; chamberBG; fish; panel; eyon; phazon; tentacle; crate; --]]

Now only the room-specific resources are listed, and the ones attached to objects are now part of the object code.

I may have already mentioned this change, way back when. I can’t remember. But what you didn’t see is how the game’s code actually uses these objects. Here is an example from the original DYF code:

[code]local arial;
local courierNew;
local marker;
local badMusic;
local goodMusic;
local tentacleSnd;
local transformSnd;
local placeSnd;

function Init()
? ?..
? ?arial = getResourceHandle(“Font”,“Arial.fnt”);
? ?courierNew = getResourceHandle(“Font”,“CourierNew.fnt”);
? ?marker = getResourceHandle(“Image”,“marker.png”);
? ?badMusic = getResourceHandle(“Music”,“calm.ogg”);
? ?goodMusic = getResourceHandle(“Music”,“gameplay.ogg”);
? ?tentacleSnd = getResourceHandle(“Sound”,“sounds/tentacle.wav”)
? ?transformSnd = getResourceHandle(“Sound”,“sounds/transform.wav”)
? ?placeSnd = getResourceHandle(“Sound”,“sounds/place.wav”)
? ?..
Again, YUCK! All that effort required just to use the resources that are already listed in the header. For every resource you want to use, you have to list the file name twice, the variable name twice (which is already related to the file name), and even duplicated statements about the type of resource. That’s a lot of hassle just to add a new image to your room.

So now here is the final code as of today:

--[[ @NetMissionResources [Font] arial@Arial.fnt; courierNew@CourierNew.fnt; [Image] marker@marker.png; [Music] bad@calm.ogg; good@gameplay.ogg; [Sound] tentacle @ sounds/tentacle.wav; transform @ sounds/transform.wav; place @ sounds/place.wav; [Object] flaahgra; frameInit; chamberBG; fish; panel; eyon; phazon; tentacle; crate; --]]

This does everything from the previous code blocks, making it so much more powerful. If your in-code “handle” name is different from the original identifier (like file names), you just add the @ sign. If they’re the same (like the objects here), then don’t bother.

If you want to use a font, it’s now there for you as “NMFont.arial”. Or playing music, it’s now there for you as “NMMusic.good”.

We could improve it even further, but there are more pressing matters to deal with next. This is another one of those usability issues that I didn’t quite realize until I started writing NetMission’s how-to guide, writing these instructions out, step… by… step.

Liks: I don’t know if a video would be useful for most of these engine updates. :frowning:



this makes me want to go work on my RPG engine some more, but am made of stuck


I’m watching this for sure.

Glad you’re writing a comprehensive how-to guide, as it means I might actually be able to do something with this.

I do have a feature suggestion, though it’s going to be hard to articulate: would it be possible to fade between graphics during a sprite rotation? For example say P2D goes to mouse aim. Could you sprite the 8-direction arms, then have the engine fade between them as it rotates through the aim circle? Primary focus for this would be to keep the light source proper.


Today is an important milestone for NetMission: the user guidebook has a full draft, and a private version of the engine was sent off to the IRL person. The idea is that this person will try to make a game using it and will send me questions and feedback along the way, which can only help.

I included with it a strange non-game where you blow bubbles and things happen. Use your imagination.

Of course! This is already totally possible, though perhaps by tedious means, but there are plans to support easier ways to get that kind of effect, too.


Hey look it’s 2015!

It’s fun to think that just a year ago…

  • “Defend Your Flaahgra” no longer worked in the latest version of NetMission, so I had to spend a week porting it over.
  • Shaders were not supported, so there were no modern special effects (such as in the previous post).
  • NetMission still couldn’t go full-screen, ladies and gentlemen, because there was no support for pixel canvases.
  • TMX tilemap files were not supported, so aspiring game developers like YOU were unable to quickly design huge and intricate worlds without even needing access to NetMission. (Wink wink)
  • NetMission was much buggier and bulkier (it had 6 additional DLL dependencies!).
  • There was no witty 50-page guidebook (no joke, I just pasted it into a docx to check the length) explaining how to make a game in NetMission.
  • Nobody was making games in NetMission, not even me, so I had no idea if it was hard to use or not.

Here’s to seeing what 2015 has in store. :slight_smile:


Cool things happened in the last two weeks:

I don’t always follow hip trends in engine design, but when I do, it’s because it speeds up the game development by like orders of magnitude.

2.) Installed a whole pile of software-verification freeware thingies, in addition to the ones I had before. Ran them on my code, found some issues, made some tweaks. Engine slightly faster and safer than before.

Edit: MINI UPDATE 2/17/2015
The last month was the busiest of the year for my schoolwork, concerts, and auditions, so not as much got done as I’d hoped. That said, I fixed some bugs with the real-time game editing system, and I have been revising big chunks of the engine to accomplish the same tasks but with much less code. I hope soon I will be able to work on the next big features I have planned for this year.


Does your engine come with cheap k ichens?


Man, k itchens are totally going to be an easter egg in one of my future games, that’s for sure. :sweat:


I would really like to see a HULK SMASH! demo. The stuff does not have to break or explode but they cold fly away when you smash them with the green fists of awesomeness.


Hey guys.

2015 went by and I never bothered writing a post here. Not sure why – there were plenty of interesting developments in my game engine. And this is the only place where I share my work with anyone. Oh well… I’ll fill you in on 2015 eventually.

One of the recent developments in 2016 was improved text display. NetMission has always supported “bitmap fonts” as generated by a program called BMFont. A “bitmap font” is a set of images with all your game’s letters, numbers, symbols, and other glyphs squished together, like this:

These images come with data files that store things like the coordinates for each letter on the image above. So when NetMission displays text, it’s basically just copy-pasting small regions from the image and putting them in some order on the screen. The more you type, the longer it takes to display, because there are more glyphs to place down each frame. But it’s reasonably fast and simple.

What happens if you want to show your text at different sizes and rotations? It would be like zooming in or out in an image viewer.

These fonts don’t re-size the same way they would in your web browser or word processor. We’re dealing with a limited set of pixels, and they can lose focus quickly. Can you even read the tiny “Wlfh Fiffer”? Maybe your game’s style loves blurred or pixelated text! Maybe not. Either way, if you want crisp clear text at arbitrary sizes, you’ll need to generate a new bitmap font for each size in advance. This is not okay.

So recently I added support for a bunch of standard formats, like TrueType Fonts (.ttf files). Instead of pixels, these store math formulas for curves, regions, and other info. This makes resizing look so much cleaner:

Thankfully there’s this wonderful library called FreeType which reads font files and renders the glyphs. So, problem solved, right? We can render any text we want, right?

I wish. Coding is never that easy! Here are a few of the issues I encountered.

First, the “point-size” is apparently unrelated to the camera’s perspective. Check out what happens if you zoom in on 12-pt Times New Roman text:

Wonky! It’s what they call “hinting” except I’m doing it at the wrong level. At first I tried fixing this with some math. I would estimate the proper pt-size, based on the current camera perspective. If the camera zooms in, the pt-size goes up proportionally, and the text looks fine. Thus 3x 12pt becomes 1x 36pt automatically. This approach could make a whole blog post on its own, as it involves reading from the OpenGL ModelView matrix and crunching numbers into a single “scale” value. Long story short, I found a better approach for games (keep reading), so I re-purposed that code into “smart circles” instead. Circles in NetMission are secretly just polygons with many vertices, but that ugly secret is revealed if the camera zooms in. Not so with “smart circles”! But again, that’s a topic for another day.

Second, FreeType doesn’t handle interactions between glyphs when you put them side-by-side, or if you’re supposed to read them in a different direction. This is no big deal with non-cursive English letters, but then these are supposed to be the same word:

This could be fixed if I switched to a thing called Harfbuzz or a thing called Pango (which uses Harfbuzz and is part of Cairo), but as you can tell by the wacky names, these things are meant for Linux and I honestly couldn’t get them working properly in my Windows setup. For example, Harfbuzz uses FreeType which uses Harfbuzz, because that’s obviously a good idea. If the dependencies aren’t resolved, Harfbuzz has incorrect results. I gave up for now. Hopefully those two libraries will merge someday. They’re just milking out how many episodes it takes before they get together. We all know it’s gonna happen. Can’t wait for the season finale.

Third, rendering from math curves is much slower. With bitmap fonts we were plopping down just a handful of items (glyph cutouts), but now we are generating 100,000+ items (pixels)! This can work in real-time, but we can do better. NetMission renders all these pixels once, saves them as an image, then displays that 1 pre-baked image onto the screen each frame. You wouldn’t even know that NetMission generates these images if I hadn’t mentioned it. It’s like stamps: design once, paste many times. Anyway, remember the zoomed-in 12pt Times New Roman font that didn’t work out earlier? Here’s what happens now:

The distinction between 3x 12pt and 1x 36pt makes real sense again. As a side note, NetMission’s image-loading system was the oldest code in the engine, dating back to 2007 or so, and it only knew how to load images from files. I’m not going to save a new file on your hard drive just to read the file back in again! So I completely rewrote NM’s image loading system, which is now 10x awesomer and half the lines of code. I guess that’s yet another post for another day.

Fourth, no font has all possible characters in it, which is actually a limitation of the common formats (like TTF). So a robust font usually comes as a “family” of files, including bold and italic versions and many language groups. This means if I want Korean characters next to Russian characters, NetMission would have to figure out which file has which characters or fall-back to some other font. As far as I can tell this is an annoying and slow problem to solve, especially in the middle of a videogame frame. I didn’t find a solution yet.


Anyway, NetMission now lets you use both methods (NMBitmapFont and NMFreeType) for fonts. They each have their pros and cons. NMBitmapFont text can change in a snap, so maybe you’d use this for fast-scrolling dialogue text, but it might chug with too many letters or look ugly at an angle. NMFreeType text looks better and stays fast for as many letters as you want, but it takes a hit to create and change. Neither method is dependent on the operating system and will look pretty much identical across platforms.

Most importantly, your game doesn’t care which is which. You make a “text” object and give it a “font” and it just works. It’s a unified interface, even for things like centering or right-aligning. Plus full Unicode support (for UTF-8 encoding) for anyone who knows what that means.

So, this step had to happen at some point. Can’t have a real game engine if it’s stuck with ASCII bitmaps. I am glad I can move on to the rest of the engine now. Perhaps I’ll make a few posts like this for all the 2015 work I never mentioned, haha. Until next time…


And I’m back!

Many lines of code have changed in the past 4 months. I haven’t tied any loose ends yet, but man, this engine is going to be at the next level when I put it back together!

So, “Objects” and “Rooms” turned out to be the same thing (weird, right?..). I began merging their code and designing a new approach to scripts, AND the story after that is like this gif:

Designing such and such thing required adding this thing, which requires improving this thing, which requires redoing this thing, which requires upgrading this thing, which requires fixing this thing, … Some of this code was as old as 2006. Not anymore!

Yeah, I know. I redo old components way more often than I add new ones. But I redo them because I need to add something new, and the new thing doesn’t fit well with what’s there. It’s easier to take it apart, clean out all the joints and gizmos, and put it back together with several cool upgrades included. After this little stretch, it won’t just be the same old engine with some “shiny” insides you can’t see. There will be several major improvements and additions that make life a lot easier, for players and game developers alike. But I don’t want to spoil everything yet because…

I started a Development Blog for NetMission!
It has no posts. :smiley:
My next feature-length update (like the fonts one above) will go there, and I’ll post about it here, too. You should expect these updates to appear as often as usual… which is like what, 2 per year? :unamused:





Right… <_<;

I planned out the initial “season” of blog posts to sort of chronicle and summarize the events of the game engine thus far… But writing blog posts takes a lot longer than I expected, so that project is on hold until my life gets a little more stable.

As usual, I have indeed been working on the game engine, slowly but surely! Actually, the engine is expanding in several directions because I am re-using NetMission code in other personal projects not related to games. This puts more demand on NetMission to have sufficient features, organization, tests, etc. which has been quite beneficial for it overall.

Here are a few highlights since my last post (which was a little over a year ago, oops!):

  • Better file directory management
  • It’s DPI-aware, so if you’re on a high-DPI/Retina display like an MS Surface tablet, the game won’t be auto-scaled up and blurry like older Windows apps.
  • The multi-threaded resource manager got some subtle but important bug fixes, so it’s as robust as ever.
  • New standard support for “parameters” or “arguments” when requesting resources, meaning if you want to load an image with a specific transparent background color you would just request something like myImage.png{"transColor":[128,255,68]}

And lots of other stuff that’s probably too detailed to bother mentioning. I have a GUI system in the works which will be amazing when it’s up and running, and I’m almost done putting together a pretty darn extensive input management system. Again, the benefit of having a one-developer-only engine is that the design can be more cohesive and limit-pushing, rather than a jumbled mess of current standard features. We’ll see what comes of this!

EDIT ON 7/25/2017:
Images now load with proper orientation based on their EXIF data (JPG only). In other words, if you take a photo with your phone and put it in your game, it won’t show up sideways. :slight_smile:
Also, you can now load PDF pages as images. Not the most useful feature, but hey, if you want your character to be able to read books in the RPG town library, you can just type up some PDFs and they’ll work in the game. Woohoo?


Pictured: NetMission Engine.

It took me a long time to choose what feature creep image to use


Haha. Well, those last bits are because I’m making an app that needs correct JPG orientation and PDF support. Down the road I’d imagine that this other app will just became a regular “game” within NetMission rather than heavily depending on NetMission’s code, but… You’re right. I’m definitely walking sideways.

The next direct goals for NetMission are as follows (in no particular order):

  • Finish the multi-threaded input processing system along with its window/graphics interactions (hard to describe but very important that this gets taken care of)
  • Pick a new demo to work toward (must be something that would push the engine to the next level like DYF did)
  • Plan out a blog post
  • Tie loose ends on the tile map support
  • Experiment with networking again
  • Improving developer tools and experience
  • UI widgets
  • Better integration of physics/collision
  • Better audio
  • Stacked shaders

If you see me announcing features that are not any of the above, it probably means I’m working on an app that “uses” NetMission, so I had to add those features to NetMission first. Feel free to call me out if I do that. This post is your ammo. :stuck_out_tongue:

EDIT: I just restored all my Photobucket images in this topic that had stopped loading. Enjoy the pretty screenshots again. :smiley:


I just thought it was funny, especially considering this line in the same post:


Alright, here’s an update that’s actually legitimately important for the engine! It’s called input buffering with timestamps.

I made a little drawing demo for myself to test it out. Check out this image:

These are my attempts to draw the same message for you twice by plopping circles down, each circle representing a frame of gameplay. But here’s the kicker: BOTH of these screenshots were taken at TWO FRAMES PER SECOND (fps) because I injected some artificial lag. (They were trying to run at 60fps but just couldn’t keep up)

The one on the right is what the engine used to do in such an extreme circumstance, in that it’d mush all of your input together into the next time the screen updates. All those points probably have 30 or so circles all resting on the same spot. So if your game lags a bit, you can’t plop down a smooth line of circles. That is a major problem because suddenly gameplay depends on your computer’s hardware and background processes.

The one on the left is what the engine does now. Even though you won’t see a smooth animation at 2fps, at least the game engine knows where your mouse is at all times! Imagine this with keyboard presses and you can begin to understand why this is important. I have definitely run into issues with state-of-the-art graphic-intensive games before where all I need to do is nudge something to the correct spot, but since the fps has dropped it’s either nothing or a big push, making it incredibly frustrating to move on. That simply won’t happen in NetMission. :sunglasses:

As a side effect of this, it also means that the game will keep running even if you grab the window and are dragging it around the screen. That hasn’t been possible since the early experimental days of NetMission.

Yeah, it’s not the most exciting or important feature, but it required completely tearing apart large old chunks of the engine and carefully piecing them back together. Honestly I got halfway, and looked at my broken disassembled mess, and it was enough to make me lose interest in working on NetMission for a while – I can see why so many games just don’t bother. But now the engine’s sparkling with newness and we’re back in business!


Hey, thats pretty good. But where can I download NetMission? or is it not available to download yet?