Commit Graph

66 Commits

Author SHA1 Message Date
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00
sigatrev 466718e016 created ArrowEffects namespace
and exposed all arrow effects functions. This can allow themed elements
to move with columns during gameplay, such as column specific judgments,
flashes, or whatever else.
2014-06-28 01:26:57 -05:00
Kyzentun b756386fda Changed GetYOffset to make CMods an MMods compensate for music rate. 2014-06-17 03:14:17 -06:00
Kyzentun 2b9982f505 Added Mmod compensation to ArrowEffects::GetYOffset. 2014-05-08 03:07:02 -06:00
Devin J. Pohly b423268568 Further simplify GetYOffset
And add a comment.  *pats self on back*

No-op.
2013-07-18 15:52:56 -04:00
Devin J. Pohly 5c8d021e6e Simplify logic in GetYOffset for arrows
No-op.
2013-07-18 14:40:16 -04:00
Devin J. Pohly bcd90324c7 editor: show scroll segments in song timing
They function anyway in gameplay; there's no reason they should be
special-cased out of the editor.
2013-07-18 14:35:53 -04:00
Devin J. Pohly ce507b9800 use empty TimingData in Steps to signify fallback on Song timing.
This required using the new Steps::GetTimingData function and the allowEmpty
parameter to TimingData::TidyUpData when appropriate, as well as clearing the
TimingData to remove step timing rather than coping the song timing over it.

Fixes some odd editor behavior when changing song timing, and is overall a
slightly less hacky way of doing things.
2013-01-23 14:51:18 -05:00
Jason Felds 4fee57442c In during commit. ;) 2011-11-01 15:25:05 -04:00
Jason Felds 1c28a06bb6 Fix Expand, possibly other mods, for 2nd player. 2011-11-01 15:20:20 -04:00
Thai Pangsakulyanont d285c80a72 Some optimizations with the scroll segments.
Scroll segments seem to cause the lag when there's a lot of segment
in the steps, say, 165. On my Mac, it drops the frame-rate down by about
30 FPS in the end.

This is because the way the the game tries to determine the exact position
of the note, it has to go through all the scroll segments from the
beginning until it finds the currently active scroll segment and keep
track of the beat to display instead.

And each frame, the game needs to determine the position for each note,
and also when figuring out the first beat and last beat to display. This
makes the game slow even with just 165 scroll segments.

The approach is that at every game update, we create an optimized data
structure that can calculate the displayed beat from real song beat
in O(log n) time. So in this approach we iterate through EVERY scroll
segments each frame instead of iterating through the scroll segments
for each note for each frame. This eliminates the lag on this side.

The data structure is recomputed each update because I assume that the
timing segments can change at any time, but not during draws.

