Closed Amidweiz closed 4 years ago
There are 2 approaches that I think we can follow to create a score system:
Leave it all to an external CNS file (for example add004 style common1 that already has scoring) and just get the data stored in a character variable at the end of match (there is already a function that can be used for this purpose - getCharVar).
Follow Amidweiz's suggestion and do the scoring calculations in-engine, using values customizable via DEF.
Not sure what would be better. Either way, I think add004 values could be used in either of these approaches - that system proved to work great in mugen environment, regardless of what characters are used, so instead of coming up with new values and formulas (or reverse-engineering some commercial games), we could just use add004 calculations (if author is not against it)
If someone finds how scoring systems works in some commercial games please post links. Here are my findings so far:
I've finished implementing in-engine support for scores that is flexible enough to allow creating both CVS2 style GP System (float values, same move affecting both attacker's and opponent's score) as well as traditional SF style scores. Values can be assigned directly in HitDef sctrl, scores are remembered between matches, lifebar def file has now [Score] section, where we can adjust how it will be rendered in-game.
But that's stuff mostly for fullgame makers. When the score assignment is missing in HitDef the engine should still provide score calculation similar to above posted commercial implementations. The static values proposed by @Amidweiz is not really a good enough solution, imo. Every single hyper move worth exactly the same score? Light kick worth the same as Hard kick? No relation between combo score and/or hit damage with the score? It definitely ain't enough considering default values will be used by majority of the engine users. Leaderboards results out of static implementation like this would not resemble scores from fighting games at all, regardless of what values we assign in DEF file. It needs additional factors, damage multipliers, variations, time being taken into account etc.
As mentioned above, in order to create default score values system I'd prefer to base calculations on add004 implementation. Either by coding it in engine and externalizing formulas into DEF file parameters or by leaving the default values calculation to common1.zss distributed with engine (in such case the default score value will be assign via new ScoreAdd/TargetScoreAdd sctrls).
Alternatively similar formulas could be designed from scratch, if someone comes up with a new system.
My CNS knowledge is not good enough to figure out how Shiyo Kakuge calculates values in add004, so a help from experienced CNS coder is needed to extract these calculations from common1.cns distributed with add004. Also if anyone knows e-mail address to Shiyo, please let me know.
Scores and leaderboards code is currently on hiatus, since I can't push these changes to github without default customizable scoring working alongside it.
The only way to make a scoring system is using common1.cns there is no other way to get it this is a way it was implemented in old winmugen https://mugenguild.com/forum/PHPSESSID.b8gp27p4fhosd3bdhvrh1cht14/topics/score-system-147166.0.html
A possible implementation for this would be to have it contained within the mugen.cfg file under it's own section. It should be able to be utilized by the screenpack and the character itself (possibly with a sysvar of it's own)