State of Fortune

I just finished the last part of the website and put it online. The following things changed since the last update post:

Completely new website
A new game forum
Changed from an applet to a downloadable program
Added dynamic soft shadows
You can now change resolution
The game can now automatically start up in full screen mode
You can now quit the game while in full screen mode
If you forget your password you can reset it (for the current players, if you want to use the functionality please IM me your email address over one of the forums and I’ll add it to the database)
You can now choose gender when you create a new account. It doesn’t do anything yet though, but I’ll add that shortly. For the current players, let me know if you want to be shown as a female (I defaulted everyone to man).
Improved performance
Fixed bugs

If you find any new bugs, please let me know on the game forum so we don’t have to spam JGO. :slight_smile:

I’ll head back into the code of the game itself again now that the main things around it has been taken care of.

Kind regards,
Mike

EDIT: One of the computers at home has problems with the full screen mode, if it isn’t working for you please change it to windowed mode in the options of the launcher until I fixed it.

First of all… Thank you… this is like a christmas present from u :D.
Second its working just fine :smiley:

Keep up the good work!

Happy Holidays for everyone!
Joaogl.

There is one thing left on the update… a texture change on the trees to make them christmas trees during day 25 …

First of all… Thank you… this is like a christmas present from u :D.
Second its working just fine :smiley:

Keep up the good work!

Happy Holidays for everyone!
Joaogl.

There is one thing left on the update… a texture change on the trees to make them christmas trees during day 25 …

Thanks for the bump up to featured Riven! :slight_smile:

After a lot of relatives visiting during Christmas and New Years I ended up adding normal mapping today. It wasn’t as difficult as I had thought and even though the effect is subtle it makes a nice impact while playing.

Here is a with and without screenshot (It is currenty turned on when you turn on shadows and/or high quality ground, so only look at the texture difference):


http://stateoffortune.com/pictures/screenshots/withoutnormalmap.jpg


http://stateoffortune.com/pictures/screenshots/withnormalmap.jpg

And here is a full hd screenshot of how the game looks like now (click for full quality):

http://stateoffortune.com/pictures/screenshots/shadowsbumpmapsmall.jpg

Mike

Some better shading would take the feel of the game to a whole new level, and what you’ve done there is a pretty good start.

Two types I would recommend are ambient occlusion (probably in the form of SSAO) and normal-mapping your textures.
Those two together make the difference between a 2D sheet with a wall texture and real-looking 3D wall.

As usual, amazing work!

Thanks!

The normal mapping is what I just added (although I am aware that the normal maps aren’t the best, I just generated them from the textures). Somewhere down the line I’ll go ahead and get an artist make me some really nice textures with fitting normal maps instead of the random ones I have at the moment.

It’s not the first time that someone says SSAO, I had a look at it but didn’t understand anything, maybe I’ll look at it again to see if I can make any sense out of how to implement it :slight_smile:

Mike

Heh I was just about to suggest the same thing. SSAO is a complicated shader, and it destroys performance if done incorrectly but it is worth it in the end. Try adding in bloom as well, it’s probably one of the most simple post processing effects you can do and it adds quite a bit to the game. For example, here is the very first bloom shader I made:


uniform sampler2D m_Texture;
varying vec2 texCoord;
void main() {
    vec4 color = texture2D(m_Texture, texCoord);

    int i, j;
    vec4 final = vec4(0);
    for(i = -2; i <= 2; i++){
        for(j = -2; j <= 2; j++){
            vec2 sampler = vec2(i, j) * 0.005;
            final += texture2D(m_Texture, texCoord  + vec4(sampler, 0.0, 0.0));
        }
    }
    gl_FragColor = (final / 25) + color;
}

Simple!

Of course to get a nicer effect you would probably need a two pass Gaussian blur unless you want to do the blur in one pass, which isn’t very good performance-wise.
Finally, check out parallax mapping, it’s another really nice effect. Simple as well.

Good job on your game, it looks really nice!

Edit:
From your images I can’t tell if you already have this, but try adding in some “froth” where water touches land, it would make it look a million times better. Unless of course if you already added it, as I said I couldn’t tell.

Oh sorry, I thought you just normal mapped the whole ‘blocks’ (whatever you call them), not the textures.

Have you experimented with making the effect stronger?
On some of the wood pieces I can’t tell if it’s normal-mapped or not.

Thanks for the bump up to featured Riven! :slight_smile:

After a lot of relatives visiting during Christmas and New Years I ended up adding normal mapping today. It wasn’t as difficult as I had thought and even though the effect is subtle it makes a nice impact while playing.

Here is a with and without screenshot (It is currenty turned on when you turn on shadows and/or high quality ground, so only look at the texture difference):


http://stateoffortune.com/pictures/screenshots/withoutnormalmap.jpg


http://stateoffortune.com/pictures/screenshots/withnormalmap.jpg

And here is a full hd screenshot of how the game looks like now (click for full quality):

