Twitter  Facebook  YouTube  E-Mail  RSS
The One Man MMO Project
The story of a lone developer's quest to build an online world :: MMO programming, design, and industry commentary
By Robert Basler on 2018-12-15 00:55:51
Homepage: onemanmmo.com email:one at onemanmmo dot com
I'm making a blog post of this in case anyone else ever runs into this problem so that the web won't let them down.

I was having a problem where wrong, or maybe old vertex data was being rendered after the program had been running for a while. I checked everything, and as it turns out everything was in fact working exactly as designed. To try and narrow down the problem, I spent a day building a frame debugger so I could isolate the vertex/index data that was rendering incorrectly. Once I had this working I noticed that the VBO ID's of the meshes that were rendering incorrectly were ones that had been recycled by OpenGL.

The%20Imperial%20Realm%20-%20Miranda%20-%20Glitch_Lo.jpg
[It does make pretty glitches.]

By Robert Basler on 2018-12-03 02:54:47
Homepage: onemanmmo.com email:one at onemanmmo dot com
Vermillion Hardship is the eighth and final biome for Bold New World. I finished up most of the work for it last Monday, the rock formations are looking great, texturing looks really sharp, and I made several new microprops. I'm finally starting to feel comfortable making my own art in Blender. The last thing left to do is to find some new larger decorations since I removed all of the existing ones.

While I was thinking about that, I started on my QA pass. It didn't take long to find a big problem. The ability to move around Miranda smoothly has always been a huge priority for me, and at the start of the week, movement was very jerky due to an inconsistent frame rate. Luckily, optimization is just about my favourite thing to do as a programmer. You don't have to figure out how to make something new, you just have to find out what's slow, and then puzzle out how to make it faster. Oftentimes, much, much faster. So I turned on Miranda's frame profiler and found several functions which were sometimes taking a very long time to execute (as long as 250ms - a whole frame usually takes just 16ms.)

The cause of the 250ms delay was Miranda's model loader. Miranda loads 3D models on a worker thread so that doesn't affect framerate, but once they are loaded they have to be put into a tree for rendering which is done on the render thread. It turns out that occasionally a whole bunch of models finished loading at the exact same time which caused that frame to be very, very late. The fix was to simply put a timer on the render thread model loading code so that it can't run for more than 5ms. Anything that doesn't get done immediately when it comes in, gets done over the next few frames until all the models are processed.

The next delay was 180ms spent compiling the material script for each block of microprops. It turns out that too was running on the render thread, so I moved it to the already-existing worker thread that builds all the renderables for the props, easy peasy.

Next up was a 175ms spike processing compiled material scripts. Every 3D model in the game has a list of materials associated with it. Materials control the renderer to tell it how to render each and every triangle that makes up a 3D model. Each material has a set of passes, each pass has a set of shaders. Like the model loader, it happened that occasionally a lot of new material lists were queued up for processing on a single frame. The first step was to limit the number of those processed each frame, and that got the time down to about 75ms - still far too much. Miranda's renderer processes a full material list at a go and one of them was simply too long. When Miranda loads a new set of shaders for a pass, it checks to see if it has already loaded that particular set of shaders before. With all of Miranda's new art, there are far more shaders than there used to be, and the code to check for an existing shader got called a lot of times which was where the problem lay. The shader comparison function itself is pretty short, so first I removed a couple of memory allocations and simplified some string handling, but that only got me a few milliseconds. Miranda was doing a full source code comparison of the shaders, so next up was to change that to a comparision of a cryptographic hash of the source code. That got it down to about 35ms at the end of Friday.

So there's still work to do on that one, plus probably another half dozen to look at in the 30-40ms range which I'm hoping won't be quite so difficult. But even with just those improvements, by Friday afternoon movement was looking a whole lot better. Pretty slick in fact.
Read more... (0 comments)
By Robert Basler on 2018-11-27 02:17:34
Homepage: onemanmmo.com email:one at onemanmmo dot com
Maybe you read my tweet that I'm building a dynamic weather system, so you're probably wondering "Is he EVER going to finish this thing? How long can this go on?" Well, it's super-cool-looking, so there.

The whole thing came about because I was playing with GIMP to do the color correction for the biomes when I accidentally created an awesome looking screenshot that I just couldn't not put in the game. All I needed to make it work was a scheduler and a map to control where and when the effect occurs. Since I was in there anyway, I made it support all of the weather effects that were already in the game but were turned off because I didn't have anything to control them. Miranda now has a five hour day. The dynamic weather system also controls the sky.

Effects include a dust storm, an ion storm, super-hot weather and a fancier cloud shadow system. If you're looking for them, right now they only occur in the white area except for the cloud shadows which work everywhere. I'll add weather effects to the other areas in some happy future where I have tons of free time.

I meant to finish QA-ing this tonight, but instead I watched Deadpool 2. The world needs more R rated superhero movies.
Read more... (0 comments)
By Robert Basler on 2018-11-09 21:56:02
Homepage: onemanmmo.com email:one at onemanmmo dot com
Today is my 9th anniversary working on The Imperial Realm::Miranda so I decided to take the day, have a little party, eat cake and play the game I made.

Miranda9Cake_Lo.jpg
[Happy Birthday Miranda]


I had 110 kills at the end of the afternoon which is pretty good.

And since you've all been so very patient and supportive all these months, here's a little peek at what's coming in Bold New World.

BoldNewWorld_Lo.jpg
[The Perilous Precipices]


You can see the Silverswords and the volcanic vents at the bottom as well as one of the new rock formations and the sky. Like before, everywhere you can see, you can set up a base or drive your tanks.
Read more... (2 comments)
By Robert Basler on 2018-10-28 19:24:00
Homepage: onemanmmo.com email:one at onemanmmo dot com
The first biome, recently renamed The Perilous Precipices is complete and I am thrilled with how it has turned out. Making an area that is mostly black is quite challenging from an art perspective because black on black doesn't really look like much. I wanted to have some unusual plantlife in the area and I remembered the Silversword plant I saw at the top of the Haleakala volcano. I struck out at finding a pre-made model (although I did find a lot of lovely silver swords,) so I took one of my photos from my trip and created my own low-poly take on that plant.

