Friday, November 16, 2012

92 – Almost 4 months, feature freeze

I uploaded a video with a preview of post processing effects, including the ink border used in cell shaded graphics:



Actually, cell shading is related to the way you shade items, the way illumination works, but most people wrongly consider cell shading to be related to black ink borders, so who am I to correct them. Anyway, in this video the borders were far too artifact prone.

I also released the third video from the "Modular city" series, again amply annotated:



Changelog:
  • Implemented a new tabbed interface for item selection. The first rudimentary version of it can be seen in the video.
  • Implemented item creation feedback. Now for most items, if you hold down the muse and move it around, you will get a color coded preview of what item will be added where. Red means insertion is not possible, green/yellow means it is okay.
  • Enhanced the pipeline to better process assets and also support the special data set needed for shattering  This shatter data is saved, but not yet loaded from disk. Next time. Until then the data is calculated at every run.
  • Tried to fix the cell shading artifacts. I added another model from another game and this one behaved a lot better. Comparing the two, I managed to normalize some data and get consistent output from any input source, so now artifacts are consistent for all meshes. I also tried to fix the borders directly, and I managed to get a compromise version working, which has very weak borders, but almost zero artifacts. I like the effect, but I'm not sure it is worth it, especially since it requires another pass over geometry.
  • A ton of small bug fixes.

And with this I decided to do a code freeze. No new major feature will be added (but a few smaller ones might be needed) before the code base is stable and feature wise everything that kind of works or is at least hinted at will work perfectly. This means also trees and grass which have been disabled for quite a while. Need to refactor and finish that code. Trying to get a RC0 finished.

After a few RC's, I'm hoping to get the pre-alphas going again.

Also after the first RC, I'll do a retrospective and engine feature list since on the 26th four months of development on the new project would have passed. Generally I am happy with the progress. The engine is shaping up. Considering that I started from scratch under a new programming language, new technology and this time I have physics, I think I came a long way from my first real screenshot of the new project:


Thursday, November 8, 2012

91 – I hate shadows

Last week I've been hard at work and managed to put out 3 videos! Now it's time to write about them, because YouTube videos generate just an insignificant amount of blog views. New posts and referrals from actually popular blogs and itesbare where the meat is at!

So I started a new video series, "Modular City". I experimented with procedural, now I'm trying modular. Can't tell yet which one will work out better. Not without a consultant at least. This will be a long running series that started with me putting down a single building foundation and it will end when the engine is capable of creating a city of roughly the size and complexity of Balmora from Morrowind (including persistence). So pretty long. Here are the first 2 videos from the series, generously annotated, so please make sure you watch them under a video player that supports annotations:





During and after the creation of these two videos I did a ton of polishing of the engine and adding new features that I realized I needed, so I did not have time to create the third video in the series as I hoped. So I quickly added a few effects and kinetic responses to everything and put out this video:



The next video in the series will be about placing exterior decorations.

There are literally tons (I know what literally means, this is a joke) of changes and improvements to the engine and I am not going to list them all as I originally wanted. To tell you the truth, I forgot at least part of them. I should keep a changelog updated life, not trying to remember code I wrote a week ago. So I am going to list only the major new features.

Material system
While adding a bunch of new items I realized that keeping the material information coupled with the mesh information was not a good idea. So I created standalone material representations that are loaded asynchronously from disk when needed. Now if I wish to assign the barrel material to a stool, this is all I need to do (in pseudocode): stoolMesh.Material = barrelMesh.Material. Materials react to life update, so changing a material changes the way every single item that uses the material is rendered without having to inform the item of the change. This made the texture streaming algorithms significantly simpler. It is now only a few lines of code.

Active entities
I created a system where entities can be given quite complex behaviors and the system transparently manages the activity of these entities. Each such behavior has its own class. I really like the design! This is what I used for the third video. I created a general timed entity. This entity has a duration, and once it expires, it becomes inactive and triggers some events. From this I created two entities: one that translates a model and once it reaches its destination it optionally triggers a camera shake and it deactivates so the CPU no longer computes translations, and another that shatters an input model in place and once it finishes it will remove itself from the game-world completely so there are no leftover shattered object pieces under the geometry.

Now theoretically I can create an active entity for anything I can imagine. The best part is that even if you have an incredibly CPU intensive active entity, if you just render if without triggering its action, it has the same performance as a simple model render, so you can have any number of active entities that are currently inactive.

Polish and performance
The engine is starting to become pretty polishes and there is an alarmingly low number of hacks. I am starting to find the code base pleasing.

I also improved rendering performance, both in general and especially for terrain. Terrain is currently the biggest GPU power eater, so a quick fix was to make it be drawn last. In active scenes where a lot of objects are obstructing the terrain, this gives a ton of extra FPS.

I also optimized the low quality terrain renderer created for weaker machines and it is now two times as fast. If you have a scene only with terrain and you turn on the LQ renderer, you framerate will pretty much double.



But not everything I did was a success. I noticed some lighting oddities:





This looked to me normals were not exported properly, so I added a test cube and this is what I got:


And this is what I was expecting:


It took me quite a while to track down what was causing this. Eventually I narrowed it down to Blender. It is not an export bug as I first thought, but Blender interprets its vertex information differently based on the format you export to, and the format I am exporting to right now plus the more complex lighting scheme causes these issues. Marking edges as sharp and applying a modifier in blender fixes this. Or exporting as *.obj, which works exactly as expected. Speaking of which, the engine can now import *.obj meshes, a thing that XNA does not support out of the box.

But the main thing that caused problems were shadows. Again! I had not one, not two, not three but four failed attempts at creating shadow mapping, and one semi successful one. And not in this order.

I based my implementation on a Microsoft SSM sample and a Deferred CSM implementation  The SSM one is so ugly that it is unusable, but I started with this and had 3 failed attempts of adding it to my game. Each time I failed I started from scratch, with a new approach. But no matter what I tried, I couldn't get one that works from all angles. As long as the light was behind you, it worked. As soon as you turned toward the light, the entire scene got covered in darkness. The MS SSM example does not have this problem and the code was the same, so I couldn't figure out what is wrong.

Then I tried experimenting with the Deferred CSM sample. This was written for XNA 3 so I had to convert it, fixing a ton of compilation issues, but I got it to work. It had reasonable shadow radius  pretty good quality and was a solid implementation. There were just two problems:
  • Not even cascades can make shadow mapping look good. It looks like ass. At a glance it is fine, but as soon as you stop and check out the fine detail it makes your inner graphics nazzi pop a vein.
  • It is deferred. I don't want deferred. Naturally it killed MSAA instantly and it has the same disadvantages as normal deferred techniques.

So I took the view frustum calculations from the CSM sample an plugged them into the SSM sample and all the problems the SSM one had (except the ugliness) were fixed. Then I plugged it into the port of the SSM into my engine, and it worked just as good, only with massive shadow jittering.

I wasted hours trying to find what was the problem and I finally narrowed it down to world coordinates. As long as you are around point (0, 0, 0) the jiterring compensation works. My world center on a small map is around (2560, 0, 2560), so jittering is a huge problem. I have no idea how to fix this.

You have no idea how much I worked on shadows! Saturday night I even missed a concert because after working the entire Saturday on shadows, I continued working until 4:40 in the morning  Then i woke up at 9:30 and continued working on shadows until the afternoon.

