Skip to content

Commit 9499a9d

Browse files
committed
Swing token note
Custom background settings Automatic background selection - For SIFTrain beatmap (extension) New note tap accuracy - Might gives more goods. Not very tested Global offset setting Fixed score node canvas management Optimized loading times (slightly)
1 parent 839963e commit 9499a9d

File tree

13 files changed

+208
-135
lines changed

13 files changed

+208
-135
lines changed

AquaShine.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,22 @@ function love.load(arg)
720720
jit.off()
721721
end
722722

723+
if AquaShine.GetCommandLineConfig("debug") then
724+
function AquaShine.Log(part, msg, ...)
725+
if not(part) then
726+
local info = debug.getinfo(2)
727+
728+
if info.short_src and info.currentline then
729+
part = info.short_src..":"..info.currentline
730+
end
731+
end
732+
733+
io.stderr:write("[", part or "unknown", "] ", string.format(msg or "", ...), "\n")
734+
end
735+
else
736+
function AquaShine.Log() end
737+
end
738+
723739
-- Preload entry points
724740
if AquaShine.AllowEntryPointPreload then
725741
for n, v in pairs(ASArg.Entries) do

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Live Simulator: 2
33

44
Live Simulator: 2 (`DEPLS2`) is a Love Live! School Idol Festival Live Show Simulator written in Lua.
55

6-
LOVE2D v0.10.1 or later is required to run this live simulator.
6+
It is currently LL!SIF live simulator that supports variety of different beatmap formats.
77

88
How to run
99
==========
@@ -51,15 +51,17 @@ Controls
5151
Supported Beatmaps
5252
==================
5353

54-
* Raw SIF beatmap, this is main beatmap format that DEPLS uses.
54+
* Raw SIF beatmap, this is main beatmap format that Live Simulator: 2 internally uses.
5555

5656
* Sukufesu Simulator beatmap, yuyu live simulator beatmap.
5757

5858
* Custom Beatmap Festival project folder.
5959

6060
* MIDI, specialized MIDI file.
6161

62-
* LLPractice beatmap, with some bit complex setup.
62+
* LLPractice beatmap.
63+
64+
* SIFTrain beatmap, both original one and "extended" one were supported.
6365

6466
Screenshots
6567
===========
@@ -102,6 +104,6 @@ Live Simulator: 2 uses these external libraries:
102104

103105
* Lua FFT library (`luafft.lua`)
104106

105-
* LuaBit library (`bit.lua`) (fallback if `bit` library is unavailable)
107+
* LuaBit library (`bit.lua`) (fallback: used if `bit` library is unavailable)
106108

107109
Please see respective files (or website) for license of those libraries.

TODO.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,28 @@ v1.1.2
44
- Add IsOpenGLES() storyboard function OK
55

66
v1.1.3
7-
- SIFTrain beatmap extension WIP
7+
- SIFTrain beatmap extension OK
88
- /gles switch OK
99
- Improved swing note detection OK
10-
- Swing token note
11-
- Difficulty-Background mapping WIP
10+
- Swing token note OK
11+
- Difficulty-Background mapping OK
1212
- New note tap accuracy OK
13-
- Deprecation of test beatmap OK
13+
- Global offset setting OK
14+
- Deprecation of test beatmap
15+
- Deprecation of SetNotesSpeed
1416

1517
v2.0
1618
- FFmpeg extension
1719
- Unit creation
1820
- AquaShine UI library
19-
- NoteLoader2 (metadata loading only, beatmap verification)
20-
- Removal of Playground TEXB Loader
21-
- Deprecation of test beatmap
21+
- NoteLoader2 (metadata loading, beatmap verification)
22+
- Hidden note and sudden note
23+
- Individual note speed
24+
- Live Show! Failed
25+
- Pause
26+
- Adjustable combo display size
27+
- Adjustable SE volume
28+
- Actual unit live skill
29+
- Removal of Playground TEXB Loader (Shelsha)
30+
- Removal of test beatmap
31+
- Removal of SetNotesSpeed

docs/Storyboard.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ Returns: Previous notes speed
188188

189189
> This function throws error if `notes_speed` is less than 400ms
190190
191+
> This function is now deprecated and will be removed in the future
192+
191193
*************************************************
192194

193195
### `number SetPlaySpeed([number speed_factor])`

