View previous topic :: View next topic |
Author |
Message |
Edible Bondage Tape Trick Member


Joined: 26 Jan 2002 Location: Kerri |
20. Posted: Tue Nov 23, 2004 10:28 am Post subject: |
|
|
itll still have to pull each arms image form a database somewehre then _________________
|
|
Back to top |
|
 |
Cutriss Staff Member


Joined: 24 Jan 2002
|
21. Posted: Tue Nov 23, 2004 10:30 am Post subject: |
|
|
You don't seriously think we have images for each of those stepcharts on the site already, do you?
They're code-generated every time you load a stepchart.
EBT, I don't mean to be mean, but if you're not familiar with how this works, maybe you should stop debating the merits of one approach versus another. _________________
Sentient Mode is capable... |
|
Back to top |
|
 |
Edible Bondage Tape Trick Member


Joined: 26 Jan 2002 Location: Kerri |
22. Posted: Tue Nov 23, 2004 10:56 am Post subject: |
|
|
yea thats how i thought it was done i still dont see how querrying up an on demand creation would be lighter on the server _________________
|
|
Back to top |
|
 |
Tobias Preener Trick Member


Joined: 09 Oct 2004 Location: Middle of nowhere (North Dakota) |
23. Posted: Tue Nov 23, 2004 1:21 pm Post subject: |
|
|
does the groove radar include the difficulty(steps) or does that have a different term?
also, i have two other ideas. first, i think u should put age in profile. senond, i think u should put active users.(like on msn) unless u already have that for the chat room(which ive never used)
i think u should put the age in case someone wants to add someone to their messenger their age. and the senoond one would be for knowing if youre going to get a prmopt reply if u PM someone _________________
Ned Diggers wrote: | Everytime someone frick quotes one of my frick godly posts and places it in there signature I have to change my name. I don't want any of you NERDS ruining my E-Rep by being 'friends' with me.
|
Brawl FC (PM me): 0989-1391-5541
 |
|
Back to top |
|
 |
evn Staff Member


Joined: 23 Jan 2002 Location: Calgary AB |
24. Posted: Tue Nov 23, 2004 3:56 pm Post subject: |
|
|
Elegant Beautiful Tran wrote: | yea thats how i thought it was done i still dont see how querrying up an on demand creation would be lighter on the server |
You need to get an extra 5 characters (one for each of the 5 values on the radar) when you query the database - that's pretty much free.
You use each of those characters as a magnitude of a vector for each radar element, an you can hard-code the direction (stream = 0?, chaos = 72?, freeze = 144?, etc). It's only a handful of high-school trig calculations to convert those vectors into points on a cartesian* plane. then just connect the dots. Instant groove radar: I could probably write this up in half-an-hour once I get home.
We can also make a few assumptions:
- Radar values will be integers between 0 and 10
- There are only 5 different fields on the radar
- The angle of the radar fields will not change
With that you can just pre-calculate the 50 possible coordinates and store them. Look them up when you need them so that you don't even have to do any math which may save a few CPU cycles. You can increase the accuracy of the arrays as needed or until just calculating things on demanded is faster than the lookup.
The actually drawing of radar could only be a single line of code, preparing the values maybe another 10, and setting up the image headers etc. should only be another 5 lines or so.
If performance is a serious issue you can cache the results to disk with a handful more lines of code but on casual inspection the script would be so light-weight that you wouldn't need to.
/me cracks open DreamweaverÂ…
* is that the right word? I haven't had a math class for some time now _________________
|
|
Back to top |
|
 |
evn Staff Member


Joined: 23 Jan 2002 Location: Calgary AB |
|
Back to top |
|
 |
Shinmizu Staff Member


Joined: 24 Jan 2002 Location: Stuck in a Klein bottle |
|
Back to top |
|
 |
evn Staff Member


Joined: 23 Jan 2002 Location: Calgary AB |
27. Posted: Wed Nov 24, 2004 12:36 am Post subject: |
|
|
Fine. I cleaned it up a bit*. Happy now?
Now that we _can_ make groove radars we need to figure out _should_ we make them? If so: who's going to handle feeding data to the graph maker?
* I wasn't able to feed in data that would break it but it's late and I might have overlooked something. _________________
|
|
Back to top |
|
 |
Shinmizu Staff Member


Joined: 24 Jan 2002 Location: Stuck in a Klein bottle |
|
Back to top |
|
 |
evn Staff Member


Joined: 23 Jan 2002 Location: Calgary AB |
29. Posted: Wed Nov 24, 2004 9:46 am Post subject: |
|
|
Shinmizu wrote: | I think it would be better to clamp values >= 11 down to 11 instead of zeroing them out, though. |
Done. _________________
|
|
Back to top |
|
 |
Shinmizu Staff Member


Joined: 24 Jan 2002 Location: Stuck in a Klein bottle |
|
Back to top |
|
 |
Phrekwenci Administrator


Joined: 27 Feb 2002 Location: New York, NY |
31. Posted: Wed Nov 24, 2004 11:27 am Post subject: |
|
|
Problem.
The auto-gen Stepmania groove radar isn't exactly how DDR calculates it's values. The best example I can think of is MaxX Unlimited. On DDR the radar looks pretty clean something like this if I remember correctly. On Stepmania it looks disgusting, something like that.
I'm not sure if I like the idea of giving groove radars to songs that never had them. _________________
|
|
Back to top |
|
 |
Tobias Preener Trick Member


Joined: 09 Oct 2004 Location: Middle of nowhere (North Dakota) |
32. Posted: Wed Nov 24, 2004 2:03 pm Post subject: |
|
|
Phrekwenci wrote: | Problem.
The auto-gen Stepmania groove radar isn't exactly how DDR calculates it's values. The best example I can think of is MaxX Unlimited. On DDR the radar looks pretty clean something like this if I remember correctly. On Stepmania it looks disgusting, something like that.
I'm not sure if I like the idea of giving groove radars to songs that never had them. |
if they dont have them, how could u give it to them?
and wat difficulty of max unlimmeted was that? _________________
Ned Diggers wrote: | Everytime someone frick quotes one of my frick godly posts and places it in there signature I have to change my name. I don't want any of you NERDS ruining my E-Rep by being 'friends' with me.
|
Brawl FC (PM me): 0989-1391-5541
 |
|
Back to top |
|
 |
MPB3.Radio Trick Member

![]()
Joined: 05 Dec 2002 Location: P-Town |
33. Posted: Wed Nov 24, 2004 2:16 pm Post subject: |
|
|
Depending on the size of the image, the graphics might not even exceed 3kb. GD's PNG encoder is extremely efficient in my experiences. I managed to create some fairly pretty stepcharts that only weighed in around 20kb. Also, unless the generator script is really efficient or the server for it is extremely,
Also, I don't see how dynamically generating step charts on every request would be more efficient than using a caching scheme. The cost ratio of disk space to processing power would favor a caching solution or am I missing information here? |
|
Back to top |
|
 |
evn Staff Member


Joined: 23 Jan 2002 Location: Calgary AB |
34. Posted: Wed Nov 24, 2004 5:29 pm Post subject: |
|
|
Radio wrote: | Depending on the size of the image, the graphics might not even exceed 3kb. GD's PNG encoder is extremely efficient in my experiences. I managed to create some fairly pretty stepcharts that only weighed in around 20kb. Also, unless the generator script is really efficient or the server for it is extremely, |
The example code generates images that are about 30-40kb for 440x360. I had an "ugly" version that could produce images in the 2-4kb range. All of this can change depending on the final image size and content so I'm not going to spend too much time worrying about it because we can produce images to whatever size is appropriate.
Quote: | Also, I don't see how dynamically generating step charts on every request would be more efficient than using a caching scheme. |
It almost certainly isn't, but if Zend (or whatever we're using already) does a good enough job then there's no real point in spending much time on the problem. The current step chart system is pretty quick and it's working with much more data than the radar script so I'm pretty confident that things are fine as is.
As you can probably tell, I'm not too concerned about any of this because nobody knows where/if we have data to generate them anyway. I'm with Phrek in that I don't like the idea of making up data for charts that don't have them. _________________
|
|
Back to top |
|
 |
|