Categories
Uncategorized

Upgraded Ogre + oFusion problems again…

I upgraded Ogre today to 1.4.1. It looks like a much better release than I was using. I especially like that they assert now rather than throw exceptions. Things already feel more snappy.

Once I did that oFusion caused problems again. It turns out there was a bug in their mesh exporter, the only thing left I use it for, such that bounding boxes are calculated incorrectly. Judging by the forum this has been a known bug for a while yet the author didn’t fix it. So I wasted an hour figuring out how to run the mesh upgrader recursively, and I had to mod it to get rid of the exceptions so if a mesh didn’t have a material it wouldn’t crash generating tangent vectors. Now artists can’t export models anymore, although I’m not sure if they were to begin with.

The silver lining is that oFusion has another bug where it wasn’t generating tangent vectors anyway, so in hindsight it wasn’t really wasted work as I eventually should have done this regardless. Pre-generated tangent vectors let the game load faster.

Definitely, the first thing I’m going to do post-ship is to hire a programmer to write a usable exporter for the artists.

Categories
Uncategorized

Fake lit planets

I figured out a way to do unlimited light support for animated spinning planets in my game virtually for free.

Animation: Planets are spheres, so just scroll the U of the UV channel for the diffuse map.

Lights: Precompute an emissive map (including light colors), put it on a different UV channel.

Only potential problem is normal mapping won’t work unless I were to put the light angle in the emissive map, but planets are so far away it doesn’t matter.

Here’s a video
Emissive Scroll

There are NO lights and NO animation in that scene. I did that emissive map by hand but by rendering to texture it would look a lot better.

Diffuse map

Emissive map

Categories
Uncategorized

Dropping oFusion

I spent 2 days getting things looking sort-of-right in oFusion. But still about 10% of the time it would be wrong. I spent about 30 minutes figuring out why an object wasn’t lit when I lit it. Another 30 minutes on why my texture wouldn’t take. A few other things. In each case it was fixed by restarting my computer – in other words bugs with oFusion.

For all the time I spent trying to get oFusion working, I could have just done all the materials by hand. So I’m dropping oFusion.

My current approach is to tell the artists to make things look how they want, then I will go through, use oFusion only for exporting (the free exporter doesn’t work), and then do the materials by hand. I can manually do the small tweaks needed to get things looking the same between the game and the editor.

For all the time I spent on this I could have written my own exporter 🙁

Categories
Game Development

Exporter problems

The last half-week I’ve been working with artists to try to get their levels working right.

Right now this is turning into a big risk for the project. I paid $1200 for an add-on called oFusion so the artists could theoretically see how things look in the game within the modeling program. But support is too slow and the bugs are killing me.

I had a real dilemma yesterday with how to export materials.

I could:

1. Create materials by hand in text files, which is good because they are source controlled and I can easily change common properties. But then, due to bugs, the artists could not see what they are doing in the game. And also as sort of a hack I would have to name materials in the modeler exactly the same as in the text file. This means I have to do everything myself because that takes too much rigor for the artists to handle.

2. Specify in oFusion which material file I am using. This was a feature I requested, but was buggy to the point of being unusable, and caused problems in step 3.

3. Create everything using oFusion’s preferred system, which is basically to program the material in a GUI through MAX. This means every material takes about 5 minutes for me or 30 minutes for an artist to setup because you really are programming the material. Materials cannot be source controlled and changing any common property means every material in the game needs to be recreated. Worse, because step 2 could not be turned off once activated, I had to delete and recreate the object entirely.

I ultimately went with step 3, because this was the only thing that worked at all.

I’ve been waiting for support to get back to me on various bugs for half a week now and so far no response. This is such a critical time I can’t just drop oFusion or I would and ask for a refund and hire someone to program a decent exporter. Maybe the author is ignoring me. I’m trying really hard to keep a neutral tone in my bug reports but maybe some of my frustration is showing through.

End loss: $1200, plus about 200 hours of my own time, 100 hours of artists time.

Categories
Uncategorized

Using halfLambert