I think it is time to face the facts: I will never have good looking shadows! That is very depressing. Even if I fix the jitterring and go with a good CSM implementation, CSM is still full of artifacts. It just looks like ass. Roof shadows are all wrong, having slivers of light in areas that should be completely in shadow and the foundation of a stool is so small that due to bias correction, it has a distant and unpronounced shadow. I'll probably add the option to have these ugly ass shadows.

I don't get it how shadow mapping is the industrial standard for shadows today! Not only are they universally fucking ugly, but they have ruined me for all games. There is not a game out there with shadow mapping where I don't notice the artifacts and get irritated by them.

And stencil shadows are pretty much dead. There is pretty much zero stencil shadow information out there for XNA 4.0, but I am still going to try and get an implementation working. I know they are dead. I know they are not scalable. But Doom 3 managed to pull it off years ago. And Doom3 got a HD re-relase recently. But I'm no John Carmack. Maybe they don't work with large outdoor scenes. I don't know. But sill, my game will not look as good as Doom 3 or be as demanding on the system, so if Doom 3 pulled it off, there is a chance that theoretically stencil shadows won't be prohibitively expensive.

Wednesday, October 31, 2012

90 – Pipeline and churches

I was not in the mood for terrain streaming, so I worked on something different. There are tons of tings to implement, so I doubt I'll ever have a shortage of things to do. But I did implement a new global height interrogation API, but only with integer coordinates. When you have one single heightmap in memory, querying a height is easy. When the map is chunked into small pieces that can reside on disk or in memory, this becomes a lot harder.

I continued working on procedural buildings. The idea is to have a few randomly generated master parameters, like global shape, number of rooms, number of floors, etc. and then run a piece of code that  fully generates a new building. This works fine for simple buildings, but in order to get a really unique look for each building I need to work a lot on the generator, probably years.

So I am investigating two alternatives. One is just modeled buildings. How will a city look with traditional buildings modeled in some 3D program?

This is too easy. And I lack modelers to do the job. And all other resources. The other alternative, that I am actually investigating is taking these modeled building, breaking them into larger standalone building blocks and trying to see if I can assemble buildings like a form of LEGO.

So I started with a simple but full of personality church model I found free on the web. Here is the mesh rendered with a mix of spherical harmonics and Blinn-Phong shading, without textures: 


This is a single mesh that even has some not that great texture mapping. Her is the church rendered with a single wrapped brick texture:



It is not a very high-poly model, but I looks quite good and has a cartoony feel. Still, it has a lot of detail, so making it modular will be quite a challenge:


The first thing I did is to break the model into pieces, using Blender. I only did some elementary breaking in order to have different materials. The final breaking will have to take into account the way pieces are meant to go together. This is not done yet.

Then, in a process that took me hours, I upgraded my mesh importer/exporter to handle meshes with multiple sub-meshes. This was quite difficult  because the Model class from XNA, while apparently having a very simple and intuitive VertexBuffer layout, actually seems to be quite deceptivelly complex and counter-intuitive.

The final problem was how to make the game understand what piece what material should use. This is a pipeline issue. Pipeline is one of the most important parts of any 3D project, and my content pipeline sucks. So for now I assigned each part some random texture that is loaded:


And now from behind:


Parts of the church are under the terrain? Why is this? Remember the counter-intuitive VertexBuffer layout I mentioned? Well I am not the only one who fell into that trap. A small piece of code that I copied that only computed bounding boxes for an input mesh also had the "wrong" interpretation of the layout, generating faulty bounding boxes. This is a very weird issue. Need to investigate further.

Here is a shot after the fix:


Looks pretty good! Textures are stretched  but the general quality of the renderer is satisfactory, having all previous details. Her are two comparison shots of the side of the building with and without specular highlights:



So the next step is to break up optimally the building into parts, edit them to make sure they fit together good, and finally assign good textures, maybe even with some prebaked AO to each part and see how that looks.

After I need to test other configurations of mixing the blocks together to see if they look good.

And finally, see if the blocks can be included into gameplay. My cities won't only be procedural, but the player will be able to create though gameplay new buildings in the city.

Tuesday, October 30, 2012

So I probably need streaming

Hey, this is technically a screens/journal post, but since I managed to break terrain lighting there is no screenshot I currently wish to put out there :P. Still I have some data that I want to record for posterity.

Starting with the mention that sometimes I am stupid! My current terrain is not 2 square kilometers like I said two posts back! It is 2 kilometers wide. So that's 4 square kilometers, with 1-2 kilometers view distance. The speed calculation is still correct though.

So in my quest to reach that 10 square kilometers terrain (or maybe even limitless) I started profiling memory allocation and enhancing terrain load/save.

Now terrain is created by a new component that only has this responsibility and what it creates it always saves on disk, then it does some preparation for an eventual load of said data, then it clears up all resources.

My application starts with consuming 32 MiB of RAM. I don't know what eats up so much, ask XNA. Terrain generation for a heighmap of 2048x2048 takes this up to 65 MiB. After the save and cleanup phase,  I am left again with 32 MiB consumed RAM and a 16 MiB map on the disk. Because the maps are saved pre-chunked and I don't want to deal with non-square chunks while still keeping the game running under the XNA reach profile, a little bit from the map is always lost and the actual saved size is 2032x2032.

The saved data contains the height information, together with other useful information, like global min/max height, grid spacing, chunk bounding box, etc. After a load of the map memory consumption grows by about 16 MiB and before using the data, one can change some properties, like grid spacing, without any actual performance hit or need to process the data again.

So after loading the data, we are now ready to create the vertex data for the map in memory. This is when memory consumption jumps up to 199 MiB. Then we create the vertex and index buffer objects, raising memory to 690. 

Interestingly, BEPU is very smart about heighmap handling, and as long as the data loaded from disk is in a format it likes, it will not use any significant amount of extra RAM besides the actual height data.

Then finally after everything is loaded and prepared I am left with 777 MiB total memory consumption. Sometimes even over 800. It's over 800!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! OK, not funny  unless it is over 9000.

I did some ugly hacks, getting rid of some data and breaking device loss recovery in the process, but I did manage to get the RAM down to 620 MiB.

So this won't work.

I'll try a few things. The first solution will be to keep only basic heighmap in memory. Taking my current 4 square kilometers map and adding 3 more equal sized chunks for a total of 16 square kilometers would only eat up 64 MiB. Then I'll try to only load initially the terrain around the character, up until the fog limit. Then as I move around, I'll dynamically add and remove chunks from memory.

My guess is that this will be far too slow. So I'll probably have to add multithreading.

Monday, October 29, 2012

89 – Spherical harmonics, bitch!

Spherical harmonics was not the main thing I worked on since last time, but I have some results and I have great hopes for anything that promises to solve at least partially my lighting issues, so I'll start with it first.

Let me reiterate on the problem. Here is a barrel illuminated by one directional light from the front:


There is something funky going on with the cap and the normal map is not great, but it works. Things break apart when viewing the barrel from the back:


The diffuse contribution gets close to zero and you are left only with ambient lighting, which is dark and flat. You can make it less dark by increasing it coefficient, but it will still be completely flat. The worst part is that that normal mapping is not visible at all. Normal mapping just creates the illusion of complex geometry. Without it the object seems a lot simpler.

I tried a hacked together solution of my own, partially some light factor combination, partially some hacks, partially some trial and error. I have already shown the results of this method:


This method is pretty good, but it produces some artifacts and strangeness, especially when objects are on the move.

Now, let's take a look at our spherical harmonics based ambient lighting form the front:


Better? I think so! And now from behind:


Holly shit! Normal mapping everywhere! This techniques also allows the ambient light to be influenced by a cube map, like a skybox. When I'll have a skybox, and after I implement it, lighting should look a lot less uniform.

Right now I like the effect even better than the results of the directional light!

I owe a lot to the XNA FINAL ENGINE and the helpful people around there. Without drawing some help who knows what I might have implemented? Spherical harmonics? No way! More like cubical dingle berries harmonics!

Here are a few more objects with this rendering technique:



And a ton of barrels,a gain from two angles:



What is interesting is the ambient occlusion like effects that you can see near the bottom of the stool. I hesitate to call these artifacts.




Let's take a closer look, from the behind, where the effect is fully visible:


I think I need to have another go at the meshes, to make sure that everything is set up as it should regarding face smoothing and that those settings play nice with the rendering technique.

As said before, I did not fully implement this method and the coefficients are probably far from optimal. I can play around with them, like accentuating the lighting:


Just now I am realizing that I did all these screenshot without specular highlights. I'm not going in again and redoing them, but here is one screenshot with specularity:


So that's about it for today about ambient lighting. I need to test it, bugfix it and benchmark it to make sure it is feasible to render a whole scene like this.

The other thing I worked on is the terrain. My goal is to finish the terrain for good in about 1-2 weeks. The main problems are performance, memory consumption and terrain size.

In order to try to resolve these, I am phasing out a singular heightmap for the terrain. The terrain now gets generated, then chunked into 128x128 vertex pieces (do the math why this is the max size for the Reach profile) and saved/loaded from disk. The chunked heightmap operates slower than one full map, but it is my hope to keep the whole map in memory, but only generate geometry on the go based on what chunks are in view. There are tons to talk about here describing what I did, but since I spent so much time describing lighting, I'll skip it. I broke the terrain with the new chunker and I had to fix it:


Memory consumption is down from about 1 GiB to 700+ MiBs. A good start, hopefully I can get it down to around 512.

The terrain saving/loading is actually prototype level loading  so soon I will be able to have multiple maps and quicksave/quicklaod.

Then I improved terrain view distance while keeping performance. The view distance/fog is at its worst on high points, so let me show you a before shot from a high point on the map:


And after:

Friday, October 26, 2012

88 – Winter is coming

Hey hey! Dropbox was down for a while so I thought that I wouldn't be able to post today. No such luck! :)

Let me give you the cliff-notes of the recent developments. Lately I've been using a Twitter a lot, even though the Twitter widget broke on the blog. I need to fix it somehow.

I continued working on the world scale. This is a lot harder than it seems. I guess I need to implement a more flexible system, probably by defining a customizeable value for a meter and making the engine take that into consideration at runtime.

I also did a lot of cleanup, worked on physics and made the terrain a lot larger. The terrain is now 2 square kilometers. Unfortunately  this takes up more that 1 GiB RAM. I need to pull off some crazy magic tricks and get this way down. A 10 square kilometer max map size would be just great.

I also added fog support for a few shaders. The view distance is not that great, I'm hoping to improve on it.

But the big new feature is skiing! Have you ever played Tribes Ascend? It is similar to skiing in that game. Basically you are able to reach very high speed and use natural or artificial ramps to launch yourself in the air. Currently the maximum speed I was able to reach is 168 km/h (this may not be accurate because the world scale is not that accurate yet).

But how can you reach such ludicrous speeds? Back in the Dwarves & Holes days I wanted to write a few fluff posts, detailing every single playable race. I never gotten around to it, and I'm not sure I want this for the new concept, but if I do, I will be bringing back one of the races as the single playable race: the Mages. These extraordinarily powerful creatures from another world (that have an extensive backstory in my head) will be the star of a sandbox/RPG building game. Their almost limitless power is balanced by their huge physical frailty and long cast time for most spells. Some spells might take days to cast, but here is where time compression will come in! Obviously, in combat you won't be able tot do time compression, so you'll have to stick to spell you can cast in real time.

And this is how an mortal creature will be able to reach high speeds and ski all over the landscape: magic! To make thing interesting I'll make skiing governed by a quick-to-regenerate resources. You will also need to have skiing turned on when landing in order to prevent a gruesome death. I'm hoping to achieve a balance where you ski on the ground and look for ramps to propel you into the air, where you can regenerate your resource and reactivate skiing prior to reaching an obstacle. Add a nice rhythm to it.

Another possible power is a gravity defying stop in mid-air that also creates a shockwave. Skilled skiers might be able to land near their target and moments before hitting ground trigger the spell and throwing everything at the point of impact in the opposite direction. In my head this has a very anime feel, hopefully it will work out in game.

Why do you need a shockwave spell? Can't you just ram things? Well skiing has a gliding and force neutralizing effect. So if you ram something with skiing on, the impact will be minor. If you ram it without, you may be able to kill your target, but you will also kill yourself. Hitting something with 100+ km/h will probably explode you and your target.

A third spell that I'll add is a blink:  a short range stealthy teleport. With upgradable backstabbing. Yup, stole that idea from Dishonored! Except for the backstab.

I find skiing interesting and even at this early stage quite fun! This raises a few interesting questions because skiing is very rarelly encountered in games and I think never in a RPG. One of these questions is: do you need fast travel? For now I'm thinking that there will be fast travel for money between larger settlements and a mark & recall spell, but otherwise you'll rely solely on reaching high speeds with skiing. So no point-on-the-map quick travel.

So here is a short video with the first incarnation of skiing and some live terrain manipulation. It is a little bit jenky, hopefully I will be able to improve upon it:

Thursday, October 18, 2012

Screens of the day 28 - Someupdates

Yet again I find myself working on so many things at once, that I couldn't get a new stable and finished build. So new features/changelog:
  • Implemented basic INI file settings. C# uses XMLs more and I might migrate to XML, but now there is an INI file in the game folder that holds a lot of common settings. A lot of the in game variables are now loaded from the INI so I can tweak the game settings without recompiling the game. Also, the INI is hot-loadable, so you can edit it and the game can pick up the changes without reload.
  • Light and material information are now stored in more advanced classes, that know how to talk with the shaders and get their parameters from INI files.
  • Worked on world scale in order to give the world its final and consistent scale.
  • Implemented ray-casting picking. Using it I created an experimental system for placing items in world without having to drop them from heights. You want to have item placement as smooth as possible  Imagine that you are decorating a shelf and placing a bowl on it an this causes everything to be blown away, like sometimes they do in Oblivion/Skyrim. Not cool :). The placement algorithm also tries to place items only on relatively smooth and horizontal surfaces, so you don't end up with placements that immediately get changed by gravity. So you can't place a barrel vertically on a wall. The system is far too finicky at the moment of writing, sometimes refusing apparently smooth surfaces, other times placing items on a much too highly inclined surface. There is also now an extraordinarily ugly cross-hair for better spacial awareness when placing objects.
  • Take a look at this terrain:


Hmm, it seem to be using a single texture. Which is actually quite a good result. There are no obviously repeating patterns thanks to the shader I talked about a while ago. But why is it only using a single texture? Well I updated terrain to support custom texturing, so the texture of a zone is no longer tied to its height. Sure, I'll use this setup for initial terrain, but then you can change it. Using the cross-hair, I wrote hello on the terrain with grass:


The resolution of the terrain is not that great and texturing is tied to the resolution, so here is how the "H" looks from close up:


I think I did these screen shots without normal mapping, but normal mapping still works.
  • Terrain editing. Because of the low resolution of the terrain, I am yet to find a good algorithm to smoothly edit the terrain, but it is still doable:


You can also reduce the height of it:


Monday, October 15, 2012

Screens of the day 27 - Someupdates

Hey, been working on a lot of things all at once so I couldn't manage to get a stable build yet, so today I'll do a short preview of thing to come. Did not have time to investigate the Meteor engine this weekend, but I do have my monitor back and working.

First, I optimized a little the rendering pipeline. There is now one less CPU matrix multiplication per object and shaders are starting to get optimized for pre-shaders. Considering that for single render target shadow mapping you are rendering things at lest two times, that can mean two CPU matrix multiplications per object. I also optimized the shadow mapping part of the rendering pipeline and it uses even less multiplications than normally are needed for rendering.

What I forgot to mention last time is that there is now support for fine tuned control of render targets. You can render normally, into a new render target, into multiple, etc.

I also optimized the load order of the texture streaming system to first load all diffuse maps, the all bump maps, the all specular maps. This way even if the load time is exactly the same, loading seems faster because the more important maps are brought in with less delay.

Then I started working on model import/export. As said, loading 7 models with a total size of a few hundred KiBs takes 3.2 seconds. Unacceptable! By my calculations, a busy scene might take over 20 seconds just to load the meshes. I really did not want to resort to a custom binary format for storing meshes, but in the end I had to. I wrote a fairly lengthy mesh importer/export specially for static meshes (no bones/no animations). In the future I might add support for bone animations to the format. Here I had the opportunity to get rid of another bone multiplication. See, the exported mesh is exported weirdly and you need to take into account the first bone transformation, and also the standard loading process that I want to bypass computes normals and tangents, but again based on this bone information and... I have no idea what I'm doing! So the bone information is stored into my custom format (but animations are not) and still used because I couldn't convert the normal and tangent information into something that makes the rendered output look the same.

Anyway, loading time is now 10 milliseconds. Let's compare the two values: before it was 3200 milliseconds, now it is 10. 320 times faster. Even if I load 10 times as many meshes, it will still take only 100 ms, so I think we're done here.

And now the great advantage of my system becomes apparent. You can modify a mesh/texture and by pressing a hot key in game the assets are reloaded on the fly, without having to exit the game or reload the level. Currently everything is reloaded,  but adding support for the file modification time-stamp is trivial so I won't bother with it :).

I also further enhanced the procedural building generator, but it is still at least a week away from its first underwhelming version.

Then I tried to do something about the horrible back sides of objects that are facing away the light. I think some form of global illumination is needed, but that exceeds my current level of knowledge, so I hacked together a shader that is not particularly convincing, but still looks better and performs OK. There is just one particular graphics bug with it and currently I am not sure if the technique is flawed or it has to do something with my custom mesh import. Once I figure it out and decide if the technique is good or not, I'll list all the advantages and disadvantages.

Finally, I tried integrating XNA Procedural LTrees.

But enough word-thingies. Let's bring out the screen! First, we have a normal scene with traditional one directional light = sun lighting:


The backsides are too dark and you can't see the bump mapping. Now the after shot, with the new shader:


Better, but still not great. I need to investigate that visual bug and decide if this method is a keeper or not.

Finally, let me show you a closeup of the procedural tree:


It uses the same technique to keep the backsides from going dark, but it is not normal mapped (yet). Also, the leaves are billboards, so going close to the tree and spinning the camera around causes the typical billboard display bug.

The system comes with a few tree species out of the box but currently only one can be loaded at a time. On the other hand, every single tree is unique. It is not the same mesh repeated over and over and... I made a few tests, and generating 400 trees (not pictured) takes a few minutes and eats up over 600 MiBs of RAM, so clearly each tree can't be unique, not even on small maps.

Thursday, October 11, 2012

87 – Not slacking

While I did not manage to find time and update the blog, work continued on as normal and I uploaded two YouTube videos.

I continued enhancing the content management system and also added some content to it. All textures are now loaded by it except for grass. I could make it be aware of grass, but currently the grass system is a little bit hacky, so I'll postpone adding this until I clean up the grass system. Grass textures are still loaded with multithreading, but the content management system is not aware of them. In the first video you are about to see, terrain textures are not loaded asynchronously  but since I added this, and like I said, only grass remains to be added to the system.

Model loading with the standard XNA method is really out of control. Still experiencing the massive bottleneck, and now it needs 3.2 second to load all the meshes. A few kilobytes of them! That is absolutely bonkers. Let me check the texture folders: 86.4 MiBs. That are loaded faster than the meshes! WTF?????? I am preparing to say bye-bye to XNA's content manager and go with solutions that are blazing fast, but I am yet undecided in what format to store the meshes that is fast, flexible, un-obtuse, artist-friendly and hot-swapable. There isn't one quality OBJ loader for C# out there and I don't want to write my own.

In the next video I try to break physics by creating a ton of objects in the same place. I also show off some features of the engine, like placing objects anywhere with physics, new terrain and object shaders, mass, etc. The video is annotated, so you can follow along with the explanations:



Please excuse a few hasty textured objects. Most of the objects that I modeled using Blender are not textured. But since I am using normal mapping, all objects must have valid normals and at least semi-reasonable UV mapping or they will not render correctly. It is not about looking good: I could use completely wrong and ugly (which I did) textures. A reasonable UV mapping is needed for lighting to not freak out!

Another thing you'll notice that the sides of objects that are on the opposite side of the light are very dark. A long time ago I was but a teenager and I picked up a 3D modeling book for 3D Studio Max. That's why I am not helpless at 3D modelling and can create some low res but passable objects. But ever since the day I created my first light in 3D Studio Max, I had this problem with the back sides of objects being dark. I now believe that for outdoor scenes traditional lighting schemes don't work. I don't know about you, but I do go outside and things outside are never dark during the day. There is global illumination, light reflecting and illuminating objects from all sides and shadows are not too dark. I don't think this can be reproduced with lights. I'll try and do some experiments with some form of environment mapping based SSAO. The problem is that without any form of shading 3D objects look flat. So I need to shade them and I also make sure that the shading scheme works with normal mapping. I can't remember the last time I saw a game having this problem, so there must be a way to do it.

But back to lighting. I implemented shadow mapping. Simple shadow mapping. It look ugly as fuck. I won't even show it to you. I am too embarrassed by it. Sure, there where two problems. One was that I did not stabilize the light position to make it snap to texel coordinates, so every time you moved the mouse to look around or moved shadows would flicker like crazy. And I did not move the frustums back, so things that were behind the player or above, like roofs, did not always cast correct shadows because they moved out of the frustum. While these two are big problems, they are also fixable. What is not fixable is the main problem with shadow mapping and large scenes: aliasing. There is just not enough shadow map to go around and a texel from the shadow map was about 1/4 the size of a barrel.

This is where techniques like Cascaded Shadow Maps or Parallel Split Shadow Maps or whatever come in. I read a few research/tech papers on them and they are more complicated than SSM, so I decided to not implement them from scratch. Actually, while I plan to finish and selectively use my super duper forward rendering shaders, I am actually looking for a ready to be used solution for all my lighting needs, free or commercial.

What I am looking for must follow at least this set of requirements:
  • It must play nicely with the standard XNA environment, making code interoperability easy.
  • It must not play too nice with XNA, as in being 100% married to XNA's content manager since I am phasing it out.
  • It must be light weight.
  • It must be simple enough that I eventually can reach 100% understanding of it so I can fix bugs and add new effects and tweak shaders.
  • It must tolerate procedural generation. I do not open a visual editor and place items manually. I write code.
  • And finally, it must be fast. A low tech XNA Reach backend would also be great, but I'll write my own if needed, no problem.
Finding something like this will be hard, so I'll try everything I can find. In no particular order (OK, I am lying, this is the order I would like to try them out, but this may change): J. Coluna's LPP implementation, the Meteor engine, Ploobs engine, Sunburn engine, QuickStart engine. And maybe others. Probably I'll exclude the QuickStart engine from the list  because I started testing it and it has comparable lighting to my shaders and only SSM, plus it uses a different physics system.

So after a few hours of hacking the engine and plugging in my content management system and physics, this was the result:



This was done using J.Coluna's Light Pre-Pass implementation (J.Coluna | Game development) as a rendering engine. Shadows are still a little bit aliased, but the texel size is a lot smaller than my SSM. I did not like the SSAO effect, so I turned it off. I need to update my terrain texturing and grass animation shaders for LPP, so this is why you can't see them, but otherwise everything works fine, looks good and performs great. As a bonus, skinned animations are also implemented. So I must thank J. Coluna for making this available.  It is a very good implementation, where I just need to increase then number of cascades and find a new SSAO implementation. Even if I eventually don't end up using it, I already learned a ton from it and by screwing around with his CSM implementation, I'll surely further enhance my own knowledge.

But even here you can see the problem with the back sides of objects being too dark.

For this weekend I have a second engine lined up for testing: the Meteor Engine. This has some advantages, like more flexible shadows implementation, a SSAO that from videos seems more to my liking and even the ability to switch on the fly from LPP to Deferred Rendering. I still don't want Deferred Rendering because it is still as complicated as ever, but LPP is fine.

Unfortunately, my monitor on the machine I wanted to use is no longer working. It is in service right now and it may get fixed by the weekend, but repairing it costs about as much as half from a new monitor, so I might end up buying a new one. I might be able to set up a development environment on my laptop and try out the Meteor engine still.

The thing I've been working on the last few days is procedural buildings. There is no way I will realistically have a lot of building models for my cities. At most I'll manage to get my hands on 1 3D "tileset" that can be combined to form various buildings.

So what am I to do? Even if I do eventually get more buildings than I need, until then I am stuck with my current ugly placeholders. So I decided to invest a week or two into procedural buildings, maybe I can get an implementation going that can generate a lot of unique buildings.

Literature on this subject is scarce and lacking detail, so I came up with my own system. The idea is to take a small grid that represents the maximum size of you building. You start off with 4 points representing a rectangle (but all angles must not be square) and from here you determine 4 segments  This is the main room. Then you can further select one or more from this segments and glue to it another square, updating segment sizes and marking data on the grid. Finally, you assign meaning to each segment and try to create a mesh for it. 

First I ended up with a coordinate based system that was very flexible, but only worked in one direction, so I had to replicate it for additional directions. Then I rewrote it to use vectors and now it works for any direction.

The system is in its very early stages and I am not ready to show a video yet, but let's see some pictures:


Here you can see hundreds of procedural one room building, right now with only one doorway each. Size of building, door position and size is all random, and I plan to add windows of different sizes and shapes and then add furniture inside. Also wall patterns. Then add multiple rooms. And here you can see my biggest concern for this system: I might end up with a system that while is capable of producing each time a theoretically unique room, these rooms might end up being so similar that the human mind perceives them as identical. Too early to tell. anyway, still better than a single building copy pasted 10000 times.


Above you can see the insides of the building. There is no floor yet. Once this is done and I have enough furniture variety, a single such room should have a similar setup and item density to one of the single room shacks form Skyrim. Only 10 bazillion times more ugly.

And now let's get to the problem:


From inside, some walls are facing away from the light. You can also see the back side of building. Both are dark and lacking detail in shadow mapping. And they blend together, lacking 3D detail and looking flat. I could place a point light in each building, but I can't place on on the backside of each building.

