NetMission Engine


I apologize for neglecting my weekly updates for the last month. My internship ended, school started, and after what happened last winter (announced a January demo, released it in June) I’ve learned not to make any promises when there’s a semester of school ahead. But this may be my last year of intensive academia. :slight_smile:

My next tech demo was going to be an artsy interpretive one with all sorts of relevant symbolism, but I had too many ideas to build by myself, so I dropped that concept for now. Instead I have a much simpler idea which will do a great job of showing off the new features I’ll be adding to the engine. Expect it sometime before August 2058.


Seriously? 2058? I was hoping for AT LEAST 2050. Gosh Troid, you’re so slow.

P.S. I love you.


So, baby steps, but here’s a small feature I’m planning to implement next, just to shed some light what goes on behind the scenes…

As you may have noticed, NetMission loves to load its resources concurrently with the gameplay, like Metroid Prime loading nearby rooms without freezing the whole game. This means there can be any type of room transition you can imagine.

Defend Your Flaahgra (DYF) has 4 rooms (Team SCU logo, title screen, gameplay, game over), and the most interesting transition is from title screen to gameplay, where the camera falls down into the clouds and arrives at the sunchamber. If you’re on a slower computer, you may have noticed this loading text I built in. I’ve never been able to get past the first few lines, and usually I don’t get to see any of them, but here’s the full message that appears one line at a time:

Loading... Any second now... Pulling resources from that game file... Thought about getting a faster hard drive? Maybe there's something wrong with me...? Please tell Troid92 about this! We might be stuck. Try closing and reopening? I am so sorry. I tried.;_;
You can tell that the scene is still running because the text is fading between black and gray. I probably should’ve added more animation to this scene, but this subtle difference is something that sets NetMission apart from, say, Game Maker (at least from the last time I used it, anyway).


Flip around to the game developer side – like, through my eyes, as I made DYF. NetMission makes it very convenient to transition between rooms: just tell the engine something like, “I want these rooms loaded into memory next!”, then keep doing something until the next room is ready, then switch to that room. (You could in theory run the entire game inside 1 room if you want to specify individual resources to swap in, but that is less convenient). Plus you never have to tell NetMission when to remove resources from memory – it just knows.

HOWEVER, telling the engine which resources go with a particular room, is a huge pain in the butt. At the top of the room’s source code you have to include a crazy unreadable header that looks something like this:

courierNew10,Arial12! sapsac.png,ghost.png,Ridley.JPG,urmomlol.bmp,seedling.PNG!! seedling,ground,sapsac,ghost! explode.wav,click.wav,screech.wav!track1.ogg!! ridleyModel,seedlingModel!ridleyIdleAnim,seedlingWalk,seedlingShoot!!
This is disgusting, and it’s because I just didn’t have the time to make NetMission more user-friendly (after all, I am its only user right now :stuck_out_tongue: )

It also has a terrible drawback: objects and other resources do not get their own dependency listings like this, meaning that if you want to include the “seedling” object in your room, you just have to know that you will also have to add seedling.PNG, explode.wav, screech.wav, seedlingModel, seedlingWalk, seedlingShoot, … in the correct spots, or your seedling won’t function correctly (sounds won’t play, it won’t animate properly, etc.)


That brings us to the improvement I want to make. Here’s what I want to implement for the new header syntax:

--[[ @NetMissionResource [Object] healthPickup, bombSlot [Sound] explosion.wav --]]
It’s much more legible, and you’ll be able to put it at the top of any source file. The engine will figure out the dependencies for each room, object, and resource.

This means if you want seedlings in your room, all you have to put is “[Object] seedling” and the rest will be taken care of. Or if you’re swapping in/out individual resources during gameplay, you just tell the engine, “now I want to add a seedling on top of the current room’s resources!” and NetMission will begin loading the corresponding image and animations for you.

Much, much better.
Just gotta find a time to implement this fix…


If anyone’s still interested, I finished that thing in the previous post and made other important improvements lately. I’ve finally ported Defend Your Flaahgra from NM3.0 to NM3.1, so that I have a full project on which to run new experiments.

But the next little feature on the way: Shaders. (Do a YouTube search if you don’t know what these are)
The basic system is already implemented and working (e.g. the title screen logo is all wavy and Flaahgra is in grayscale, just for fun).
But a shader system is just the enabler of modern graphical effects, if that makes sense. The effects themselves still have to be made independently and each have their own demands to work with. So there is still a lot to be done before I consider my shader system fully implemented.


So what are the chances of us seeing things like Bloom or HDR in a 2D game?


I don’t like bloom, so no. :stuck_out_tongue:

But yes, these things are certainly possible with shaders. So far I’ve experimented with cel-shading, distortion scan lines, grayscale, psychedelic color swirls, inverted colors, screen-warping bubbles, strange glitched screen, flag waving, brightness/contrast adjustments, etc.

More advanced shader features like bump maps (requiring more than one texture on a given object), blurring or bloom (which need multiple rendering passes), and a global color matrix (allowing for relative color adjustments within given ambient lighting scenarios) will come down the road as well, but first there are more crucial things that my engine is lacking. Plus I’m in the midst of school and auditions – I’ll come back here in 4 months when I am finally a free man.


Bump maps in 2D games?