livesim.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ function DEPLS.DrawDebugInfo()
479479
local sample = DEPLS.StoryboardFunctions.GetCurrentAudioSample()[1]
480480
local text = string.format([[
481481
%d FPS
482-
SAVE_DIR = %s
483482
NOTE_SPEED = %d ms
484483
ELAPSED_TIME = %d ms
485484
SPEED_FACTOR = %.2f%%
@@ -493,7 +492,7 @@ REMAINING_NOTES = %d
493492
PERFECT = %d GREAT = %d
494493
GOOD = %d BAD = %d MISS = %d
495494
AUTOPLAY = %s
496-
]] , love.timer.getFPS(), DEPLS.SaveDirectory, DEPLS.NotesSpeed, DEPLS.ElapsedTime, DEPLS.PlaySpeed * 100
495+
]] , love.timer.getFPS(), DEPLS.NotesSpeed, DEPLS.ElapsedTime, DEPLS.PlaySpeed * 100
497496
, DEPLS.Routines.ComboCounter.CurrentCombo, #EffectPlayer.list, DEPLS.LiveOpacity, DEPLS.BackgroundOpacity
498497
, DEPLS.BeatmapAudioVolume, sample[1], sample[2], DEPLS.NoteManager.NoteRemaining, DEPLS.NoteManager.Perfect
499498
, DEPLS.NoteManager.Great, DEPLS.NoteManager.Good, DEPLS.NoteManager.Bad, DEPLS.NoteManager.Miss, tostring(DEPLS.AutoPlay))
@@ -536,6 +535,7 @@ function DEPLS.Start(argv)
536535

537536
-- Load configuration
538537
local BackgroundID = AquaShine.LoadConfig("BACKGROUND_IMAGE", 11)
538+
local GlobalOffset = AquaShine.LoadConfig("GLOBAL_OFFSET", 0)
539539
local Keys = AquaShine.LoadConfig("IDOL_KEYS", "a\ts\td\tf\tspace\tj\tk\tl\t;")
540540
local Auto = assert(tonumber(AquaShine.LoadConfig("AUTOPLAY", 0)))
541541
DEPLS.LiveDelay = math.max(AquaShine.LoadConfig("LIVESIM_DELAY", 1000), 1000)
@@ -598,6 +598,11 @@ function DEPLS.Start(argv)
598598
notes_list = noteloader_data.notes_list
599599

600600
-- Load background
601+
if AquaShine.LoadConfig("AUTO_BACKGROUND", 1) == 0 then
602+
-- Background always default one
603+
noteloader_data.background = nil
604+
end
605+
601606
if type(noteloader_data.background) == "number" then
602607
BackgroundID = noteloader_data.background
603608
elseif type(noteloader_data.background) == "table" then
@@ -637,7 +642,7 @@ function DEPLS.Start(argv)
637642
-- Add to note manager
638643
do
639644
for i = 1, #notes_list do
640-
DEPLS.NoteManager.Add(notes_list[i])
645+
DEPLS.NoteManager.Add(notes_list[i], GlobalOffset)
641646
end
642647
end
643648
DEPLS.NoteManager.InitializeImage()

livesim/scorenode_effect.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ function ScoreNode.Create(score)
2424
local canvas = graphics.newCanvas(500, 32)
2525
local temp = {}
2626

27-
temp.Used = true
2827
temp.Canvas = canvas
2928
out.score_canvas = temp
3029
ScoreNode.CanvasList[#ScoreNode.CanvasList + 1] = temp
3130
end
32-
31+
32+
out.score_canvas.Used = true
3333
out.score_info = {opacity = 0, scale = 0.9, x = 530}
3434
out.opacity_tw = tween.new(100, out.score_info, {opacity = 255})
3535
out.scale_tw = tween.new(200, out.score_info, {scale = 1}, "inOutSine")

main.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
-- IN THE SOFTWARE.
2424
--]]---------------------------------------------------------------------------
2525

26-
DEPLS_VERSION = "1.1.3-pre1"
27-
DEPLS_VERSION_NUMBER = 01010201 -- xxyyzzww. x = major, y = minor, z = patch, w = pre-release counter
26+
DEPLS_VERSION = "1.1.3"
27+
DEPLS_VERSION_NUMBER = 01010300 -- xxyyzzww. x = major, y = minor, z = patch, w = pre-release counter
2828

2929
----------------------
3030
-- AquaShine loader --

