View previous topic :: View next topic |
Author |
Message |
gmriggs
Joined: 17 Jun 2006 Posts: 48
|
Posted: Mon Jun 19, 2006 9:46 pm Post subject: Program to calculate SP paths? |
|
|
A question for JCirri and any other programmer types out there...
Has anyone tried making a program to calculate the optimal Star Power paths yet? I see people manually figuring out the best strategies for the songs, and it all seems a little redundant to me. Surely someone has to have tried this by now... what are the major roadblocks preventing something like this from being done? I could take a shot at it if no one else wants to. |
|
Back to top |
|
|
krimsunmunkeys
Joined: 16 Feb 2006 Posts: 1333 Location: The Hall of the SH Council... watching... (not really)
|
Posted: Mon Jun 19, 2006 10:06 pm Post subject: |
|
|
JCirri is already working on it, but I don't know how far he is or what problems he's encountered. |
|
Back to top |
|
|
Echelar
Joined: 26 Feb 2006 Posts: 1246 Location: Fort Wayne, IN
|
Posted: Mon Jun 19, 2006 11:55 pm Post subject: |
|
|
JCirri and I are close to getting ours to work. We have it parsing the song data almost perfectly (some holds are off by 1 point, we're trying to figure it out)... and have structures set up to represent a SP path.
The biggest roadblocks will be the variable amount of SP you can have by whammying notes, and coding around the fact that you can squeeze or delay notes. |
|
Back to top |
|
|
gmriggs
Joined: 17 Jun 2006 Posts: 48
|
Posted: Tue Jun 20, 2006 12:24 am Post subject: |
|
|
Excellent... I will look forward to the release |
|
Back to top |
|
|
MLafer
Joined: 26 Mar 2006 Posts: 464 Location: Canton, MI
|
Posted: Tue Jun 20, 2006 1:51 am Post subject: |
|
|
We already have an SP optimization program, it's called "Echelar" _________________
|
|
Back to top |
|
|
Echelar
Joined: 26 Feb 2006 Posts: 1246 Location: Fort Wayne, IN
|
Posted: Tue Jun 20, 2006 2:34 am Post subject: |
|
|
MLafer wrote: | We already have an SP optimization program, it's called "Echelar" |
hah! Well, one of my goals is to get all 49 firsts on medium.
I just need a firmware upgrade to figure out how to get a few of them, that's all. |
|
Back to top |
|
|
Riff
Joined: 08 May 2006 Posts: 104 Location: Champaign, IL
|
Posted: Tue Jun 20, 2006 2:45 am Post subject: |
|
|
What is your formula for calcuating hold points? It should be "uint32 sustainPointsAwarded = (((25.0 * duration)/480) + 0.5);" so that the calculation is done in floating point and then rounded to the nearest integer. It should be applied separately for each note in a chord so that the rounding is done twice (or at least the cutoff calculations are correct only if you do it this way).
The formula for computing sustain points that controbute to the base score for cutoff calculations is similar but the result is rounded towards zero so you dont add 0.5 which means you can just use integer math: (25*duration)/480. _________________
|
|
Back to top |
|
|
Echelar
Joined: 26 Feb 2006 Posts: 1246 Location: Fort Wayne, IN
|
Posted: Tue Jun 20, 2006 3:24 am Post subject: |
|
|
I think the problem is that we didn't consider each note separately, so there's some chord sustains that give 74 points, and some that give 76 points, and we didn't know how to decide between them.
When we finally get back to working on it, I'm sure we'll fix it up. |
|
Back to top |
|
|
JCirri
Joined: 04 Feb 2006 Posts: 4576
|
Posted: Tue Jun 20, 2006 3:50 am Post subject: |
|
|
Riff wrote: | What is your formula for calcuating hold points? It should be "uint32 sustainPointsAwarded = (((25.0 * duration)/480) + 0.5);" so that the calculation is done in floating point and then rounded to the nearest integer. It should be applied separately for each note in a chord so that the rounding is done twice (or at least the cutoff calculations are correct only if you do it this way).
The formula for computing sustain points that controbute to the base score for cutoff calculations is similar but the result is rounded towards zero so you dont add 0.5 which means you can just use integer math: (25*duration)/480. |
I've found these calculations to be true for the most part but there are holds where it still fails. The problem lies in the fact that the game does not pre-calculate the total hold points and award them all at once as these calculations do. It adds the hold points in increments as you're holding the sustain note.
It is very important for my program to process these increments in the same way as the game so that hold points are not skipped or doubled if starpower is activated in the middle of a hold (certain number of increments must be added without SP, and certain number with SP such that it adds up properly).
So I'm not only interested in properly estimating the total hold points, but also in simulating the way the game adds the hold points to reach that total. _________________
|
|
Back to top |
|
|
Drakken
Joined: 09 Feb 2006 Posts: 183 Location: South Jersey
|
|
Back to top |
|
|
JCirri
Joined: 04 Feb 2006 Posts: 4576
|
Posted: Wed Jun 21, 2006 12:29 am Post subject: |
|
|
Well the program itself will most likely not be released since it's very messy and not easy to use. However, what will come out of this will be note charts showing the optimal path for every song and when those are completed I will release them in my Song FAQ forums.
As for an estimated time, it's hard to say since things keep coming up that we never found before and with each thing we change it requires testing to be sure it matches the game's calculations.
I haven't really worked on the program much lately as I've been doing other things but I'll try to get back to this later this week and let you know about how long it'll take. _________________
|
|
Back to top |
|
|
fatespeaks
Joined: 25 Mar 2006 Posts: 41 Location: Indianapolis, IN
|
Posted: Tue Jul 04, 2006 10:47 pm Post subject: Where are you getting the song data? |
|
|
Does your program parse the svg's from purplefrog or are you reading directly from the game disc? _________________
The guy wouldn’t know majesty if it came up and bit him in the face. |
|
Back to top |
|
|
JCirri
Joined: 04 Feb 2006 Posts: 4576
|
Posted: Wed Jul 05, 2006 1:51 am Post subject: |
|
|
It is now using the song data directly off the disc. _________________
|
|
Back to top |
|
|
Drakken
Joined: 09 Feb 2006 Posts: 183 Location: South Jersey
|
Posted: Sat Jul 15, 2006 5:42 am Post subject: |
|
|
At the risk of sounding impatient (ok, maybe I am when it comes to this), can you give us an update on how this is progressing? Sorry, but the thought of this is just so awesome that I can't not ask. :p _________________
Drakken's modest Expert drums goals (updated 2/16/08):
Top 10 on SH (9th!)
5* all songs (58/58!)
10 million (currently 10.53 million!)
FC Epic
Cyberscore - Great high scores site for other games |
|
Back to top |
|
|
fatespeaks
Joined: 25 Mar 2006 Posts: 41 Location: Indianapolis, IN
|
Posted: Fri Jul 21, 2006 11:22 pm Post subject: |
|
|
JCirri wrote: | It is now using the song data directly off the disc. |
Where should I look for informatin on how to read the data from the game disc? I have wasted a few hours searching the net for ps2 hacking info. I read somewhere that the note data is represented as streams of MIDI data. Mostly this is to satisfy my how-did-they-do-that curiosity. Though I would like to write my own program to calculate SP Paths. Any clips of source code or URL's would be much appreciated.
Cheers,
Aaron _________________
The guy wouldn’t know majesty if it came up and bit him in the face. |
|
Back to top |
|
|
|