tisdag 15 mars 2011

sweet shades!

Just as i expected, the texture based "Ambient Occlusion" effect looks a hundred times better than the previous vertex based one, and I'm almost finished with it! :)

There are a few blocks missing(you can see that some corners are not shaded) but this will be fixed very soon.

I will also change the way I write blog posts, it looks like people really don't like my rambling over the last month(apparently visitor number plumbed from 680 to 160 in one month), so i will try to make it more interesting.

From now on, I will write shorter posts, and only post new messages if i have some new cool pictures or movies to show :)

Youtube video will be up shortly, I only want to add some gore and worms to blow up ;-)





Note: The shadows are a bit over the top atm, I will make them slightly lighter.

lördag 12 mars 2011

To fake a fake

70% of all woman are faking it...
But I wonder how many who need to fake the fake?

After trying a SSAO shader and seeing some unsatisfying performance(on a very primitive example) , I decided to look into alternative solutions that would be faster to render and could work on older machines.

So I did a simple test where i darkened vertexes next to other blocks, and it looks something like this:



It looks really bad in a few spots, and quite good in others, but on average it is not as good as I was hoping for, so my next attempt will be to use gradient shaded textures instead.

Currently things are only evenly gradient, but I want the shadows to be stronger the closer you get to a corner, This is not possible to do when we color the vertices's directly, but would be very simple to do on a texture.

This is of course a very fake way to do "Ambient Occlusion", but considering that we get it almost for free, I can live with it.

Note: The picture to the right has slightly darker shadows.

torsdag 3 mars 2011

Feeling the pressure

With only 2 days left to the game-dev LAN, I'm starting to feel the pressure...

Unfortunately, I wont manage to implement everything i wanted to implement, but i hope i will have most of the important ones from my TODO list.

some of them are:

  • Instanced based voxel Particles for blood, explosion fragments and dirt.
  • A few pre-set weapons used for demonstration in free-camera mode.
  • A few dummy objects to blow up, generating cascades of blood and gore that paint the terrain red :)

hopefully i can also put together a more decent and more presentable loading screen, but it don't have very high priority, probably the very last thing i do if i have time to spare.

Things that i wont have time for:

  • SSAO(this really bothers me, it would have made my project 100x more presentable and attractive to view).
  • Depth of field.
  • Player physics.
  • Some form of simple multiplayer test.

It really is sad that i wont have time to implement multiplayer before the LAN, it would have been awesome to test play the game with the other people there, but I guess we cant have it all :3

I have spent the last 2 days messing with the instancing for my particle effects.
And I think I have everything solved(except for some performance penalty to be solved later).

If things goes well, the particle engine should be implement into the engine today, and unless any unforeseen problem should arrive, perhaps record a short tec-demo and upload to youtube :)

[Edit]
The particleManager is implemented and running very smoth, I'm very happy with the performance and how it works(pre-loading and recycle old particles).

But i forgot that the custom shader i used for instancing would create problems with fog...
so until this is solved, I don't feel its worth making a movie and upload to youtube, I would only regret it later.

If only i had a working Depth of field class, it would not create the same problem, and everything would look awesome! :D

torsdag 24 februari 2011

Texture suport for 3D volumes!

I had an idea a little while ago where i tinkered with the concept of putting 2d textures on 3d volume data... and the result turned out better than i expected! :)

It is not a 100% perfect solution, there are plenty of situations where it might not look very good... but it will work just fine for my "little" game :)

The goal is to make it possible to import any number of textures(254 is max), and use different textures for different materials, each with its own attributes(indestructible, removable and so on).

It would also be possible to use different textures inside other textures, for example a block of sand, and inside you will find wood texture, and if you remove the wood texture you find brick texture, and so on.

The plan is to ship an level editor with the game where you can paint and sculpture the terrain in 3d, and use any texture you want on any surface :)

That is another 2(almost 3) points implemented from my TODO list! things are really starting to snowball now :)





PS: I had that cobra picture as a poster when i was a little kid, and it was my favorite one!
so when i found it browsing for textures, i could not help my self ;-)

onsdag 23 februari 2011

That is the big question

Sunburn or no SunBurn, that is the question.

For a while not, i have contemplated if i really should use SunBurn for my Liero3D project, it seems like such a huge Overkill, with a hole heap of problems and very little gain.

