Dec 09 2009

Today

Tag: Full Games,MMORPG Tycoontrevor @ 9:38 pm

BugToday was general cleanup, and setting goals for the rest of the month.  Also fixed a couple of memory leaks that I’d been putting off looking at for a couple of days.  The benefit of having memory leak detection and tracking built directly into your game engine is that those leaks are easy to find.  The downside is that the game’s incessant whinging about unfreed blocks of memory can be quite distracting when you’d rather be working of more exciting things.  (Which is, of course, why it’s important to include that incessant whinging)

Oh, and I also added basic renderable buildings in the cities, just to give me some better visualisation than the flat outlines.  And yes, this city is sitting in the middle of an ocean (mostly because I didn’t want to have to deal with laying out a city on the side of a mountain yet).  It’s still much, much too big;  those simple block buildings are absolutely massive; most of them are anywhere from three to five stories tall;  much bigger than they appear to be in this screenshot.  You don’t realise just how huge they are until you’re actually standing (technically swimming, since it’s the ocean) next to them.  It’ll be easier to sell their scale once I start generating more detail for the buildings than simply extruding the shape of the plots of land that they’re sitting on.

In the screenshot, my cursor is helpfully pointing out a bug in my code which shrinks building plots for the purpose of creating streets and alleys between the buildings;  the corners of this triangular building have actually travelled past each other.  Oops!  I’ll have to cater for that, eventually.

Today I also handled a minor issue in my procedural generation stuff, which was the result of different bits of code using different assumptions about how to arrange data for one of my proc geo classes.  After much soul-searching, I finally picked the simpler-but-less-powerful of the two approaches, and modified everything to work that way.  I’ll probably regret that eventually, but for now, at least things are consistant.

I also did some debugging of the vsMeshMaker class (which I wrote for GiaW #6, and is available in the public VectorStorm library source code), and how it merges vertices together when baking a set of triangles into a renderable model.  I’ve now absolutely proven that the weird sharp lighting changes in some models (most notably the “starting area” model) are definitely being caused by the vertex merging code in vsMeshMaker (the other candidate was the minor issue in the procedural generation stuff I mentioned above, but that turned out not to be the cause of this particular bug).  I don’t really have the brain space to fix the lighting weirdness right now, but at least I’ve proven exactly which lines of which file the problem is in.  I’ll work out the fix for it later, when it’s more critically important.

Finally, I’ve been working out the fine details of general gameplay for a full prototype that I’m going to be putting together over the next month.  I’ve almost gotten everything worked out;  I’m looking forward to starting on the required features tomorrow!


Dec 06 2009

City Planning

Tag: VectorStormtrevor @ 12:36 pm

CityLayoutSo the last few days, I’ve been working on figuring out an approach to procedurally build outdoor cities;  places like WoW’s Stormwind.

I’ve been discovering that the currently documented city-generation methods, while they work reasonably well for simulating modern and real-world cities, don’t work well at all for MMORPG-style “fake cities”.  The cities one finds in an MMORPG are a bit bizarre, in that the buildings are typically much taller and narrower than they ought to be, and the cities are almost absurdly small.  Additionally, “blocks” usually only have two or three discrete buildings on them, where more realistic cities intentionally pack dozens of buildings into blocks, in order to try to maximise the available business/residential space and reduce the number of roads required;  MMORPGs seem to usually build their cities the other way around;  far more road than building.

Anyhow, the city pictured here is nearly 600 meters across, which means that it would take the player about two minutes to sprint from one side to the other;  I’m informed that that’s approximately the same amount of time it takes someone to run across Stormwind.

This city floorplan contains four districts, each of which contains several “blocks” of one or more buildings.  The buildings themselves aren’t being created yet;  the outlined areas visible above are the “blocks” where buildings would eventually go (and I’m going to have to do some more work, to ensure that blocks are more evenly sized than they are here).  The outermost outline is where a city wall would be placed.

I’m not really convinced that this is the right direction to be going with this city floorplan;  it’s still fundamentally based on real-world city patterns, where in MMORPGs you’ll often find buildings built serviced only by a road in the front, with the building backed up against a wall, instead of having a “block” of buildings with roads running all the way around the perimeter.

More thought required.


« Previous Page