Skip to content

Commit

Permalink
* Added support to load zipped DEPLS beatmap data
Browse files Browse the repository at this point in the history
* Added SetPlaySpeed, SetNotesSpeed

* Added storyboard callback system

* Fixed typo when naming LoadDEPLS2Image storyboard function

* Added love.graphics.newShader to storyboard

* More detail in combo number
  • Loading branch information
MikuAuahDark committed Jan 12, 2017
1 parent c873cfa commit 5027824
Show file tree
Hide file tree
Showing 23 changed files with 522 additions and 105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Makefile
jit/
12 changes: 6 additions & 6 deletions conf.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-- Love2d config function
function love.conf(t)
t.identity = "DEPLS" -- The name of the save directory (string)
t.version = "0.10.0" -- The LÖVE version this game was made for (string)
t.version = "0.10.1" -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.accelerometerjoystick = true -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
t.externalstorage = true -- True to save files (and read from the save directory) in external storage on Android (boolean)
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)

t.window.title = "Assembler Output" -- The window title (string)
t.window.icon = nil -- Filepath to an image to use as the window's icon (string)
t.window.icon = "image/icon.png" -- Filepath to an image to use as the window's icon (string)
t.window.width = 960 -- The window width (number)
t.window.height = 640 -- The window height (number)
t.window.borderless = false -- Remove all border visuals from the window (boolean)
Expand All @@ -20,7 +20,7 @@ function love.conf(t)
t.window.vsync = true -- Enable vertical sync (boolean)
t.window.msaa = 0 -- The number of samples to use with multi-sampled antialiasing (number)
t.window.display = 1 -- Index of the monitor to show the window in (number)
t.window.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean)
t.window.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean)
t.window.x = nil -- The x-coordinate of the window's position in the specified display (number)
t.window.y = nil -- The y-coordinate of the window's position in the specified display (number)

Expand All @@ -36,8 +36,8 @@ function love.conf(t)
t.modules.sound = true -- Enable the sound module (boolean)
t.modules.system = true -- Enable the system module (boolean)
t.modules.timer = true -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update
t.modules.touch = true -- Enable the touch module (boolean)
t.modules.touch = true -- Enable the touch module (boolean)
t.modules.video = true -- Enable the video module (boolean)
t.modules.window = true -- Enable the window module (boolean)
t.modules.thread = false -- Enable the thread module (boolean)
end
t.modules.thread = false -- Enable the thread module (boolean)
end
108 changes: 103 additions & 5 deletions docs/Storyboard.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Lua Storyboard
==============

Lua storyboard is simply a Lua script which controls how objects shown behind the simulator.
Please note that Lua script running as Lua storyboard is sandboxed, which means most of `love`
functions doesn't exist in here or modified to prevent alteration of the rendering state, and
to prevent malicious Lua storyboard script writing anywhere.
Lua storyboard is simply a Lua script which controls how objects shown behind the simulator,
hence it's named Lua storyboard. Please note that Lua script running as Lua storyboard is
sandboxed, which means most of `love` functions doesn't exist in here or modified to prevent
alteration of the rendering state, and to prevent malicious Lua storyboard from running.

Storyboard Entry Points
=======================
Expand Down Expand Up @@ -33,7 +33,8 @@ Parameters:
Storyboard Functions
====================

This function only exist on storyboard lua script.
This function is exported explicitly by DEPLS with `DEPLS.StoryboardFunctions`
table, thus it only exist on storyboard lua script.

*************************************************

Expand Down Expand Up @@ -172,3 +173,100 @@ Parameters:
* `path` - The image path

Returns: Image handle or `nil` on failure

*************************************************

### `number SetNotesSpeed([number notes_speed])`

Get or set notes speed

Parameters:

* `notes_speed` - Note speed, in milliseconds. 0.8 notes speed in SIF is equal to 800 in here

Returns: Previous notes speed

> This function throws error if notes_speed is less than 400ms
*************************************************

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

Get or set play speed. This affects how fast the live simulator are

Parameters:

* `speed_factor` - The speed factor, in decimals. 1 means 100% speed (runs normally)

Returns: Previous play speed factor

> This function throws error if speed_factor is zero or less
Additional Storyboard Functions
===============================

These functions were declared as global function in DEPLS, thus it also can be used in storyboards too

*************************************************

### `number,number,number HSL(number h, number s, number l)`

Parameters:

* `h`

* `s`

* `l`

Returns: R, G, and B color (3 values)

Storyboard Callback Functions
=============================

The stoyboard also can accept callbacks for specific event. You have to
declare the callback function as global in your storyboard.

Below is the list of storyboard callback functions:

*************************************************

### `void OnNoteTap(number pos, number accuracy, number distance, number attribute, boolean is_star, boolean is_simul, boolean is_token)`

Triggered everytime note is tapped on screen

Parameters:

* `pos` - Idol unit position. 9 is leftmost

* `accuracy` - The note tap accuracy. 1 for Perfect, 0.88 for Great, 0.8 for Good, 0.4 for Bad, and 0 for **Miss**

* `distance` - The note distance from the idol unit position, in pixels

* `attribute` - Note attribute. 1, 2, 3 are Smile, Pure, and Cool respectively. The others depends on beatmap type.

* `is_star` - Is the note is a star note (dangerous note)?

* `is_simul` - Is the note is a simultaneous note?

* `is_token` - Is the note is a token note?

*************************************************

### `void OnLongNoteTap(boolean release, number pos, number accuracy, number distance, number attribute, boolean is_simul)`

Triggered everytime long note is tapped (and currently holding) or released

Parameters:

* `release` - Is this a long note release callback?

* `pos` - Idol unit position. 9 is leftmost

* `accuracy` - The note tap accuracy. 1 for Perfect, 0.88 for Great, 0.8 for Good, 0.4 for Bad, and 0 for **Miss** (in this case, release will never be triggered)

* `distance` - The note distance from the idol unit position, in pixels

* `attribute` - Note attribute. 1, 2, 3 are Smile, Pure, and Cool respectively. The others depends on beatmap type.

* `is_simul` - Is the note is a simultaneous note? (start holding only)
Binary file added image/com_button_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/com_button_01se.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/com_win_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/com_win_42.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_14se.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_15se.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_18se.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/set_button_19se.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5027824

Please sign in to comment.