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.

onsdag 16 februari 2011

I am Yuri...obey me!

Arghh... I'm feeling a bit sick and fever-ish and didn't get much sleep last night as a result of it :(

So there probably wont be much work for a few days until i beat this thing.
I hope i can still manage to get my "playable" prototype done before the planned game-dev LAN in 14 days.

But I am starting to feel a bit stressed about that... there is 10 points on my TODO list, some i know for sure i wont have time to implement, others i don't know yet.

As you can see, I also uploaded a picture of me today, I feel it makes the blog more personal if you see who i am... even if i look like some deranged super villain with a "conquer the world" complex...

However, it should be noted that it was the best photo from a dozen taken... some of witch would give you nightmares and scar you for life ;-)

Perhaps was it not the brightest of ideas to take a profile photo when you are not well, hence the 6547 Photoshop filters used :P

oh well... i think i will crawl under a blanket and drink some hot tea, and hope I'm feeling better by tomorrow.

Good night Liero fans, wherever you are.

[Edit]
Doing some quick messing around with the facebook 'like' button in this blog, if things are not working properly, or your -like- vote disappears, try again later.
Sorry for the inconvenience.

fredag 11 februari 2011

Texture test! :D

I implemented something so that i could see what the hell was going on, its is almost impossible to tell where blocks are when thay are all in the same color...

And even if there are several visible bugs in the screens bellow, it is starting to look really awesome! :D






Texture on voxels is a bit smeared(so I deliberately took screens from a distance) due to an bug in the texture attlas.

The white fog is also temporary, i think i will go with black fog, or replace it with Depth of field.

And don't let that fps counter in the corner scare you...
The frame rate is never that low, in fact... i believe 60 is my average fps, but due to a bug... an insane amount of mysterious single ghost voxels is placed all over the map(you can see them as single holes on the ground)...

These mysterious voxels generate thosands of extra polygons... strangely they only appeared when i added texture, and i really don't get why...
Worst case scenario, I give Ghostbusters a call and we have our frame rate back to 60 in no time ;)

If i keep this creativity up, i wont have any trouble make the "dead line" for next game-dev lan! :D

[Edit]
Quick update.
Added one more picture, the last one(bottom right) don't have the ghost blocks, and as you can see, The fps is back to 60+ :)
The reason for this bug is yet unknown, so I'm sure it will come back and bite me in the ass some day ;)

torsdag 10 februari 2011

Wops!

Turns out i made some miscalculations and errors in my last 2 posts.

First of all, the render distance from the first test render was incorrect.
It was based on a picture from the original Liero, but the problem was that the picture had different resolution than the in-game resolution, so that every pixel was 2x2 as big, and this was something i didn't consider when i later made my estimation for how long render view must be in Liero3D.

Ironically... I several times thought to my self "The scale of things don't look right!" but since i had done the math i was sure it was correct, and concluded that it must be because it was in 3D and because the level didn't have any objects in scale i could relate to.

The good news is that we get fairly decent performance with the 2x view, witch of course means that if we split it in half to get the same view as Liero 1.33, we would never have any performance problems! :)


And now the second correction... I'm not sure what i was smoking... but apparently it was some good stuff, ether that or i have simply been playing way to much Minecraft lately....

But after closely inspecting some Liero movies on youtube, I noticed to my surprise that the tunnel holes was NOT as complex as i remembered.

This is not a bad thing of course, it would give me less work in the end.... But i do think my tunnel generator creates far more interesting tunnel structures.

In the end, i guess there is nothing forcing me make my tunnel generation as boring as the original.

so what do you people think? complex tunnel systems or simple holes like in Liero 1.33?

[Edit] Oh and i forgot, I also had a post about the new Liero3D group on facebook, but i later found out that i really wanted a Page(gives more control and more options), but until i have the energy to add a Like button to my blog, you will have to search for it manually.
The group is to be deleted.

tisdag 8 februari 2011

Tunnel generator test!

What would Liero be without all those generated tunnel spaces?

Well I for one don't plan to find out... so i started working on a simple tunnel generator!
and the result looks very interesting!






I'm not sure they look like the tunnels in Liero 1.33 yet, a bit hard to compare 3D tunnels with 2D, but I'm sure i have loads of tweaking ahead of me.

If anyone is curious, My solution is to create X amount of digger-particles that digg around for Y amount of cycles, and every now and then changing direction and random attributes.
Simple, but it works :)

If I'm not mistaking, this is a similar way to how Markus generates his caves in Minecraft, but i cant swear on it.

This has been the most productive day of programming i have had for months, damn it feel nice!

oh well, back to the salt mine :)

lördag 5 februari 2011

Liero3D rebooted!

After a long break, and working on a different project(Minertopia: a Minecraft remake) i have decided to go back and Finnish Liero3D before i continue on minertopia :)

However, I am afraid that there will be some rather BIG changes in this project that might not make everyone happy, and I'm sorry if I'm making any one disappointed.

But this project is taking a very different direction in the style of the graphics, and is instead going with a look much closer to the original Liero 1.33, yet still 3D :)

All the minecraft and voxel games have really inspired me to make Liero3D into something that feels and behaves more like the original(if not exactly!), something that lets me keep that hand-pixel-made feeling and still use all the glory of 3D rendering, and i belive "voxels" is the solution to do this.

The goal, assuming my engine can keep up with it, is to convert the original 1.33 graphics straight over into blocks, on a 1:1 scale, so that every single pixel becomes a "3D pixel" block :)
I did a simple rendering test, showing off some random mud balls and using deffered shadows:




Don't be alerted with the ugly and primitive shading, I'm planning to add SSAO(Screen Space Ambient Occlusion) to give it a nice shaded feeling, similar to this picture (NOTE: that that picture is pre-renderd in a 3d modeling software like Maya, so it can never look that good with realtime effects)

But there a few things that are interesting with the picture above, it has almost exactly the same field of view as the original Liero 1.33, and it fit the same amount of pixels as if you where simply adding a 3rd dimension to Liero :)

The performance is not great yet, but a big factor is that the sunburn engine don't like terrains where chunks are much higher than they are wide, adding my own occlusion outside of sunburn should improve this.

One more big thing i can do is to optimize a mesh so that a big flat surface, for example: 8x10 blocks, still takes the same amount of polygons as 1x1 cube, as long as they are made from the same material, an example of this would be the big flat top surface of those balls, if an smart algorithm could split that surface in as few sections as possible, we would save tons of polygons.


There are more things that will be totally awesome with this graphics style.
not only did i split development time in half... is it MUCH more simple for me to create a simple level editor where you can paint, digg and sculpture a game level.

The same can be done with the player and the weapons(model editor?) to make things just as mod-able as the original game :)

Also considering creating an algorithm that converts the original 2d sprites into 3d models straight over :)

Again, I'm sorry if this change of style is different from what people wanted, but i got a bit tired of getting stuck on all the problems that round-fake-holes gives me...

However, I absolutely LOVE Voxel style games! and this would make it more true to the original 1.33 :)

Talking about Voxel style games, check out Voxatron!, yet another game that inspired me to make the change ;)