Seems I misunderstood. Thanks to Enrico for this suggestion:

HalfLambert

Categories
Uncategorized

N dot L vs. (N dot L) * .5 + .5

Per Enrico’s suggestion:

N.L vs N.L *.5 + .5

It seems to just add an emissive light of .5 for each light?

Categories
Uncategorized

Shader with light support

Finished rewriting the normal map shader. Supports ambient, diffuse, specular, and emmisive.

3 lights

It’s pretty optimized.

I feel good about learning but also upset that this should have been done 8 months ago by the original graphics programmer I hired. As I look around at samples, I realize he didn’t really write anything at all, but copied from those samples and made some minor changes. The result didn’t support the features I asked for and was slow.

Last week I sent the shader to another company to optimize it. What I got for my $400 was something twice as fast but was buggy.

So I went over it myself today, fixed all the bugs, and made it twice as fast again.

Funny how I, with 2 months of training and no experience doing this, can beat a supposed lead programmer and an outsourcing game company in one day. Or maybe this isn’t a reflection of how good I am but how bad I am at picking competent people to work for me.

Categories
Game Development

Working hard, getting nothing done

I tend to consider days where I don’t implement major new features wasted days. By that standard I’m working very hard and getting nothing done.

My time right now is split:

15% answer emails (mostly artists)
10% updating the artist Wiki
15% general artist support
30% training & bug-fixing for a new programmer
5% fixing old bugs caused by myself
5% refactoring
5% communication in general (bug reporting, etc).
5% miscellaneous crap (blog, worrying. stress)
10% adding minor features

It’s probably been like this for the last week.

I have a few good things going for me:

1. All the major architectural features are in. It’s just a matter of polishing them and getting them working.
2. My programmer from Portugal is really good. I can assign him stuff and just know that it will get done right.
3. While I don’t like it, I’ve been paying a lot for the best tools. These tools are starting to pay off.
4. I have as many people as I need now working on stuff. So I don’t have to spend time interviewing.

Fortunately, I only have a few major features left. Unfortunately, one of these is splitting the client and server and getting everything actually working over the net. Ouch.

Categories
Uncategorized

Code replay

For several years I’ve been looking for a tool that will allow backwards execution or at the least replay of random bugs. My graphics programmer send me a link to Replay Solutions which offers Replay Director which I believe can do this. He told me he contacted them several times asking for a price and never got a response. Regardless, I sent a no-frills email asking about the price as well. If they don’t get back to me I’ll try to do some research and see what I can find out on my own.

*** EDIT ***

They got back to me. It’s $25,000 per seat. It doesn’t do backwards debugging, but it does do recording, so that you can play through the scene again and repro the bug. For that to be useful you’d have to have some kind of global tick counter so you could stop one tick before the crash.

Too expensive for me now but it would come in handy after I ship.

Categories
Game Development

Correctness > Speed > Cost

As the game nears completion I’ve been working with a lot more people lately. If you asked me to sort these people in terms of how useful they are the sort would go first by correctness, then by speed, then by cost. Correctness is something I haven’t considered much until now because I took for granted that people generally got the job done right. While this is true on a very high level, on a low level certain people tend to cause a lot of problems for simple tasks while others can do reasonably complex tasks right the first time.

Some examples over the last week:

Bad: Today I spent the entire day doing level design. This was because the artist who was doing it did it wrong twice in a row, and it was so wrong it was less trouble to do everything myself than to try to explain why.

Average: Three times in as many days I had to have some outsourcing programmers make changes to the GUI for the autopatcher. This cost me a total of about an hour explaining the same thing over and over again (Document, match my coding conventions, no Hungarian notation). It would have cost me a lot of money too, but this was a fixed price contract to another company so it cost them instead.

Good: The sound artists noticed I was using FMOD so asked to use FMOD designer so they could do a better job of starting and stopping sounds on events, rather than just hard stopping as I was originally planning to do. Their solution was more correct than mine, so I ended up with a better game.

When you account for this and for speed, the cheaper guys aren’t any cheaper. You really do get what you pay for.