Categories
Game Development

Effective Design

One of the things I like about being the lead programmer on a game is my exposure to architecture. This is something most programmers don’t get to experience very often and I enjoy it.

Architecture is difficult because it’s high level planning. Like all high level planning you deal with unknowns or partially knowns. The human brain is designed to skip over the flood of small details we encounter constantly through our senses so it’s definitely a learned skill.

Some people propose doing very detailed architecture. I disagree with this because, at least for me, it’s impossible to come up with detail that solves all useful cases. While a high level architecture is beneficial, once you start thinking at a function level there’s just too many mistakes, wrong assumptions, and forgotten cases to be usable as a spec. We’ve all seen cases of architecture that causes bloat but doesn’t solve any real problems. This is a fundamental problem caused by a detailed architecture with wrong information.

The approach I try to use is to first think of any obvious cases where architecture is necessary or beneficial. For example, I know that the client and server will both need shared code. So I split the project up into client only, server only, and shared. However, in other cases it’s harder to tell. When I pass a data stack between states how much architecture should I put into it? Is it worthwhile to put the stack structure in the state itself to avoid copying the data on state start? Should I handle memory allocations automatically or should I handle it per-instance?

I don’t know. So once I solve the high level problems I can accurately think about, I just write the code using the simplest case possible. Every so often I try to take a break and think back about what I did. If, armed with new knowledge, I think of a better way to approach the problem I refactor. This is also what extreme programming proponents advocate.

Refactoring throughout the day takes discipline and can be annoying because it involves rewriting a lot of already working code. However, if I don’t do it the program will quickly become unmaintainable.

As I gain more experience I think I get better about seeing the cases where I should think about planning ahead, rather than at the planning itself.

Categories
Game Development

Outsourcing part 2

My outsourcing experiment isn’t working out as well as I hoped. I anticipated communication problems but hoped they would be speed bumps on the road of progress as opposed to the 10 foot deep potholes they are turning out to be.

The causes are fourfold:
1. English is not their native language.
2. Most artists aren’t good at writing or logical thinking, which is necessary for email exchanges.
3. They work when I’m asleep AND
4. They don’t have reliable always-on internet access.

These map to the following problems:
1. I can’t make complex ideas understood and even simple ideas don’t get across very well.
2. They have a hard time meeting technical requirements even when they do know them.
3&4. Every email exchange takes 1 day. This means that your normal office-type 5 email exchanges now take 5 days instead of 30 minutes.

This is why, now like a month later, I still don’t have a single correct model and I’m still repeating the same requirements that I told them at the start of the project.

On top of that they are slow. I understand they are students but it shouldn’t take three people three days to remove some polygons from a model and add a few texture details. This is a constant problem I’m facing.

I think outsourcing could work with the proper setup. For example, if I had a technical person there who was fluent in Chinese that would overcome the communication problems. My wife calling them in Chinese helps immensely and is the only reason I’ve gotten anything at all. But she is not technical and I can’t rely on her to call them that often.

Their work is pretty good. It’s just not good enough for what I’m doing. I sincerely hope I can make this work but given the choice between releasing the best possible game and spending more money I’ll spend the money.

Categories
Game Development

Multiple meshes and network coding

I’ve been more motivated this weekend due in large part to taking a break over last week. So on Saturday I got the ability to show multiple materials on a single mesh. You simply apply more materials and 3DS and the game will automatically detect this and assign names to each group of polygons. It will even load the specular, diffuse, and ambient colors that you set in 3DS max.

Since I store the name of the material with the polygon group I can use this to flag polygons. So I can name a polygon group “SpawnPoint” for example and now in the game I know where to spawn.

With this, I’m pretty sure I can skip the whole phase of writing a ship and a level editor.

That took most of my energy. But today I got the basics of the client / server framework up. With my very first game I had two different applications – a client and a server. The problem with that is that it was almost literally double the code,, with a lot of cutting and pasting. Maintenance was pretty hard and it was hard to test. With my second game I had the server and client on the same computer but they shared memory space. This means for every situation I had to think of what to do for client only, server only, and client and server. A lot of my network code went through the system, so was good for testing, but a lot didn’t get tested this way. With this game the client and server are independent, each with their own launchers. However, they are both in the same solution and code is split between client only, server only, and both. For testing, I use the client and have the server class inside the client framework using a #ifdef. This is nice because it’s a complete test yet is still easy to manage, with no duplicated code. I don’t have to think of local or remote clients. Lastly, I can do everything on one computer, in one instance of the program.

