Much better

This particular module had 2015 lines of code. I added nigh on 100 lines of comment. But after wrestling with the code for 2 days, its down to 1374 lines of code. Once I’d worked out what the code was trying to do overall, it was pretty obvious that most of what it was trying to do was redundant.

Because it was such a complex piece of code (for what it is) when I started, I figured that I’d get it finished tonight and spend tomorrow debugging it. But all it really does is manage the overall list of vehicles known to the game (British Rifle, British SMG … German Z34) and provides a couple of indexes to them, and a whole bunch of code for manipulating and verifying these lists.

typedef std::map<WEAPON_SPEC, WEAPON*> WEAPON_LIST;

BANG: 90 lines of code replaced.

Anyway – without all the frippery, its an incredibly simple subsystem, and I was kinda hard pressed to mess something up. It broke once because of an error thats been sitting in our datafiles for god knows how long that the old system didn’t pick up. Then it broke again when I forgot to update the same datafile on my client.

With everything seemingly up and running – I wasted a whole hour on discovering that my sound card drivers had crashed, or something. So, since the weapon stuff was working … I had time to nip into the client and add some alert dialogs for when the client can’t start up by some mundane problem.

If there was a really good reason why we didn’t do that, I’m sure Martini will explain it to me on Monday ;) I’m guessing Bloo will appreciate it ;)

dderr.png

20 Comments

Will be good to translate those alert dialogs in the client… for some new users those mundane problems need feedback :)

Great job!, and great idea. Thanks for implementing it.

This is one of the biggest problems I have when I am writing. I will spend hours in a routine getting it to work just as it is supposed to and then another engineer will come over and make me feel like an idiot by reducing my code in half. Efficiency was never my strong point ;)

I think Bloo will by buying you a beer or 12 for those error alerts!

Here’s an old fix for a similar issue that happened for a short amount of time around August, 2005:
http://www.gnasche.com/ww2ol/support/unspecified_audio.htm

Don’t have a wwiiol.cfg file anymore, gnasche :) And that didn’t make the problem go away – the sound card is actually locked. Its the second time it’s happened, the first time I only worked out what the problem was when another game told me it couldn’t open my sound card ;)

I’m all for good alerts. ‘Course, the only sound card configuration setting we have is “which sound card do you want to use?”. And people with this problem aren’t going to look at their actual sound card config settings, or if they do, they won’t understand.

Now, if only to get the error logs generated by the SSE2 version to have actually meaningful content – apparently, they’re completely useless to Martini.

I’m pretty sure it still uses the wwiiol.cfg…it’s just very basic. I have clean 1.26 installs that have a wwiiol.cfg file created. Hmm, I’ll have to experiment when I’m at home.

That just means Dana neglected to remove the file from the patch builder.

No Gnashe is right. I’m’ also relativly sure there is still a .cfg file. As well, there is still a settings.exe. One of the things in that .cfg file is the setting to use sse2 or not (which cannot be done in the game since there are 2 clients based on this setting).

The only thing that reads the .cfg file is settings.exe, which uses it to generate data\wwiiol.xml and only if the data\wwiiol.xml file doesn’t exist.
There is no reference to wwiiol.cfg in the client source code.

That’s good to know. It certainly helps when troubleshooting those “wtf” crashes on startup.

Speaking of settings….I just did moved from XP Pro to Vista, need to ensure my SSE2 is working. How could I tell?

The last line of ww2launch.log should say which one it’s running.

Mine:

v_name: AuthenticAMD
model: Unknown
family: 15
model: 15
stepping: 2
feature: 0000000f
yes _CPU_FEATURE_MMX
yes _CPU_FEATURE_SSE
yes _CPU_FEATURE_SSE2
yes _CPU_FEATURE_3DNOW
os_support: 0000000f
yes _CPU_FEATURE_MMX
yes _CPU_FEATURE_SSE
yes _CPU_FEATURE_SSE2
yes _CPU_FEATURE_3DNOW
checks: 0000000f
-serverip 66.28.224.143 -serverport 27017 -serverotp 1443081322 -side 2
Launched ww2_sse2

Dang it….I said SSE2. I meant netcode2.

Thanks boss!

After I get my new soundcard on Thursday, I’ll re-get EQ2 and get back in there :)

But I am having an absolute blast in WW2ol!

Kfsone alreday stated it but yea the cfg is no more. If you still got it after a reinstall then it’s a leftover.

Shoo is 67 :) Guild did another Labs raid which I was going to go on, but thanks to a friend ended up only going to the last couple of mobs. Still, it was fun.

Yeah, I’ve been enjoying my time in WWII again of late, but I’m exercising some self-control because I fritz easily.

I think I’ve given up on LotRo. Four word review: I’m playing EQ2 again.

Dift subject all together but when I 1st “discovered” computer gaming as in pc games I wondered about someone creating simulators. Not flight sims nor general public sims but training stuff. As I was a coalminer I thought about a mining simulator.
Wish I’d have had the greymatter to follow up http://www.mining.5dt.net/products/pvrcoal.html

Best as I can figgure one engine that covers bunches of dift heavy equpitment types, basicly a simple driving game if you will @ around 100k per copy. The continous miner one is the only one priced and being a miner is dirt slow and realy in this instance just gonna be covering no more than 100 yards most likely in the sim is probably the cheapest offered.

It is VR headset and special controler(both included) but still not that much of a bite outta 95k I would’nt think.

I doubt any of the trainees complain about gfx or fps either ;)

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

You are commenting using your Google+ 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: