Feb
27
2008
0

AGT: Legend of Bob

agt_2After getting my Totus Village model to a point where it can be used in a game, I’ve decided to use it in my AGT project “Legend of Bob”. It is still a work in progress, at the moment I only have a fish and a player model.

Over time I’ll be upgrading the models and effects to be better designed as more of the engine becomes active. At the moment I’m using a large texture (4096×4096 pixels) for the ground texture.

agt_3

This ground texture is used to composite other smaller textures using a method known as “texture splatting“, which gives soft transitions between different textures depending on the mixture of colours.

I’ve used this method for transitioning between grass, sand, and rock.

agt_4

The water has been upgraded from its original appearance to be more cartoon like, originally it was a semi transparent water texture.

Now the water texture is an opaque Toon shaded graphic that I found in a Ocean based game on the internet. At some point I’ll hopefully get around to making my own.

agt_7The town model is the most impressive part of the first town so far, being 52618 faces, 40000 of which are the tree (almost as bad as that 30000 face fish I had at one point).

But it is slowly being optimized, removing and merging polygons, and then afterwards, it will be split up and loaded as separate models, before being compiled into static geometry.

I’ve modified my shaders to give rings of brightness depending on the closeness to the player, this gives a more toon like effect, however I think the dark values are too strong at the moment, and need to be more subtle.

Written by Kaluriel in: Legend of Bob | Tags: , ,
Feb
26
2008
0

Texture Splatting Added

Added texture splatting to Tales of Phantasia for the ground. For those of you who don’t know what texture splatting is, its when you use a texture with ARGB values on it which represent different textures. Their value out of 255 represents the percentage of the texture that should be mixed. So if you had 128 of green and 128 of blue, and green represented grass and blue represented sand, you would have 50% sand and 50% grass texture.

Using this technique, you can get gradient transitions between different textures, or have a bit of grass within your stone path, rather than using seperate textures or splitting up the model.

Written by Kaluriel in: Code | Tags: ,
Feb
26
2008
0

Texture Splat Shader

Texture Splat BaseA shader for using an RGBA Map to texture map a primitive with four textures.

The first texture is the base texture splat map. The image on this blog entry is a texture splat map that I’ve used, anywhere there is a green component is grass, anywhere there is blue is sand/dirt, and anywhere there is red is rock/road. The colour component acts as a blend value.

The other three textures represent the area I just mentioned, there is room for texture to be applied to the same texture splat if the alpha channel is used, but I prefer to save that for use as a height map in the vertex stage.

// --- [ structs ] --------------------------------------------
//
struct VS_OUTPUT
{
float4 position : POSITION;
float2 uv : TEXCOORD0;
};

struct VS_INPUT
{
float4 position : POSITION;
float2 uv : TEXCOORD0;
};

// --- [ vertex program ] -------------------------------------
//
VS_OUTPUT main_vp( VS_INPUT In, uniform float4x4 worldViewProj )
{
VS_OUTPUT Out;

Out.position = mul(worldViewProj, In.position );
Out.uv = In.uv;

return Out;
}

// --- [ fragment program ] -----------------------------------
//
float4 main_fp( float2 uv : TEXCOORD0, uniform sampler2D texBase, uniform sampler2D tex0, uniform sampler2D tex1, uniform sampler2D tex2 ) : COLOR
{
float3 colour = tex2D(texBase, uv).rgb;
return tex2D(tex0, uv) * colour.r + tex2D(tex1, uv) * colour.g + tex2D(tex2, uv) * colour.b;
}
Written by Kaluriel in: Code, Shaders | Tags:
Feb
14
2008
0

Guest Lecture: Lisa Corbett from Aadvark Swift

The first guest lecture of many at university today. As part of my Business of Computer Games class in the final year, the module lecturers pull in different people from the industry to talk to us about their area of field.

One of the people they chose was Lisa Corbett from Aadvark Swift, the aforementioned company being a specialist game developer recruitment agency.

The company was started back in 1989, with the intention of helping graduates or games veterans to find new jobs in the games industry. So it goes quite far back to near the beginning of console gaming.

When the lecture started we were informed that most of the information we were about to be told was programmer related, and that the game designers would need to contact someone else at the company if they required more information about their field.

The main reason for the company is so that game companys do not have to go through every 14 year olds CV that says they want a job as a game programmer, which funny enough I remember doing myself.

They take their qualities and strengths and find a companies suitable for you, as well as negociate a salary for you (most graduate salaries start between $18k to $20k per year, though I have heard that is going up by about $10k). Technical Directors get $1000 a week, which is nearly $60k a year.

As well as helping negociate your salary, they give advice for refining your CV for a certain position you may be after. Though most of the section on writing your CV was just a repeat of things I’ve heard before, though I didn’t think mentioning you play games in your hobbies and interests section would have been as important as they said it to be *fixes CV*.

The final part of the lecture was about interviews, one thing which was good to hear is no suit is required, casual clothes are better. Also as I would have guessed, play some of the companies game, and come up with critism for them, don’t mock them, but say things like ‘it was great, but it would have been better if…’

So obviously after hearing all this, we all thought, what is the catch? No catch apparently, the companies pay Aadvark Swift, we don’t pay them, which is great news.

At the end of the lecture, we were told that if we wanted anyone specific for a lecture we should notify the module leaders. To which I sent an email to them asking from someone from PopCap games, unfortunately they apparently never get back. Kinda cheap really, not like its much effort to answer an email.

Written by Kaluriel in: University | Tags: ,
Feb
13
2008
0

Basic Water Shader

A very simple vertex shader for creating basic wave motion. I designed this shader for use with the Tales of Phantasia Remake for the river in Totus Village. And despite its simplicity it turned out quite well.

// --- [ structs ] --------------------------------------------
//
struct VS_OUTPUT
{
float4 position : POSITION;
float2 uv : TEXCOORD0;
};

struct VS_INPUT
{
float4 position : POSITION;
float2 uv : TEXCOORD0;
};

// --- [ vertex program ] -------------------------------------
//
VS_OUTPUT main_vp( VS_INPUT In, uniform float4x4 worldViewProj, uniform float time )
{
VS_OUTPUT Out;

Out.position = In.position;
Out.position.y = In.position.y + 0.10 * ( sin( ( In.position.z + ( time * 30 ) ) + ( In.position.x + ( time * 30 ) ) ) ) - 0.10;
Out.position = mul(worldViewProj, Out.position);
Out.uv.x = ( In.uv.x - time * 5 ) * 0.5;
Out.uv.y = ( In.uv.y + time * 10 ) * 0.5;

return Out;
}

// --- [ fragment program ] -----------------------------------
//
float4 main_fp( float2 uv : TEXCOORD0, uniform sampler2D tex0 ) : COLOR
{
return tex2D(tex0, uv);
}
Written by Kaluriel in: Code, Shaders | Tags:
Feb
02
2008
0

Turning Enums into Strings

A long time ago, converting enumerations into strings took a very long time depending on how many you had. Imagine having a messaging system you want to be able to use from a scripting language, one change of a name or value and your sending a fire at target command to the file manager.

I came by this wonderful code on CodeProject for converting it at runtime, generating the table for you, you just need the enumeration.

Written by Kaluriel in: Code | Tags:

Theme: TheBuckmaker.com Blog Themes | The best Webhosting Plans, Eigenes Internet Radio