note.lua

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ local SlideNoteList = {}
123123
--! @brief Creates new SingleNoteObject
124124
--! @param note_data SIF-compilant note data
125125
--! @returns New NoteObject
126-
local function NewNoteObject(note_data)
126+
local function NewNoteObject(note_data, offset)
127+
offset = offset or 0
128+
127129
local noteobj = {
128-
ZeroAccuracyTime = note_data.timing_sec * 1000,
130+
ZeroAccuracyTime = note_data.timing_sec * 1000 + offset,
129131
Attribute = tonumber(note_data.notes_attribute),
130132
Position = note_data.position,
131133
Audio = {
@@ -137,6 +139,7 @@ local function NewNoteObject(note_data)
137139
FirstCircle = {480, 160}
138140
}
139141
local idolpos = assert(DEPLS.IdolPosition[note_data.position], "Invalid idol position")
142+
local note_effect = note_data.effect % 10
140143

141144
-- Idol position
142145
noteobj.NoteposDiff = {idolpos[1] - 416, idolpos[2] - 96}
@@ -148,39 +151,33 @@ local function NewNoteObject(note_data)
148151
noteobj.SimulNote = true
149152
end
150153

151-
if note_data.effect == 2 then
152-
-- Token note
153-
noteobj.TokenNote = true
154-
elseif note_data.effect == 4 then
155-
-- Star note
156-
noteobj.StarNote = true
157-
elseif note_data.effect == 11 then
158-
-- Slide note
154+
-- Swing note
155+
noteobj.SlideNote = (note_data.effect - 1) / 10 >= 1 and note_effect < 4
156+
157+
if noteobj.SlideNote then
159158
local newnotedata = Yohane.CopyTable(note_data)
160159

161-
noteobj.SlideNote = true
162160
SlideNoteList[#SlideNoteList + 1] = newnotedata
163161
newnotedata.noteobj = noteobj
164162
newnotedata.index = Note.TotalNotes
165-
elseif note_data.effect == 3 or note_data.effect == 13 then
166-
-- Long note (necessarily with swing)
167-
if note_data.effect == 13 then
168-
local newnotedata = Yohane.CopyTable(note_data)
169-
170-
noteobj.SlideNote = true
171-
noteobj.SlideNote = true
172-
SlideNoteList[#SlideNoteList + 1] = newnotedata
173-
newnotedata.noteobj = noteobj
174-
newnotedata.index = Note.TotalNotes
175-
end
176-
163+
end
164+
165+
if note_effect == 2 then
166+
-- Token note
167+
noteobj.TokenNote = true
168+
elseif note_effect == 4 then
169+
-- Star note
170+
noteobj.StarNote = true
171+
elseif note_effect == 3 then
177172
-- Long note. Use LongNoteObject metatable
178173
noteobj.Audio2 = {
179174
Perfect = DEPLS.Sound.PerfectTap:clone(),
180175
Great = DEPLS.Sound.GreatTap:clone(),
181176
Good = DEPLS.Sound.GoodTap:clone(),
182177
Bad = DEPLS.Sound.BadTap:clone(),
183178
}
179+
180+
-- Create trail mesh vertices
184181
noteobj.Vert = {}
185182
noteobj.SecondCircle = {480, 160}
186183
noteobj.ZeroAccuracyEndNote = note_data.effect_value * 1000
@@ -206,10 +203,6 @@ local function NewNoteObject(note_data)
206203
return noteobj
207204
end
208205

209-
if note_data.effect ~= 11 then
210-
PreviousSlideNote = nil
211-
end
212-
213206
-- SingleNoteObject in here
214207
noteobj.Audio.StarExplode = DEPLS.Sound.StarExplode:clone()
215208
noteobj.ScoreMultipler2 = 1
@@ -695,10 +688,10 @@ end
695688

696689
--! @brief Add note
697690
--! @param note_data SIF-compilant note data
698-
function Note.Add(note_data)
691+
function Note.Add(note_data, offset)
699692
Note.NoteRemaining = Note.NoteRemaining + 1
700693
Note.TotalNotes = Note.TotalNotes + 1
701-
table.insert(Note[note_data.position], NewNoteObject(note_data))
694+
table.insert(Note[note_data.position], NewNoteObject(note_data, offset))
702695
end
703696

704697
local function initnote_pos(a)
@@ -757,9 +750,8 @@ function Note.InitializeImage()
757750
applyswing(chainswing)
758751
end
759752

760-
761753
if (chainswing.effect == 13 and
762-
chainswing.timing_sec + chainswing.effect_value or
754+
chainswing.timing_sec + chainswing.effect_value or
763755
chainswing.timing_sec
764756
) - last_timing > 0.25
765757
then

0 commit comments

Comments
 (0)