Admittedly, I think SunBurn is an awesome product(even if i don't like the direction the developers are taking with it), and i don't regret getting it(or asking my family for the money), but i still feel that it is way over the top for the L3D project.

So, lets make a list of pros and cons of using SunBurn:

Pro's:
  • Deferred shadows is Awesome!(with capital A), especially with lasers, missiles and explosions casting long shadows all over the place.

Cons:
  • Running my game with SunBurn and deferred shadows is dramatically slower than it would be without, so the computer specs is much higher and 3.0 shader support is forced unless you turn off shadows. Without SunBurn the game would run on much older computers, and of course give much better frame rates for everyone in general.

  • With the exception for real-time shadows and lightning, we use no other features in the SunBurn engine, no normal maps, parallax map, HDR, or the simple physics that is included into SunBurn.

  • From some of the tests i have run on ScreenSpaceAmbientOcclusion(SSAO), it is a very slow post processing effect, and i might not be able to run both SSAO, DOF and use SunBurn with deferred shadows all at the same time, I feel that SSAO is far more important effect to make block more visual(not invisible in shadows due to single color shading).

  • I'm still a bit new to SunBurn, and like most big products... the engine feels a bit overwhelming at times, and implementing features might be far more tricky and time consuming than it would be otherwise(in pure XNA). I also don't like the feeling of being Dependant on support from SunBurn crew and forum if i manage to get stuck.

So i have to ask my self, why would i give my self all this extra headache, just to have dynamic shadows... would people even care about the shadows that much?

One of my biggest reason for stubbornly sticking with SunBurn, was the fact that my grand mother gave me the money for a SunBurn Pro license, with the soul purpose that it would create something that could bring me money in the end, and now i feel a bit forced to stay committed to the cause.

But I have to ask my self, is that not using SunBurn for all the wrong reasons?

What do you people think, is Dynamic shadows really that important? or would Minecraft style lightning work just as well?

lördag 19 februari 2011

Damn you SpriteBatch!

Rrrogntudjuu!

I have spent several days trying to find the cause of a very annoying bug in the engine...
After days of stairing at my screen, houers of debuging and checking evry f**king variable, evry god damn Vertex renderd... you name it, i cheecked it...

The visual effect it had was totally crazy, it painted my god damn world dark blue(exactly like a blue block in a shadow) in the segments (chunk) i was blowing holes in, it also happened if i reloaded the terrain, but it never happen when the same method generated the terrain in the first place...odd indeed.

So of course, i would assume it had something to do with data generation... even tho i could not understand why it didn't paint things blue when the terrain was FIRST generated "memory leaks? in C# ... it cant be.... can it?"

Imagine my confusion when it was still shadow blue with shadows turned off.... no blocks was ever generated in that shade of blue in the first place... *snort*

After several days I started to get real desperate, and for a brief moment i considered ripping out SunBurn just to make sure it was not a bug in the rendering engine.

Luckely... I didn't tear out SunBurn!
I manage to find the bug just moments before that.... and the reason for it? ... xna SpriteBatch class used for 2D rendering. *mutter*

Turns out it didn't like that i rendered 2D(fps and debug text) after i rendered 3D... *sigh*

This is no big news, i knew from past experience that SpirteBatch can cause some problems in combination with 3D... I think it has to do with settings for Z-buffer getting screwed(or something), I'm not sure... ether way... it was pure luck that i un-commented that line, what if i never did that? what if it would have jeopardized the whole god damn project?

Took me 3 days to figure it out... bah...
what a waste of time!

So many features i could have implemented if i didn't get stuck on this, oh well, i guess the main thing is that I'm back on track again. :)

And while I'm here, I might as well post a fun(not to serious) screen-shot i took while i was debugging things.
I swapped the original Liero texture for a more color-full "candy" texture.
Don't worry, it wont look like that, but it sure do seem liven up the place ;-)

PS: is it only me, or whats up with the giant green "Death star" thingy?

fredag 18 februari 2011

The plan

Well I feel a bit better today and I am back to work :)

And while i take a small break from the coding, I thought i would update and clarify my plans for this project when it comes to the commercial aspect of Liero3D.
This is something i haven't talked much about except for in my early posts back in the days when holes where still round ;-)

I feel that i should make it very clear from the start what people can expect so there is no surprises and sad faces later, so here goes :)

As most of you already know(those who played the original Liero), this game is based on an existing free-ware game written by a guy called Joosa Riekkinen back in 1998.
And since the release of his game, dozens of people have created remakes and clones, most of them being free-ware.

From that point of view, one might assume that Liero3D will be freeware as well...
Yeas, the client it self will be freeware, but not all its features.

So here is the plan:

  • The game will be 100% free to download and play locally against bot's when it is finished, but if you want to play online or LAN with friends, you need to buy a Key.
  • A Key is a one time cost, you buy it once and get permanent access to the servers and online features, such as Multiplay, LAN, Ladders, and simpler access to user created Maps, Mods and so on(even tho you could install those manually in client of course).
  • The price of a key is reduced during early development(alpha and probably beta),price set at 100 SEK( thats about 10 EURO, or 15 dollar) and will increase 50-100% when game is finished(the exact rate is yet to be decided).
  • The only way to access the alpha(and possibly beta) will be with a key, no free versions will be available until after beta.
  • The alpha will be available when i feel the main core features in multiplayer is working, no single player(bots) mode will be available at alpha release.

The points mention above might change, but it gives a good estimate on what my current plans are, I hope this is acceptable to everyone.

This way, i don't technically take any money for the content that is related to Liero, i take money for accessing my server and letting people use my broadband.

After all, I need to pay my rent and put food on the table as well, and currently i have to struggle on welfare just to survive...

So it stands to reason that i should do what i can to improve my life, and make it possible to work full time on this project, witch would help increase the quality for everyone who like to play it :)

Feel free give me some feedback on the topic, what do you think about the commercial solution for Liero3D? write me a comment :)

[edit] made some changes in text, trying to improve the quality of things.