i’d like to see metroids, lots of them


Yeah! It probably wouldn’t match P2D’s style all that well, but it can be done in 2-D, like this:


It looks weird and unnecessary to me. I’m not used to looking at 2-d sprites with such fancy technology layers on top :stuck_out_tongue:


Hello. I hope people are still here, because I’m still working on this game engine!

I’ve added nearly full support for TMX files. TMX is a tile map format used primarily by a program called Tiled Map Editor. Click here to try it out. I highly recommend using the latest “Daily Build” version because it is much much newer than the 0.9.1 release.

So I grabbed a Zero Mission tile sheet, whipped together some brushes, and quickly painted out this map:

My engine speeds things up by pre-rendering each tile layer into an image. So if you have 48,302 tiles spread across 4 layers, you end up with only 4 textured rectangles displaying on-screen instead of 48,302. It also merges layers with the same name into the same image, so you can jam-pack as many tiles and overlapping see-through details as you want and gameplay will remain equally smooth.

And as of tonight the engine responds to “objects” in the TMX files, letting games insert these non-tiled objects as active instances in the world. In other words working with my engine suddenly feels even more like Game Maker, lol.
But better, obviously. <_>

The game scripts maintain full control over where/how/when/why each tile layer appears, as well as what to do with each individual object (if needed), so the possibilities are endless.


So if you think about it…
You can start building Tallon IV if you want; just use Tiled and it will work in my engine. Or if you don’t like Tiled, there are several other programs that can save in TMX format, such as tIDE Tile Map Editor. These things are way better than my “TIVNav” app if anyone still remembers that.

A new engine and proposition



Another update is due!


1.) Some basic physics!! I’ve started incorporating Box2D into the engine. This is the same physics engine I’ve used in all my past projects, and it’s the same one that games like Angry Birds use. It’s going to be a while before my engine’s physics component is ready for real games, because I need to be smart about the design of how NetMission games interact with Box2D.


Polygon partitioning! Box2D has crazy requirements for polygons (Only 8 vertices max! Must be listed in clockwise order! Must be convex!). I’ve made it so you don’t have to worry about those restrictions at all when placing your boundaries. The image above shows some polygons I drew that were automatically split up correctly. And some other collision doodling for fun. I’m using this library for this.

3.) Minor improvements to the shader system!

4.) Render-to-texture capabilities (i.e. canvases) within game scripts! So games can set up their own reflections and other canvas-based special effects. This is pretty significant.

5.) Full-screen support! Finally here. This required canvases to work first (see #4 above), because I want true pixely crispness in my full-screen games, and that means rendering everything to a canvas first, then stretching the canvas to cover the screen. Naive approaches are less efficient and could change the game’s appearance a bunch when compared to the windowed mode. DefendYourFlaahgra is pretty awesome in full-screen – wish this feature would’ve been ready a year ago.

6.) Tile map optimizations! Faster rendering, less memory usage. Woohoo.

7.) The “scissors test” is a cool little feature built into OpenGL, but it takes too much careful coordination to be practical since you can only have one scissors at a time. NetMission makes it practical now by letting you stack scissors tests :smiley:

8.) Lots of other small bug fixes and improvements. (Such as upgrading to the latest Lua and SDL versions)



(Ignore the ugly Metroids bouncing around)


Looks really cool man! :smiley:
Keep up the good work!!!


Hey thanks!
New since last update:

Debugging and Housekeeping:
I fixed so many bugs it’s ridiculous. And boring to describe.

Some Highlights:* I always carefully wrote ShutDown() routines for every part of my engine, but then I discovered that I forgot to actually run several of those routines when you close the program! Yay for using real debugging software for once. I promise I’m a good programmer. ;_;

  • There was an inconsistent visual problem on one of my laptops, but not the other. After narrowing and narrowing and narrowing what it could possibly be (fixing like 20 more bugs along the way), the final solution turned out that the graphics card sucked and was getting ahead of itself (trying to poop a texture onto the screen before it was done digesting it). It was a one-line fix: call glFlush() after loading a new texture, which hints to the card that it should do what it was told to do before moving on. :sweat:
  • I removed 3 DLL dependencies (woot!), resulting in about 0.8 MB smaller distribution size.
  • The list of minor improvements and fixes goes on and on.

So, no screenshot this time, because absolutely nothing changed, except that this game engine is suddenly so clean and polished that I can see my reflection in it.


Would it be possible to use some kind of retro filter to get that old school CRT feel?

And good job with the debugging! :smiley: :smiley:>


Yeah, totally. If the pixel shader exists (written in GLSL), you can plop it right in. I already made a shader that imitates an old VCR tape (with those ugly scrolling black-and-white distortion lines). Multi-pass is fine, too (like that blur in the last screenshot).


Still inching forward. I’m writing up a “guidebook” for how to use NetMission to make a game. Doing this is revealing where all the little (and big) usability issues are, so I have been fixing some of those as I go.

(Example: It only takes me a few minutes to set up a new project, but writing out all the steps made me realize that it is a convoluted process and most of that work can be automated)

Someone I trust IRL is going to attempt making something using my engine, which will allow me to get some great feedback on the whole setup, which will in turn speed up my own progress.


Hah! :smiley: Sweet!
Looking forward to see some videos!!!