I’m exhausted again. I ordered Black and White 2 and X3. I will probably just play those for a while to recover. In the meantime I’m waiting for my wife to start working to relieve the burden of this.

Categories
Game Development

Lead modeller and art director needed

This is the best the current lead modeller and art director is able to come up with.


My Dog

I need to find someone really talented who is willing to work for free 🙂

Categories
Game Development

Second and third ships

Here they are. These look much better than the other one.

Charlie

Delta

Categories
Game Development

First ship from chinese artists

They did the normal mapping wrong but otherwise the ship is technically correct. I think…

First ship

It’s getting increasingly hard to find time to work on the game. I’ve dropped from about 40 hours to 10-20 hours a week. I’m getting burned out. When Black and White 2 comes out I’m just going to play that to refresh myself.

Categories
Game Development

RakNet update

I updated RakNet to version 2.4. Memory requirements have dropped by 25 times. That’s pretty huge. I also fixed some serious bugs that have been there for a year now. That is the thing about eating your own dog food. It has to be very tasty or you won’t eat it 🙂

It seems like RakNet is growing in popularity too. I’ve gotten some pokes before – like the Reality Engine uses it. But now Day 1 Studios wants to use RakNet for their next-gen games too. This is a huge boost to me from a marketing standpoint. I have to admit their contracting offer is tempting. I much prefer working from home (if that is indeed what they are offering) and I much prefer working with RakNet.

At my current job I’m tired of writing technical design documents, waiting a week for a response that shows it wasn’t read carefully, and then rewriting trivial points to add unnecessary detail. I have nothing against TDDs. However there’s a certain point where you just need to write the code and figure things out as you discover them. When I was planning out my server mesh topology I did a TDD and did solve problems. But did I think of everything in advance? No and that was the optimal situation where I understand all systems and wrote all code. You need to solve problems at the level of information you have.

Categories
Game Development

Outsourcing

I’m starting to see why people have a communication problem when outsourcing. Techinically, two out of three emails to China are getting bounced back and sometimes delivered despite the failure notice. Communicationally, although my requirements for the models are clear and specific I continue to get models that only partially match the requirements I set out.

Telecommuting with most people, but especially artists, always seems risky to me regardless. Only 5% of people I’ve dealt with over the years I consider self-motivated and disciplined enough to do a good job of telecommunting. Language aside, most people are poor communicators. Artists tend to be sloppy thinkers and most are not disciplined.

Despite this they are doing some work and I think the project can eventually get done as long as I put in extra time to manage them and fix what assets I can.

Personally I don’t like outsourcing. It cheapens your own labor market and the expense of living conditions in other countries. It’s a global form of explotation where you enjoy the benefits of a first world country on the backs of those in a third world country and the loss of income to your fellow citizens. I wouldn’t do it normally and certainly won’t for future games. For my first game though there’s no way I could possibly do this paying a regular American wage. It’s either outsource or don’t make the game at all.

The positive aspect to me is that when the game launches and makes money I can then hire Americans to continue work and help the economy more than if I made nothing at all.

Categories
Game Development

WinMerge + Tortoise CVS = pretty good

I’m setup here at home with WinMerge + Tortoise CVS and I have to say it’s pretty good. I do have some problems. Like when I got a clean version of an older revision and made changes I couldn’t get it to upload. It complained about branching. I’m also not sure how to select merge blocks with WinMerge. It seems like right now I can see the changes but have to merge them by hand?

But considering these are free tools they are quite nice. I like Tortoise CVS better than VSS in fact since it runs through Windows Explorer.

Categories
Game Development

New game mode

Kraydl and I have come up with an exciting new game mode I’m for now calling war. You basically have two sides, each with one or more starbases, which can launch carriers which in turn provide bases for and launch player controlled fighters. The objective is to destroy all enemy starbases. Everytime a starbase is destroyed it lowers the enemy population cap so the games have a distinct start and end.

Players buy carrier ships which serve as mobile bases. I think that will be a lot of fun since you will have a sense of ownership over your base. Since only teams buy carriers and multiple teams can share carriers it’s likely you can have entire squads of 50 people play together.

The mode is designed for blocks of 200 players at a time. It can support any number of players since I just spawn more starbases to support them.

My original bandwidth estimates show I can support 4000 players with 100 bytes per second per player where each packet is relayed to 10 guys. This uses about half the outgoing bandwidth cap. Most likely a chaotic zone like this is going to relay every command to 40 guys, so that cuts down the cap to 1000 players. Which is still quite good. No other game that I know of supports meaningful interaction between that many players at once. As starbases are destroyed less players are in the zone so I may be able to increase that number.