Picking up the pace

I haven’t written any test units yet, but I’m down to 4 files (out of 58) with compile errors in them now.

Its been a useful process. Previously, when you tried to capture a facility, it had to call its own, custom version of the supply-tracing code, which wasn’t exactly 100% in sync with the “find where I get supply” from member of the facilities, or with the two other versions. These different versions existed because of data that was unavailable or just wasn’t evidently available (sometimes it was just buried under 4-8 references, but I think it always was).

The big lump of work left to do is largely to do with vehicle returns – when you cancel a reservation or despawn. I think I’ve drastically simplified it, but I’ll have to go back and ensure the rest of the code knows how to tell it you are doing a resupply run (Division -> Brigade). Its coded to cope with it, but I have to change how that is denoted when you spawn your vehicle.

I also haven’t written the resupply code. I may cheat, as I mentioned before, and just record vehicles out to a database table. Then I can just poll that table once a minute for vehicles that need returning, and when a vehicle *is* returned, I can just update the vehicles out table.

I’ve changed the way depot throttles work – instead of tracking individual vehicles I just count numbers and assign a window to when those vehicles will be returned. This may not work the way we want it: currently, each time someone spawns a rifle, the throttle drops by one until 5 minutes after they spawned. This mechanism doesn’t go up by ones, instead the count keeps going down as people spawn, and only goes back up to full when 5 minutes pass without someone spawning a rifle.

But I can worry about implementing a list after I’ve gotten everything else done.

Feeling pretty good about the code. Spent 6 hours on it today, and the newer functions are much simpler and cleaner. I dumped a bunch of global functions in favor of things like WeaponEntry::incrementThrottle(). Lots of return values went away that were meaningless which let me clean up a lot of code that tried to deal with unexpected return values (like going to the bank every day to check if your balance of $0.00 has gained an interest – bank accounts *do* gain interest, and yours *could* if the bank decided to give you a persistence bonus).

Monday is going to be crashfest, I’m betting; Killer has my dev cluster on his desk for upgrading, so I’m going to have to use the beta server for experimenting.


best o luck on monday man.

As long as you’re reading through all of that old code, I hope you’re denoting sections with a “Fix This Later” comment. I’m sure you’ve happened upon many things that aren’t relevant at the moment, but could be done more efficiently.

I think of kfs1 as a surgeon wielding his scalpel on the sick body of code.

Yeah except his scalpel just so happens to be a shotgun.

sometimes a shotgun is what’s needed

Gnasche: There are 29 “///TODO:TOE” comment markers left out of 170+.
Egbert: Pity the sick.
Cokeman: Amen


*baby clapping hands somewhat ineffectively*

again! again! again!

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

You may use these HTML tags and attributes:

<a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: