Andrew

My blog broke!

Posted on July 08, 2008 2:10 PM

My blog broke during team5150.com's transition to a new server and since I cannot figure out why Movable Type doesn't like the current .db files, I am moving over to floodyberry.wordpress.com. I will leave everything intact here, but will back-post the articles to my WordPress blog as well. I think I like WordPress better anyway even if all of the default themes tend to suck.

(and yes, I added this post by hand)

Tribes 1 Physics, Part Four: Explosions

Posted on April 29, 2008 12:30 PM

Explosions (or more accurately, knockback), the final piece to the physics puzzle! If you implement all of the previous articles, make a disc launcher, plug in the apparently simple knockback force and radius from baseProjData.cs, and finally attempt to disc jump, you will be greeted with... a nice and wimpy boost. Playing around with the knockback force will only break explosions in new ways. Argh, you were so close! How could Tribes possibly screw this one up.. read more

Tribes 1 Physics, Part Three: Collision

Posted on April 11, 2008 7:47 PM

This article covers the collision physics of Tribes 1, i.e. attempting to actually move the player and what to do when the player runs in to something. This is the most convoluted part of the physics and requires a lot of little touches to get right. Tribes movement and collision handling actually gets a little too low level, so I won't be able to show exactly how it works (it gets down to dealing with the raw triangle lists which I don't think all collision detection systems will let you get at), but it will be detailed enough so that there will be no major differences.. read more

Tribes 1 Physics, Part Two: Movement

Posted on February 24, 2008 11:48 PM

This article covers the movement physics of Tribes 1, i.e. jumping, jetting, and ground movement/friction. These account for ~90% of the "Tribes" feeling, although even 90% will still feel wrong to anyone who knows the authentic feel well. There will be some variables which are only set in the Collision code, but there shouldn't be any confusion as to what they do.. read more

Tribes 1 Physics, Part One: Overview

Posted on February 20, 2008 11:04 PM

Games have been trying replicate the feel of Tribes 1 for almost as long as it's been out (Tribes 2 started development in mid-1999) and every single one of them has failed, usually miserably.

  • Tribes 2 physics are an abomination, although in hindsight it should have come as no surprise after the Base+ mod Dynamix play-tested in Tribes 1 to massive disdain. It's as if they were trying to build on the success of Tribes 1 when it was 2 weeks old, not 2 years. Unfortunately for the majority of the community not in the beta, we didn't find this out until after the game was paid for. Further mods such as Base++, Team Rabbit 2, and Classic attempted to rectify the situation yet were still only a pale ghost of Tribes 1.
  • Legends has always felt wrong despite how often they tweaked and twiddled the physics and boasted of having the original physics source code. If they did have the source, they either didn't know how to implement it or didn't have enough of the source to properly replicate all of the required physics.
  • Tribes Vengeance is so far removed from the feel of Tribes that it shouldn't even enter the discussion. Jetting is wrong, air movement shouldn't even exist, collisions are wrong, and skiing is a sick joke. I can only hope KineticPoet remembered what used to be and silently winced every time he sat down to work on the game.
  • The yet-to-be-released Fallen Empire: Legions appears to be following the "We're not a Tribes 1 clone, so let's make wacky changes to ram that home" mantra. Ideas like 6 way jetting (jetting down while in the air and laterally while on the ground), non-friction sliding a-la T:V, jetpack overdrive, a charge up sniper rifle, etc., sound like they could easily alter the game beyond good taste.

What all of these games ostensibly want is to appeal to Tribes 1 players, yet they attempt to accomplish this by using a different and/or completely arbitrary physics system, adding something that resembles a jetpack and skiing and hoping everyone likes it. While I don't know if a carbon copy of Tribes 1 on a modern engine would be a success, I do know that almost any Tribes 1 veteran will be unsatisfied with any Tribes style game that does not replicate the feel of Tribes 1 regardless of how often the developers hide behind the claim of "not Tribes 1".

These articles will solve that problem. I will provide everything needed for a 99% re-creation of the Tribes 1 physics on any 3d engine. There are a few pieces to the puzzle so I'll be breaking the topics in to separate articles for movement, collision, and explosions. This article will go over the basics of the engine and document the structures and constants I'll be using... read more

Writing a (Tribes 1) Master Server

Posted on February 15, 2008 10:59 AM

After the hubbub over Sierra's announcement that they were ceasing multiplayer support for Tribes 1 and the resulting scramble to locate a replacement master server, I decided to give a shot at writing one. The required feature set appeared simple enough to only take a week or so to implement but with enough gotchas to keep it suitably interesting... read more

C++ Templates and Class Inheritance

Posted on May 17, 2007 1:03 AM

The following code is not legal C++:

template < class type >
struct A {
	void f() {}
	type mX;
};

template < class type >
struct B : public A<type> {
	void g() { mY = ( mX ); f(); }
	type mY;
};

The best part is that unless you know the obscure reason why it is not legal, it appears legal and might even compile and run perfectly depending on which compiler you're using. Not surprisingly, that is exactly how I ran in to it. I was doing templated class inheritance and thought I was in the clear because everything ran fine with MSVC7.1 and ICC 9, but when I belatedly tried to compile with g++ 3.4.4, I ran in to the following errors.. read more

TortoiseSVN corrupted overlay icons

Posted on April 19, 2007 10:05 AM

Every now and then the TortoiseSVN overlay icons turn in to random garbage, and worse still, remain that way until I reboot:

bad icons!

Now, I thought I had been to the TortoiseSVN site before to see if there was any information on this and came up empty, so I've just been putting up with it for a while.. read more

UTF-8 Conversion Tricks

Posted on April 14, 2007 3:04 AM

UTF-8 is a wonderfully simple encoding format with some very nice properties, but the juggling required to convert to UTF-16, and UTF-32 can be a little tricky and fairly easy to do poorly. This is further compounded by the various error conditions you must keep an eye out for, such as overlong encodings, reserved ranges, surrogate markers, incomplete sequences, and so on.

These are a couple tricks you can employ to hopefully keep the conversion fast and robust.

Tail Length Lookup


Our first trick is to use a lookup table for the initial byte. This allows you to both a) tell whether the byte is valid (80 to bf and fe to ff are invalid leading bytes, as well as f5 to fd if you don't want to handle 5 and 6 byte sequences) and b) determine the number of trailing bytes in the expected sequence. We will also need the length of the sequence to quickly ensure there are enough bytes in left in the input as well as for other upcoming tricks, so this actually results in multiple wins.. read more