A similar problem is: when using Cmods, GetElapsedTimeFromBeat()
is also called very often (say, for each note and also in FindFirst/Last
DisplayedBeat), we may as well have to make these queries faster for songs
that has hundreds of BPM changes or stops or delays to prevent the game
from lagging.
2011-09-14 23:48:24 +07:00
Thai Pangsakulyanont 8fdf42e2bb Add PlayerState::GetDisplayedPosition() and PlayerState::GetDisplayedTiming()
which returns the dispalyed position and timing (based on the timing display
switch in the editor), so less copy n paste in ArrowEffects and NoteField.
2011-09-14 12:20:42 +07:00
Jason Felds b3d1dd7a50 Well, that was a thing. 2011-07-05 17:04:20 -04:00
Jason Felds 2726f6df82 NOW Mini and Tiny are swapped properly. 2011-07-05 16:50:06 -04:00
Colby Klein df4bde7563 Fix metric naming 2011-07-05 12:50:01 -07:00
Colby Klein e9c23c0b83 revert changes, swap mini<->tiny when loading as a temp solution. 2011-07-05 12:22:23 -07:00
Colby Klein ae8d923bec Another attempt at Mini <-> Tiny. This one should be much closer or working. 2011-07-05 11:17:12 -07:00
Jason Felds 2ab5a4ddb8 Mostly 64 - 32 float warning fixes. 2011-06-12 03:37:10 -04:00
Thai Pangsakulyanont 8f35c048b8 [scroll] mergefix 2011-05-25 23:48:34 +07:00
Thai Pangsakulyanont d9f936190a [default -> scroll] merge 2011-05-25 22:56:26 +07:00
Thai Pangsakulyanont fe9573975c [scroll] 90% of scroll segments 2011-05-25 22:44:41 +07:00
Thai Pangsakulyanont aa0eb7f5d7 GetSpeedMultiplier in ArrowEffects becomes TimingData::GetDisplayedSpeedPercent.
We might need to use it later in other parts (NoteField).
2011-05-24 11:43:08 +07:00
Jason Felds c26da983e4 [splittiming] Right idea, wrong place.
Song Timing respected when needed, included SpeedSegments.
2011-05-17 14:16:58 -04:00
Jason Felds 1a41c32dd9 [splittiming] Better variable name.
ArrowEffects had a minor change, but the intent isn't up yet.
It needs to be so that when you go from the editor to the chart
for playing in Song Timing, it doesn't use the Step Timing.
2011-05-17 00:07:43 -04:00
Thai Pangsakulyanont 5deed76e37 [splittiming] add a special case for lengthed speed change at beat 0. 2011-05-17 00:02:15 +07:00
Thai Pangsakulyanont f8f47c002b [splittiming] speed segment changes:
- allow first speed segment to take effect
- make speed segments take effect before delays
- make speed segments not affect cmods
2011-05-16 12:17:54 +07:00
Jason Felds e2766cf644 [splittiming] SpeedSegments run on Seconds now.
ScreenEdit's code probably needs to be redone.
At least, someone find a way to remove "Beats"
or "Seconds" from the text entry area.
2011-05-15 23:48:03 -04:00
Jason Felds 275bb63ca0 [splittiming] Don't show SPEEDS in pure editor. 2011-05-15 21:24:39 -04:00
Jason Felds f36121e647 [splittiming] Remember transitions to 1x. 2011-05-15 19:39:14 -04:00
Jason Felds 183e745534 [splittiming] Of course...negative inverse. 2011-05-15 18:57:04 -04:00
Jason Felds eb5ae94f07 [splittiming] Follow Daisu's lua a little more. 2011-05-15 18:33:47 -04:00
Jason Felds e9bcdc5568 [splittiming] Kind of getting there... 2011-05-15 18:15:52 -04:00
Jason Felds 300360a612 [splittiming] Setup for math fun.
Feels like we're doing trig or calculus here.
2011-05-15 17:45:21 -04:00
Jason Felds 231f9433c3 [splittiming] Speed Changes working...somewhat.
There needs to be some more math involving the beats.
2011-05-15 17:39:57 -04:00
Jason Felds 87ac80c33f [splittiming] We know this doesn't work.
Time to find what does.
2011-05-15 17:14:18 -04:00
Jason Felds 6db40f034a [splittiming] Core lines set for #SPEEDS.
Let's see how badly this breaks.
2011-05-15 16:07:18 -04:00
Jason Felds 7c9b54e9f0 [splittiming] Fix ArrowEffects 1c4b21b.
Almost had this one right...just needed more vars.
2011-05-13 23:32:14 -04:00
Thai Pangsakulyanont 1c4b21b181 [splittiming] ok, now it displays properly. 2011-05-13 15:19:42 +07:00
Thai Pangsakulyanont 1bf99bd528 [splittiming] make screenedit work with the steps' timing. 2011-05-11 20:53:40 +07:00
Thai Pangsakulyanont 2c87c34899 [splittiming] ArrowEffects, BPMDisplay, Inventory, MeterDisplay 2011-05-10 21:44:25 +07:00
Thai Pangsakulyanont 6162fe519b [splittiming] ArrowEffects and ScreenGameplay (222) 2011-05-09 23:00:29 +07:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds 650653b4d2 Multiple warning fixes dealing with casts.
Yes, I am using static_casts. Generally safer.
2011-03-14 02:09:58 -04:00
Jason Felds 0587aeced5 Allow for dizzy hold heads. 2011-02-28 00:41:04 -05:00
Jason Felds b2cc16fed7 More detailed doc. 2011-02-28 00:35:56 -05:00
AJ Kelly 6061d5c08e commenting 2011-02-27 18:36:41 -06:00
Jason Felds 670a788897 Mini can be adjusted. Had to force a cast. 2011-02-12 01:57:40 -05:00
Jason Felds 12b80a8022 Beat's turn. 2011-02-12 01:45:20 -05:00
Jason Felds caad2f9214 Consistency with other switch statements. 2011-02-12 01:39:53 -05:00
Jason Felds 232ef8fdf4 Tornado's twisty turn. 2011-02-12 01:35:34 -05:00