Monthly Archives: August 2013

So my final Australian play through for democracy 3 had me feeling that a feature I had mused on, but quietly and subconsciously thought ‘that would be a nightmare to do’ was actually something it would be almost cruel not to put in, after I had the idea. You can just about spot the feature below:

icons

That row under the chart with the icons is the new feature. Now you may be thinking you’ve seen these before, and you kind-of have, on the polls screen, where everything that happened gets added to this ‘timeline’ under the polling graphs, but this is different for two reasons. Firstly, it’s for a simulation value or situation and ONLY shows up if your monitor resolution is big enough to squeeze it in. Secondly it is actually ‘filtered’ to only show events that directly impacted the item you are looking at.

So in the example shown, there were loads of icons left out because frankly they had no impact on GDP, and here you are looking at the GDP screen, so it makes sense to think that you want a more specific and limited view of what could have caused those graph changes. Now the problem is, as hardcore Democracy players will know, the simulation is not that simple. There are a multitude of indirect effects. For example, tourism affects GDP, and tourism is affected by crime rates and air taxes. So if you change air taxes, that will change tourism which will change GDP, but this is indirect and so you will not see any icons for that here. If you did, the whole filtering idea would break down, because indirectly, everything affects everything. I did worry a bit about this, but decided that actually it would still be helpful. A lot of the major impacts, that would show up on a graph ARE actually direct, and if you want to be reminded that you doubled corporation tax the day that GDP chart nosedived, now you will be.

That’s the last code for the beta though. Now it is in the hands of the mac and linux porting gods, in preparation for beta release.

Those who are excited about Democracy 3 could read this recent rock paper shotgun coverage or maybe this interview from rezzed.

 

 

EDIT: I’ve fixed it. It’s my own dumbassness. I was setting the sprite_angle variable in the shader AFTER the shader had started, and it was presumably never being set, and populated with garbage (or the ship beforehand) it works a charm now :D

Right so, despite being good at AI coding and optimisation, i suck at this clever stuff you people call ‘3D math’. I was in the pub that day of school. So I enlist you, the all-knowing internet to explain to me like a child what I am doing wrong. Here are 3 images:

normalmapstuff

The left is just the ship, the middle is a normal map thingy (thanks to charles!) and the right is what it looks like on screen given a single light source. The end result is exactly what I wanted, and there is much rejoicing… BUT. It’s screwed up, the position of the light source is wrong, and seemingly random, and sometimes jumps and cycles all over the place. I reckon I have everything sorted except the shader, which is an fx file as follows:

sampler2D g_samSrcColor : register( s0);
sampler2D g_samNormalMapColor: register( s1);
float sprite_angle : register(C0); 

float4 NormalMap( float2 texCoord : TEXCOORD0 ) : COLOR0
{  
    //get the value of the normal at this texturecoord
     float3 normalcolor = tex2D(g_samNormalMapColor, texCoord);

     //convert it to +/- 1.0 range
     normalcolor *= 2.0f;
     normalcolor -= 1.0f;

     float3 LightDirection;
     LightDirection.x = sin(sprite_angle);
     LightDirection.y = cos(sprite_angle);
     LightDirection.z = 0;

     float dot_prod = dot(LightDirection, normalcolor);

     //apply as a tint to the final pixel
       float4 original = tex2D(g_samSrcColor, texCoord); 
       float4 final = original;
       final.r *= dot_prod;
       final.b *= dot_prod;
       final.g *= dot_prod;

       return final;
}

As an idiot, I’m not really sure what I am doing here. What I *think* I’m doing is this: I am drawing a sprite which has a separate normal map (g_samNormalMapColor) I also pass in the current angle of the sprite. I sample the color of the normal map, and convert it into the required range. I then convert the sprites angle into a light direction vector (probably wrongly) and I then do some magic which kids call ‘dot’ which I’m guessing gives me the brightness of the pixel given the angle and the default light direction. I then multiply the original texture color by this brightness to tint my final rendered sprite. Yay.

it’s something clever to do with angles and vectors and stuff isn’t it? explain it to me like I’m an idiot :D

 

And yeah…I’m playing about with Gratuitous Space Battles. It’s a Sunday morning, don’t read too much into it :D

Crunch Crunch

August 09, 2013 | Filed under: business | democracy3 | redshirt

I have a day-off booekd for the 24th August. I’ll probably do some programming anyway, but according to my schedule, there is nothing specific booked on that day. Every other day in between has a pile of stuff to do. Why so busy?

Well REDSHIRT will be shipping very soon, insofar as we will start taking pre-orders and make the beta available to people who order it. When I say beta, I really mean beta, not some experimental kickstarter-early-access style tech demo, I mean beta. The game is perfectly playable. Bugs to find, balance to tweak, typos to fix, but everything feature and design wise is looking pretty cool.

rs

Shortly after redshirt going into beta, DEMOCRACY 3 will go into beta as well. This is in the same state, ie: finished, apart from any last minute bugs or balance tweaks. Officially, I’ve balanced the UK, France and half of Germany.  USA,Canada and Australia will be done over the next few days, then I’ve set aside some time to bug hunt in redshirt. Democracy 3 will be on sale from my suite hopefully by the end of the month, with pre-order customers getting to play it straight away, and a steam and final release about a month later.

d3

After both games officially ship, there will be a bit of admin involved in terms of Linux & Mac builds of both games, and an ipad port for Redshirt. Then….who knows what comes next! I have grand plans for Gratuitous Space Battles 2, and also vague other plans, and may actually consider whether it makes sense to carry on like this as the sole designer/coder.

Anyway between now and then is a lot of crunch crunch crunch. Also, in unrelated news, I recommend this book on advertising and neuroscience. half way through it so far, kinda cool.

 

 

Gratuitous Business Expenses

August 04, 2013 | Filed under: business

I did some analyzing of the last 10 months of positechs expenses and I get this graph:

chart

‘Training’ might seem weird, but it’s because positech is not just me. There is another person doing some writing and proofreading, and yeah, I’m actually investing in training for that person, which is a very long term investmenty thing.

Infrastructure is stuff like web hosting, accountancy and other ongoing expense stuff. Shows is a new one for me, and basically that’s attending GDC in the US as a visitor (including flights and hotels) and exhibiting 2 games at rezzed (including hotel).

PR includes fees to PR people, plus similar expenses on game trailers and website design and coding, including this blog.

Actual expenses are about 22% of revenue. Note that salaries and dividends as the owner of the company aren’t included in all this. Game production costs are basically contractor payments.Obviously if I included a calculation for my own time, the game production cost would be dramatically higher.

Current projections put this years profits lower than last years, although that may turn around once Redshirt and Democracy 3 go into beta.

Yeah, I’m a chartaholic.

The trouble with designing games like mine, is you often find that the game ends up focusing on just one stat. This is a problem, in my view, because it makes the game a bit too single-minded, and decisions a little too easy, or frustrating.  let me explain what i mean…

In a game like Prison Architect, theoretically it’s a very interesting and fun balancing act. You need to balance your budget the ratio of staff to prisoners, the happiness of the prisoners, the safety level of the prison, the  cleanliness, the number of prisoners you can feed that day, etc etc. It is a great game with a lot of appeal, and theoretically you are spinning all of those plates at once, trading X against Y and Y against Z. This is what makes for exciting, fun and unpredictable gameplay.

prison

HOWEVER. Like all games of this sort, including my own such as Democracy and Kudos, and no doubt Democracy 3 and Redshirt, they often (at least during development and beta) bump into a problem where for long periods, gameplay becomes all about just one pesky stat. In Democracy 3 it is often GDP or the deficit. In Redshirt, it is often happiness. In Prison Architect, for me at least it is always budget.

This is a problem that it’s worth keeping an eye on. Some games deliberately ‘cheat’ it. If your budget has been a ‘limiting factor’ for X turns, why not alleviate it a bit with a grant from the government? If happiness is ‘stuck’, then why not have the player invited to a happiness-inducing random event? The very interesting question is…. Is that good game design?

Personally, I think it is, at least in a single player game (obviously). In the real world, we can become ‘stuck’ and frustrated with one part of our lives, one single problem, but when we are game designers with total control of the universe there is no rule saying we must make the player suffer in this way. racing games often cheat with ‘catch-up’ physics. Is it ok for simulation and single-player strategy games to do so too? I would say yes, but I’m interested to know what people think. When you are stuck with 4,000 fuel and 9,000 munitions and zero manpower in Company Of heroes 2, and this is your tenth go at that mission, would you be offended if the manpower stat artificially sped up a bit?