The%20Imperial%20Realm%20-%20Miranda%20-%20Silverswords_Lo.jpg
[Miranda's Silversword Plants]

By Robert Basler on 2018-09-28 18:18:43
Homepage: onemanmmo.com email:one at onemanmmo dot com
I started the week with a last bit of work on the sky. There was a visible seam that needed fixing and I figured out a better way to position the sky. I also decided that it might be nice if the sky dome rotated every 5 hours so that the sky changes when you log in at different times of the day. That was probably the easiest feature I did this week.

The rest of the week I worked on finishing the first biome, what I'm currently calling The Breathtaking Precipices. This is known in the industry as a vertical slice. You get one part of the game complete so you work out any remaining bugs, evaluate it, and once it's perfect, you repeat the same process for all the other slices (in my case, 3 more biomes.)
By Robert Basler on 2018-09-24 02:38:49
Homepage: onemanmmo.com email:one at onemanmmo dot com
This week I finished the last planned new feature for Bold New World. All that is left now is finalizing the art and bugfixing. It's been a while since I've blogged about the game. That is at least in part due to the fact that things were not really working out.

Atmospherics

A feature I really wanted to include is Bold New World is atmospheric effects: embers and ash falling after explosions, sparkles when harvesting, seeds drifting in the air. Atmospherics don't look like much in screenshots (although you can see them in this screenshot) but when they're moving, they bring life to the world.

The%20Imperial%20Realm%20-%20Miranda%20-%20HDR%20Sky_Lo.jpg
[New HDR Sky and atmospherics (bottom centre)]

By Robert Basler on 2018-08-27 02:34:37
Homepage: onemanmmo.com email:one at onemanmmo dot com
I've been working on one of my stretch goals for the Bold New World update: a new sky. It might seem a little weird to work on the sky when RTS games focus primarily on the ground, but occasionally players do see the sky with the game camera, and I'm hoping the sky helps upgrade the marketing screenshots I make using the free-look camera.

The%20Imperial%20Realm%20-%20Miranda%20-%20Final%20Cirrus%20Clouds_Lo.jpg
[Sun, Sky and Cirrus Clouds]

By Robert Basler on 2018-08-07 15:06:35
Homepage: onemanmmo.com email:one at onemanmmo dot com

You might already know I play Guild Wars 2 (GW2) a bit. It's partly because I find it relaxing, partly to study how the game works - GW2 is the only MMO where I've made it to end-game so I can try all the game's activities. (When I played WoW for three months I had a lot of fun, but I only made it to level 22. I understand levelling in WoW is a little faster now.) Since end-game activities are all expensive, I started looking into optimizing my gold income from loot. As it happens, loot is one of the things I want to work on improving in Miranda's next update.

gwloot_Lo.jpg
[That's a good Guild Wars 2 loot drop!]

By Robert Basler on 2018-07-09 12:03:57
Homepage: onemanmmo.com email:one at onemanmmo dot com
I wish I could get out and do more shows, it's really fun showing Miranda to people. It is a little stressful though. Without fail, Miranda's AI would launch an all-out assault against my base as soon as someone came by and I'd have to try to introduce myself and tell my story while madly clicking to prevent my base from being wiped out. Doing shows is also reassuring. There is a market for this game if I can just get it in front of people.

The%20Imperial%20Realm%20-%20Miranda%20-%20Full%20Indie%20May%2018_Lo.jpg
[What people saw at Full Indie Demo Night]


Other than that, mostly I've been fixing bugs the last few weeks. When you're building new things it's easy to stay enthusiastic and engaged in what you're doing because you're constantly seeing new things and it feels like progress. When you have a bunch of new things that are working except for this weird black blob rendering in the middle of the screen in a few specific spots, it's the opposite.

More Posts

Project Line Counter in Visual Studio 2010 - 2011-06-04 00:01:45 (5 comments)
A Chrome UI - 2011-04-07 10:28:46 (6 comments)
Enabling NVidia GPUs on Optimus Laptops - 2014-12-03 02:31:40 (4 comments)
Looking for a Fast Square Root - 2012-03-29 11:19:56 (4 comments)
Nemesis Update Demo Video - 2017-09-27 11:05:09 (0 comments)
What's Happening - 2017-10-27 01:17:24 (0 comments)
What is Taking so Long?!? - 2018-04-25 01:46:27 (0 comments)
Terrain Detail Models - 2018-03-25 02:03:28 (0 comments)
Anecdote - 2018-04-12 23:45:12 (0 comments)

Recent Comments

9 Year Anniversary - 2018-11-23 11:56:29 (2 comments)
Unfortunately it is unlikely the many, many BitDefender issues will be fixed any time soon. I made a list of all the things that BitDefender breaks, but the one that really amazes me is that it causes about 10% of TCP connections to randomly fail. ...
9 Year Anniversary - 2018-11-23 08:40:08 (2 comments)
Looking good, did you ever fix the bit defender issue ? i cant play until thats fixed but looking good :-)
Bold New World is Code Complete - 2018-09-28 18:21:51 (2 comments)
I will send you an email.
Bold New World is Code Complete - 2018-09-28 12:53:55 (2 comments)
hey rob its luke here, haven't check up in a while because i moved house and had to reset my pc. As i have reset my pc how can i get my hands on a copy of the game again please?
Credit - 2018-08-30 12:30:45 (1 comments)
Oh, I missed Need for Speed Carbon. Probably some others.
(1)      2      3      4      5      6      7      8      9      10      >>      >|

  Admin Log In



[The Imperial Realm :: Miranda] [Blog] [Gallery] [About]
Terms Of Use & Privacy Policy