Game Development Community

Score System in RTS-SK, and one other question.

by Scot Kennedy · in RTS Starter Kit · 09/07/2005 (11:11 am) · 3 replies

Hi - just starting to poke around with the RTS-SK. Very excited so far, but still trying to figure out what lives in which .cs and what's actually in code. As a specific example - where does the scoring live? I see some UI script for showing scores, but I haven't found where these scores are actually getting modified during play. This seems like such a "moddable" and non-performance-critical feature that I assume it's in script rather than code, but haven't yet found it.

Any thoughts? Sorry if this is a stupid question - I'll keep looking when I get some time.

In a related note - it seems like each unit type ("rifleman.cs", etc) has its own function for doing damage - that seems odd to me, since presumably doing damage should work the same for everyone, subclassing from a base type and modifying details like amount, range, etc. What am I missing? Again, thanks for any insight for a newb.

#1
09/07/2005 (1:49 pm)
What you are looking at is in fact the subclassed (or reimplemented) version of the higher classes' damage function. It's simply reimplemented at the lower level of inheritence so that you can have full control over how it works for each unit--as a demonstration of the flexibility of the starter kit.
#2
09/07/2005 (1:52 pm)
Ah, so I was right in thinking it was actually the same code - it's there to make the point, not because it has to be. Presumably if I removed it, the parent method would be called?

Not to be a hassle, but where does the scoring stuff live though? I don't see any resources about this, either in RTS or FPS land...

Thanks, as I read more and more of this I realize what I tremendous resource you yourself are Stephen.
#3
09/07/2005 (2:46 pm)
To be honest I think the "scoring" stuff was just a neat little thing someone worked on that wound up making it into the kit...it isn't really a supported feature per se, but there is some code in there that with a little work can be used.

I myself have only briefly scanned it, but IIRC, it's basically a sequence of net events that allow each unit to "know about" how many kills and such it's had on the server. I would imagine that you simply need some access methods (and/or console methods) to be able to use the values in script, but it may be that it doesn't actually accomplish much right now...it was just one of those neat little things that show up as part of feature creep in any project, and wasn't trimmed completely back out again when the functionality lost priority prior to release of the kit.

Thanks for the compliment, but then again, it is my job :)