Or could I? Maybe if I place a selective light, that only illuminates the two walls that are facing away from the light, without affecting any item near it, the terrain of the player? Lighting is so hard :(!

Tuesday, October 2, 2012

86 – Bumpy ride

Hey, I'm back from my two week long (including travel) USA business trip! I've been back for a few days and I am suffering from massive jet lag. Last night was the first night I managed to sleep. But I'll talk about my trip some other time. After such a prolonged absence I don't want my first post to be off-topic  So it is not going to be about America or my Guild Wars impressions, but about development.

This will be basically the same post (plus some recent developments) I would have written two weeks ago if my trip didn't have prevented it, but since so much time has passed I am not going to structure it a journal as I wanted, but instead go for a feature list. This has the added bonus of creating the illusion than I worked more :).


Bump mapping & specular mapping

Ah yes, the ever so elusive first half of an unified lighting system, my true goal vis-a-vis shader lighting. I finished bump mapping, but results where not that great. As you saw in the last screenshots, the bump effect was visible and seemed correct, but the end result was not that pretty. I attributed this to my poor quality normal maps. And parallax mapping seemed to work again, but I couldn't get rid of swirly artifacts. So I decided not to use parallax mapping.

This would have been my status two weeks ago.

But yesterday I got the idea to create some new normal maps using some better tools. I downloaded CrazyBump. Using the demo version I created some normal and height maps, and these did behave a lot better. The problem was that the stool at least did not look as good as back in the day when I attempted deferred rendering. That was a long time ago, long before I abandoned the Dwarf Fortress concept. Deferred rendering is such a relativity new and complicated technique that last time, while I did manage to put together a working implementation of it based on scarce resources and documentation available on the net and I did understand the principles of it, I did not truly understand a lot of the full implementation. When I tried to modify it, fix bugs and add specular mapping to it, I failed. Maybe one day I will be successfully rolling with deferred rendering, once all the kinks have been ironed out, like antialiasing, transparency, multiple materials, etc., but for now I am sticking with forward rendering. But my stool with CrazyBump generated maps was not looking as good as it did with deferred rendering.

So I came up with the idea not to generate the maps based on the textures I have, but on the height map that was specially created for the deferred renderer. And the stool now looks great! Maybe not quite as good, but very close. It is hard to tell because last time I had a lot of small lights illuminating the stool, but this time it is only one. Anyway, the shader is working and all I need now is professional height maps & CrazyBump or just professional normal maps!

But this was not enough. The main reason I stopped using deferred rendering was that I couldn't get specular mapping to work. But yesterday I added specular maps to the bump mapping shader in about 5 minutes and it looks great!

Even parallax mapping has less swirly artifacts, but they are still present. I might figure out a correct bias value, but I won't bother. I won't be using parallax mapping right now. Probably by the time DirectX 11 tessellation is common, I'll probably be rolling with parallax mapping.


Content management system

Game engines, except for rendering, are largely logistical problem resolvers, They make sure that out of a very large pool of data, larger than what can fit in memory, the right resources are available at the right time, are drawn only when needed and interact with other resources when needed, while maintaining interactive  framerates. One part of this is locating and loading the resources.

XNA uses content projects in order to locate and load all the resources. It even "compiles" the resources that are listed there, converting formats and packaging them. But for my needs this is not ideal. I want to be able to pass around the executable so that anyone can add new resources. This game will have a highly procedural nature, so I want it to even be able to create a completely new object type without having to restart the application or reload the level. Having content projects that must be compiled by artists is anyway a huge no no.

So I am creating a system that keeps track of resource locations and their use, allowing very flexible control on what is used and what isn't. With this system I can add a new object type to the engine with only one line of code or dynamically by reading some information from the disk or due to user input.

I am doing this in two stages. In the first stage textures and meshes are still part of the content project, but my content management system does not care about this. For the second stage I'll make the system loads textures from external files. XNA 4.0 removed the possibility to load a bitmap from a random file from the disk, so I've been searching around the net for alternatives. I found one and once I make sure it works, I'll tell you which one it is. For the third stage I'll make the system load also meshes from external resources.

There is an interesting situation right here. I like systems that react promptly. I hate waiting for stuff to happen. And start up time for the game is getting quite long. So I did some benchmarking, and I found that loading meshes and textures takes 2.6 second. Add to this procedural terrain generation, building and grass placement and you get to quite a few seconds. Eliminating texture loading, I got to 1.6 seconds. Loading meshes is a massive bottleneck and I do not know why. I need to figure out why this bottleneck exists.

How did I eliminate texture loading time?  Using the next feature!


Multithreaded texture streamer

Right now when the game loads up all textures are blanks. If I press a button, a new thread is launched that queries the content management system on the current status of objects, find out that the textures are missing, and proceeds to stream in all the missing texture. It is very fast, so in order to make the streaming more aparent I added a 250 ms delay after each texture load. Needless to say, the final version won't have this delay. Nor will you need to press a button to trigger texture load  These are pure development features, because I can test a lot without waiting for textures to load. Currently, the system does not require synchronization  The thread runs and gladly stomps all over the data it needs without having to use mutexes. This was intentional, but if the streamer grows in complexity, I will probably need to add mutexes and figure out a solution so that the streaming thread and the rendering thread only keep each other locked for the minimum time possible.

The game picks up the loaded textures and renders the whole scene with minimal state changes to maximize performance. I really need to add frustum culling.


New terrain texturing shader

Remember the problem I was having with terrain texture tilling? Low tiling value meant good looking distant terrain but very blurry and stretched out near terrain. Setting it to high results in good close terrain, but in distant lands there is a very apparent and disturbing tilling effect visible.

I fixed this by sampling textures twice, one time with low tiling factor and one time with high and using both values to texture the terrain. This is a compromise but pretty much solves the problem. I am currently torn between two settings for tilling, both giving good results.

I came up with this idea reading some UDK terrain texturing tutorials. They mention this problem and give a lot of solutions for it. In UDK you do everything visually, adding elements to and editor and configuring the relations between these elements, but that didn't stop me from implementing a similar idea in a traditional HLSL shader.

I'm still not done with terrain texturing. Currently  the texture is given by the height of a point. This is good for an initial setup of the map, but I want to give full control over texturing, so I'll have to expand upon the system in the future.


Diffuse wrap

Diffuse wrap lighting is a strange system, where the light given by a directional light wraps around an object. It is mainly used for (very poorly) approximating subsurface scattering. I probably won't end up using it a lot, but I did implement it and I might have a few objects that will behave this way.



With all these visually centered features, the game engine now looks a lot better. So how come I didn't show any pictures? This is because after such an absence I want to show something more impressive, and while it looks better, you'll end up still seeing the same objects. Barrels are boring  Give me a couple of days to add back all the objects I have, including trees, and I'll create a new video.

Thursday, September 13, 2012

Guild Wars 2 Impressions, part 1

Oh boy! My very first impressions post! I hope at least that it is the first! Damn you photographic memory, why do you fail me know. At least I still have photogenic memory! That made no sense…

So Guild Wars 2, ey? This is a very exciting launch, at least based on all the hype and the promises.  One thing you don’t know about me is that I am an MMO enthusiast. I have played World of Warcraft for years on and off. I was never super hardcore, preferring to subscribe for 2-3 months at a time at key content launches and I was a semi serious raider (DPS mainly, a little bit of healing) in a few guilds that never aspired to any extraordinary feats like world first or full heroic clears before standard nerfs, but we did clear a lot of content and it was great fun. I love raiding. I also tried quite a few other MMOs, since I kind of got tired of the WoW formula. Out of these tries, the last two are worth mentioning.

The first was Rift. Now Rift was a pretty good game. It was pretty much the first fresh MMO that launched with very few technical issues and it… was… *gasp*… complete! In a world where MMOs launch with only the bare minimum features and pretty much die out before getting any meaningful content patches, a launch like the one Rift had is a minor miracle. And if all you care about is game mechanics, dare I hang my head out there with a bold claim: it was a better WoW than WoW. Because that is what it was: a WoW clone. Like all other “WoW killers” before it, Rift was a WoW clone. Silly silly MMOs. You can’t beat WoW at its own game. I’ll get into this more, but you probably could have mechanics 100 times as good as the ones from WoW and it would not be enough to really kill WoW. Because mechanics are not all that counts. And the rest of Rift was kind of bad. The world was large but bland. They had good graphics but zero aesthetics. Some probably talented people worked on creating a lot of large hilly areas with very little distinguishing marks. Story was shit and you couldn’t tell what is going one. On the other hand, Rift pumped out new content like no other one and I was surprised to see it “die” so fast. It still lives, but there was a major exodus of players. I left before that, because the whole world was so bland and uninspired, that I couldn’t stomach the mind-numbingly stupid and uniform leveling bit so I could get to the good part: raiding. I even paid up front for 6 months that pretty much went to waste.

The last MMO that I tried was SWOTOR. I really wanted to love that game as a KOTOR & KOTOR 2 (and massive Bioware) fan. But while Rift was a very competent and complete WoW clone that did improve upon WoW technically a bit, but was ultimately a barren and uninspired world, SWOTOR was bad, incomplete and not taking any risks right out of the gate. A play it safe, not innovate for the life of it, hopefully some story and Bioware/Star Wars fans will keep it alive WoW clone! Sure, the story was good. At least for my class. The first act was a nice little personal story that even reached a conclusion that made me feel something and I actually wanted to reload and try a different ending. Something that never happened before in a MMO for me, only in single player story driven games.  And the first 10 levels of “heroic combat” were pretty good, mainly because of the very improvisational feel of using random abilities to dispatch larger groups as fast as possible and all the pussback abilities. Lobbing of a foe from a cliff is always fun. But after level 10 it got into the same rhythm of hot key based rotations, where you use the same rotation for pretty much all your gaming time if you want to be efficient. And the game was otherwise shit, with catastrophically uninspired zones. Nothing of the Bioware spirit came though when you were not doing a story quest. And the server died while I was still wanting to play (unlike Rift, wehe I left the game at full population numbers). Server transfers? Working AH? “We don’t need that. Our game is fine!” I think that because of the state they launched, the ambitions it had,  the support it got and the lack of an almost encyclopedic knowledge of the historical mistakes other MMOs have made and SWOTOR happily repeated, it deserved to die. A 200-300 million rumored expense game should have done better!

So on to Guild Wars! I was looking forward to a fresh experience, because while WoW was the best MMO, orders of magnitude better than the competition, I played enough WoW. And Guild Wars promises so much.

The hype machine around that game is so unstoppable, that GW2 is no longer hyped as the “WoW killer”. It is hyped as the “Jesus MMO”. Is it the Jesus MMO? No. Is it a WoW killer? No. Does it have the same longevity I expect form a MMO I can call home? No. Is it a good MMO? It is great. Do I like it? I love it!

There, done! That’s my impressions. See you next time!

I kid, I kid... So while WoW has nothing to fear from fully losing its dwindling but still million strong subscriber base to GW, I suspect it will feel the presence of, like they do for all massively successful games from any genre, like TF2, HoN, LoL, etc. Let’s hope that GW2, being free and all will have comparable success.

For the rest of the post and post series I’ll give a short description of a bullet points followed by a description for that point. If I put it in quotes, I am paraphrasing something that people out there are saying, probably idiots, followed by my view on the subject.

Needless to say, what I am going to write is nothing but my subjective but honest opinions on the game, based mainly on my personal experience leveling and Elementarist and also getting a few levels in some other classes, after launch and a beta event. So if I say, e.g. “Elementarist is a poop deck scrubber”, that does not mean that you will have the same opinion or that I wouldn’t have a different opinion should I have leveled a different class. People on the Internet have a very hard time with objectivity vs. subjectivity, facts vs. opinion, general rules of discourse and argumentation, and are generally shit heads. Shameless generalization because I too am on the Internet. Don’t take this the wrong way. They are tons of intelligent people you can talk to out there, and people you do know or had a chance to interact before are probably civilized and not at all idiots. But a random stranger, especially if he/she is under 12, protected by the anonymity of the Internet, in 9 cases out of 10 will turn out to be an idiot, at least in your first few interactions. Just a fair warning, in case you were wondering why I will be calling people idiots a lot in this series. Or at least I plan to…

And I’ll start with 3 things that Guild Wars does so well, that in my honest opinion these points are an extraordinary achievement that no one can ever take away from Guild Wars. GW might turn out to be the sole cause of a global pandemic that will wipe out 99% of the human population, and the 1% that are left alive but miserable and cursing GW2 for the rest of their sad and miserable lives, but they will still say “Well, at least those 3 elements of GW2 were still great.”.

It is the first truly organically cooperative experience in a MMO
MMOs are strange beasts. We judge them differently than we do normal games. We put emphasis on different things. We are willing to stomach a lot of subpar experiences that would doom a single player game so we can have some other kind of experiences that only MMOs give. One of these is the feeling of sharing the world with thousand of different players, having unique unscripted encounters and experiences that result from those people interacting, joining sub communities and even making friends. And yet, in your day to day experience a typical MMO is not a thoroughly cooperative experience. You don’t jump up in joy seeing a random person. Their presence does not automatically enrich yours. Playing with friends and guildies might turn out to be such a mutually beneficial experience, one of those 1 + 1 = 3 scenarios, but a random stranger is generally not a good thing. Most of the time they are a nuisance. They will still your kills, steal your node resources, block your mailbox or AH NPC, spam your chat and do other things that can be considered at least mildly irritating. This without taking into account PvP ganking. Now open world PvP is one of the best times you’ll have in a MMO. I do not like organized PvP, but open world PvP is great! When you are in the mood for it, there is nothing like some random fights, especially if you are relatively matched level wise and all are trying to progress on quests. A 5 minute kill quest in a remote region has transformed for me in a few hours long super fun skirmish of PvP goodness. But if you are not in the mood for PvP, that experience might ruin you fun and planned progress.
But this is where GW2 is different. In a normal MMOs a random player is not instantly helpful and may be detrimental to your experience, while in GW2 a random player is often helpful and at worse can have no effect on your experience, almost never being detrimental. GW2 fosters true cooperation between random individuals, without having to exchange a single word or having to form a party, and does so organically. A couple of weeks in the game and still, if there is someone around and I go down in battle they come to resurrect me. They might even go a little out of their way to resurrect you, since everyone can res and resurrecting gives great XP. Massive events and dungeon runs often get you killed, but a res is never far away. Other players around can make combat more entertaining and challenging, while at the same time making it easier. A weird balance.  And someone can never fuck you over. There is nothing they can do that is detrimental to you. If you are fighting something and someone attack the same foe, you still get your loot roll and experience. If they did enough damage, you both get the original amount of XP that you would get if you only killed the mob solo, and you both get a separate loot roll. Neither of you can reduce the chance of another to get loot. And doing enough damage is easy. Often, it is enough to just hit a mob once with one of your stronger attacks. While I am out and questing, when I run past a mob someone else is fighting and I am in a hurry to get somewhere so I don’t hang around to help him (but I often do hang around), I still give one solid hit to that foe. This without breaking my stride or anything since I am an Elementarist (but in GW all classes have some ranged combat options, and melee can still walk a few steps towards the mob, hit them, and go on to their destination).  I still go straight to my destination, but when in range I let one flying towards that foe. The one fighting the foe will be happy that he has to do less damage, and we both get XP. My loot is gone because most of the time under this scenario I won’t be returning to see if the foe dropped any loot, but still free XP and an atmosphere of cooperation. This applies to dynamic events, resource nodes and other activities. If you put the effort in, you get the reward, and having more than one person does not reduce you reward. There is nothing a person can do to fuck you over. There is no open world PvP. I don’t really like this, but it goes hand in hand with the idea that another person is never a threat: they are true allies and you are cooperating to achieve a goal. And attacks often AoE buff, heal or interact with each other, so combat in groups is more complex, but in a kind of passive way, so you’ll get the benefit without having to worry about the people around you.
Actually, I did notice two minor things that someone can do that you may find annoying. One is mob training. Sometimes a person runs around trying to reach a goal with a bunch of mobs chasing you. They eventually give up and return to their spawn point. But sometime you will meet them on their way back. You are just minding you own business or fighting a mob and surprise! More mobs! In GW2 combat is great and dynamic, but often challenging. You can die fighting normal mobs. This almost never happens in other MMOs where solo combat is trivial, routine and boring.  So having to fight 2-4 extra mobs trained by somebody can kill you. Another theoretical thing that could happen is a lot of people showing up for an event thus making the vent hard and then AFKing. This never happened before and I doubt it will, because people do want their XP and events are short and engaging, but it is a theoreticaly possibility. Even if this would happen, you can still walk away. So will probably get even a good contribution ratting for the event.
So there you have: GW2 inspires cooperation like no other MMO before it. After experiencing GW2, I can’t imagine going back to another MMO and cursing out loud players for node stealing or high levelers AoE killing all mobs on screen in one blow even before I can get into range. MMOs should be about cooperation, yet it took so much for one to truly embrace this? How?

Combat is very mobile and dynamic
Another major point and game changer. This is the current trend, MMOs are starting to get action-y, so this is not 100% a GW think. See Tera and other upcoming titles. 
I am going to break combat into two parts: mobility and the actual combat.
And the mobility part is the great one. I am incredibly mobile when fighting on all classes. I circle strafe, circle kite and dodge attacks. Sometime I can go through a tough combat encounter on my glass cannon Elementarist without taking any significant damage. And often I bite off more than I can chew and have to fight 2-3 times as many mobs as planned. That is an incredibly engaging and tense experience, where I do my best to circle kite all mobs while still doing OK damage and dodging big hits. I don’t always make it, but surviving with 3% health and a small army of corpses at my feet is a great feeling. While looking at what is going on the screen, not some GUI element. The game is really the game. It is not just some window dressing, while the real game is the overlaid spreadsheet like GUI with dozens of bars and numbers everywhere. And if you played other MMOs and classes that are cast time based, you could find it exhilarating that you can move around while casting/channeling without canceling your spells. 
So while GW2 is not the only MMO that claims to have action combat and mobility, and the concept might not be original, the mobility of combat is so enjoyable that their implementation can truly be called innovative.
The rest of combat, on the Elementatist at least, is not that great. And I noticed this on other classes too. There is at most one weapon combo per class that is fun, the rest are efficient but not fun or utility based. Now utility is great in PvP and dungeons, but in normal PvE I want fun. I want to tear shit up. For Elementarist dagger/dagger is great and you fell like the ultimate bad ass when you apply your mobility based fire skating skill. Staff is an effective weapon and has great AoE but is slightly boring. It allows you do be great at circle kiting (while dagger/dagger is more of a hands on approach) so it is even easier to take down mobs in PvE without putting your fragile self at a lot of risk. Scepter is not very fun for me. What is this talk about weapons? Well, in GW, your first 5 skills change based on what weapons you have. You cannot swap them around. So if you like only a few of the skills your weapon combo gives, you are stuck with the rest. And you unlock all weapon skills very easily, so after a few levels there are no new weapon skills or weapons to look forward to. Elementarist can’t even swap weapons like the other classes can, instead swapping their elemental attunement. Fire is great damage and Water is low damage but good healing and a little defense. I use these two exclusively. Air should be good single target damage with some control, but in practice I find it less efficient and fun than fire, so I rarely use it. And earth, I just don’t get Earth except when using a staff. 
In future parts of the impressions I’ll get more into detail in a negative bullet point why I don’t like the actual hit stuff part of the combat, but the mobility and skill interaction make up for it. Heck, mobility on its own is so fun that it could carry a game on its own.

Exploration & aesthetics
And the final mega positive bullet point! Exploration! Guild Wars does it sooooo well. Most single player experiences that claim to have a strong exploration element don’t have such great exploration. It is the best kind of exploration, where you explore without having someone tell you to or point you in the right direction. The kind where you don’t do it for the reward and there isn't even always a reward at the end, but you still like it.
Exploration is greatly helped by the way the game looks. While the engine is not really technically that impressive, it is still good for 2012 levels. Not a technical marvel or a rendering powerhouse. Actually, it is very poorly optimized (a negative bullet point for later). But aesthetics and levels design are superb. The level of detail in every single zone is incredible. Great texture work and fantastically detailed models create beautiful landscapes you just can’t help to explore. Even snow covered areas that are often boring in other games are intricately detailed here. And major cities are huge, with even more detail. Even small villages with two houses are detailed. There isn’t a bit of copy & paste scenery in the whole game. And the artistic style is very painterly. They further embrace this with the style of the cut scenes, which look like paintings have come to life and should extend the longevity of the game’s art. A more abstract art style, where artistic vision is at the forefront always ages better than realistic graphics. Because we know how reality looks, and when technology advances, we can clearly say: yes, this looks objectively more realistic.
The lush and insanely detailed world of GW blows completion out of the water. Rift was a huge field with 3 landmarks (I’m exaggerating). SWOTOR looks brown and boring in most areas, but still felt more divers than Rift. But GW2 is like a new WoW. WoW gets a lot of crap thrown towards it because of the cartoony graphics, but the people at Blizzard are great at creating aesthetically pleasing games that are technically not that impressive and at creating zones with a unique look and fell. And so are the artist from ArenaNet. Aesthetics are hard to judge objectively, but it is clear that GW2 has tons of more detail than WoW and subjectively I say that the artistic style is a lot more inspired.
It looks great. Period. And the looks make your exploration more pleasant. While exploring you will often traverse levels with great verticality: hills and mountains have hidden paths to the top of them, water is present in almost all levels and underwater areas are again very detailed, very deep and even fun, you often find caves from small to large, often covering large underground areas under some place you explored the top of, portals to other areas than can be only opened after some dynamic events and that take you other parts of the map that can’t be accessed otherwise, jumping puzzles, regular puzzles, skill challenges, hidden events that you yourself trigger only when interacting  with some object in a remote area and more. And often when going though this, you will find one insanely detailed model of something that an artist worked their ass off for. That serves zero practical purpose. Relatively speaking of course. Not detailed for a set piece in a DirectX 11 four hour long corridor shooter. Insanely detailed for an object most people won’t see hidden in a massive MMO. Or you’ll find an elaborate cave that is huge and looks great, a small maze even, and while such caves will often contain one of the structured exploration elements, sometimes they won’t. Sometimes they will even be empty, as in no mobs. Hey, you went off the beaten path, and your reward is only what you managed to see. You don’t always need a huge shinny pop-up with a reward. But you often do get a reward, and if nothing else, the bonus XP from mobs. In GW2, mobs give bonus XP based on multiple factors, including their age in the world. If you are off exploring in some remote areas where no one has set foot for hours, you can get huge bonus XP. Monster grinding is not an efficient way to level, so the bonus XP won’t mean a lot in the long run, but it is still a nice little bonus that does make the game better and creates more the illusion that ArenaNet are obsessive about all the small details.
And even when not exploring, the maps in GW2, besides the renown hearts that kind of suck and I’ll talk about later and dynamic events that are generally great, feature other structured exploration elements, like points of interest and vistas. Points of interest are just some interesting and often more detailed locals on maps that really don’t serve any purpose, but do give XP. On each map, a few of them or slightly hidden and off the beaten path, encouraging exploration. Then we have vistas, which are in 99% of the cases in hard to reach locations. I have a love/hate relationship with Vistas. Getting to them is generally annoying. You do learn to read the hints in the landscape for possible access points, but on every map there is at least one that takes me minutes of very annoying searching around to find the path to them. Once you figure out the path, executing the jumps is generally easy, except for a handful of them. And some are even on top of mini jumping puzzles, where both figuring out the path and executing the jumps is hard. And even removing the fog of war form maps (which is very easy and you’ll do without trying just by traversing the map) gives XP. Like in WoW. There are also skill challenges, which unlock a new skill points after you beat a foe, eat some item or just commune with a place of power. And a few more activities.
But actual jumping puzzles really make me throw out my computer from the window. So annoying! Luckily, they are optional and only give some loot and an achievement. So I must do them!
And if you did all renown hearts, skill challenges, points of interest and vistas, you get you 100% zone completion bonus! Non-scaled loot (why?), a good amount of money, XP and some crafting mats.
And because of the level scaling (more on this later), going to a new low level area in order to 100% it can still be fun and quite lucrative!

This concludes part one of my impressions post, where I talked about the 3 things that I think really set Guild Wars 2apart from other MMOs. In part two I’ll talk about other points that I like, but also that I dislike. So if you thing that this part is overly positive and I would give a glowing review to the game where I a reviewer,… maybe, maybe not. Wait and see!