http://stateoffortune.com/pictures/screenshots/shadowsbumpmapsmall.jpg

Mike

That was more of a blur than a bloom shader. It made everything look… blurry :slight_smile: I considered adding such a filter for items far away, but never really got to it.

I had a look at that today actually and while it can be a nice effect one some kind of blocks it seemed like a lot of work as I’m not that good with the picture editing programs :slight_smile:

I indeed didn’t add that. Again mainly as I wouldn’t know how to, but if I get some freeze and want to dive into something really difficult it is one of the effects that I’d like to add :slight_smile:

I tried but as the normal maps aren’t of that high quality it made it look quite bad. I’ll revisit making the effect stronger once I have better textures.

Now you guys made me dive into SSOA again, I’ll never add any new content like this :slight_smile:

Mike

Some better shading would take the feel of the game to a whole new level, and what you’ve done there is a pretty good start.

Two types I would recommend are ambient occlusion (probably in the form of SSAO) and normal-mapping your textures.
Those two together make the difference between a 2D sheet with a wall texture and real-looking 3D wall.

As usual, amazing work!

Thanks!

The normal mapping is what I just added (although I am aware that the normal maps aren’t the best, I just generated them from the textures). Somewhere down the line I’ll go ahead and get an artist make me some really nice textures with fitting normal maps instead of the random ones I have at the moment.

It’s not the first time that someone says SSAO, I had a look at it but didn’t understand anything, maybe I’ll look at it again to see if I can make any sense out of how to implement it :slight_smile:

Mike

If you get it working, it will be worth it. :point:

Before AO:

http://dl.dropbox.com/u/99583484/3D/Voxel%201.png

After AO:

https://dl.dropboxusercontent.com/u/99583484/3D/Architect/Screenshots/Sun%20Aug%2004%2013-40-46%20NZST%202013.png

(EDIT: Ignore the different fog shaders)

(EDIT 2: Also note that it is fake AO, not SSAO. This kind of fake AO really only works on voxels)

Heh I was just about to suggest the same thing. SSAO is a complicated shader, and it destroys performance if done incorrectly but it is worth it in the end. Try adding in bloom as well, it’s probably one of the most simple post processing effects you can do and it adds quite a bit to the game. For example, here is the very first bloom shader I made:


uniform sampler2D m_Texture;
varying vec2 texCoord;
void main() {
    vec4 color = texture2D(m_Texture, texCoord);

    int i, j;
    vec4 final = vec4(0);
    for(i = -2; i <= 2; i++){
        for(j = -2; j <= 2; j++){
            vec2 sampler = vec2(i, j) * 0.005;
            final += texture2D(m_Texture, texCoord  + vec4(sampler, 0.0, 0.0));
        }
    }
    gl_FragColor = (final / 25) + color;
}

Simple!

Of course to get a nicer effect you would probably need a two pass Gaussian blur unless you want to do the blur in one pass, which isn’t very good performance-wise.
Finally, check out parallax mapping, it’s another really nice effect. Simple as well.

Good job on your game, it looks really nice!

Edit:
From your images I can’t tell if you already have this, but try adding in some “froth” where water touches land, it would make it look a million times better. Unless of course if you already added it, as I said I couldn’t tell.

It took an hour to add but it looks awesome and my fps didn’t even drop with 1. I’ll upload it into the game tomorrow or so.

With/without comparison look around the “shelf” over the doors, the shop letters, around the doors, the far away trees, the lowest window, the landscape and more:

http://stateoffortune.com/pictures/screenshots/ssao.png


http://stateoffortune.com/pictures/screenshots/nossao.png

Medal! :stuck_out_tongue:

Mike

Oh sorry, I thought you just normal mapped the whole ‘blocks’ (whatever you call them), not the textures.

Have you experimented with making the effect stronger?
On some of the wood pieces I can’t tell if it’s normal-mapped or not.

That was more of a blur than a bloom shader. It made everything look… blurry :slight_smile: I considered adding such a filter for items far away, but never really got to it.

I had a look at that today actually and while it can be a nice effect one some kind of blocks it seemed like a lot of work as I’m not that good with the picture editing programs :slight_smile:

I indeed didn’t add that. Again mainly as I wouldn’t know how to, but if I get some freeze and want to dive into something really difficult it is one of the effects that I’d like to add :slight_smile:

I tried but as the normal maps aren’t of that high quality it made it look quite bad. I’ll revisit making the effect stronger once I have better textures.

Now you guys made me dive into SSOA again, I’ll never add any new content like this :slight_smile:

Mike

If you get it working, it will be worth it. :point:

Before AO:

http://dl.dropbox.com/u/99583484/3D/Voxel%201.png

After AO:

https://dl.dropboxusercontent.com/u/99583484/3D/Architect/Screenshots/Sun%20Aug%2004%2013-40-46%20NZST%202013.png

(EDIT: Ignore the different fog shaders)

(EDIT 2: Also note that it is fake AO, not SSAO. This kind of fake AO really only works on voxels)