Permalink
Browse files

final

  • Loading branch information...
1 parent f6bb6a2 commit 487dbc0f96c59052485c8cc973043c8f472befcd @leafo committed Apr 20, 2015
Showing with 178 additions and 16 deletions.
  1. +2 −2 conf.moon
  2. +16 −6 game.moon
  3. +2 −2 main.moon
  4. +1 −1 midi/1.moon
  5. BIN midi/1.ogg
  6. +135 −0 midi/2.moon
  7. BIN midi/2.ogg
  8. BIN midi/beat.ogg
  9. +22 −5 ui.moon
View
@@ -6,8 +6,8 @@ export GAME_CONFIG = {
quit: { "escape" }
- one: { "1", joystick: {1, 3, 5} }
- two: { "2", joystick: {2, 4, 6} }
+ one: { "1", "left", joystick: {1, 3, 5} }
+ two: { "2", "right", joystick: {2, 4, 6} }
up: "up"
down: "down"
View
@@ -199,12 +199,15 @@ class TrackField extends Box
elseif pressed and not delta
@on_miss_note nil, true
+ -- note: we may have entered game over here from the miss note call above
@mark_missed_notes!
true
mark_missed_notes: =>
b, q = @track\get_beat!
+ return unless b
+
b += q
for note in @track.notes\each_note @get_bounds!
@@ -221,6 +224,8 @@ class TrackField extends Box
-- returns note, delta is ms
find_hit_note: (col) =>
b, q = @track\get_beat!
+ return unless b
+
local min_note, min_d
bq = b + q
@@ -279,6 +284,8 @@ class Game
Label ""
Label "press -1- to start"
+ Label ""
+ Label "use -1- and -2- to flick tongue"
}
}
@hit_list = VList {}
@@ -302,18 +309,21 @@ class Game
on_miss_note: (note, from_hit) =>
@visibility\decrement!
+ if @visibility.p <= 0
+ @field\on_game_over!
+
append_hit: (delta) =>
table.insert @hit_list.items, 1, Label "#{math.floor delta}"
@hit_list.items[11] = nil
draw: =>
@ui\draw!
+ -- debug notes
+ -- if notes = @track and @track.notes
+ -- notes\draw!
- if notes = @track and @track.notes
- notes\draw!
-
- keypressed: (key) =>
- if CONTROLLER\is_down "quit"
+ on_key: (key) =>
+ if @field and @track and CONTROLLER\is_down("quit")
@field\on_game_over!
return true
@@ -322,7 +332,7 @@ class Game
@entities\update dt
@particles\update dt
- if CONTROLLER\downed "confirm"
+ if CONTROLLER\downed "confirm", "1"
unless @track
print "Queue track"
@track = Track @stage.module
View
@@ -1,7 +1,7 @@
require "lovekit.all"
-if pcall(-> require"inotify")
- require "lovekit.reloader"
+-- if pcall(-> require"inotify")
+-- require "lovekit.reloader"
{graphics: g} = love
View
@@ -144,6 +144,6 @@
"steady"
-- 36
- "paradiddle"
+ "default"
}
}
View
Binary file not shown.
View
@@ -0,0 +1,135 @@
+{
+ bpm: 170
+ beats_per_measure: 8
+ measures: 38
+
+ notes: {
+ intro: {
+ rate: 1
+ "........"
+ }
+
+ default: {
+ rate: 1
+ "1.2.1.2."
+ }
+
+ default_outro: {
+ rate: 3
+ "1.......2.......1.......12121212"
+ }
+
+ hits: {
+ rate: 2
+ "111.2.111.1.2..."
+ }
+
+ hits_flip: {
+ rate: 2
+ "222.1.222.2.1..."
+ }
+
+ hits_outro: {
+ rate: 2
+ "222.1.222.2.1212"
+ }
+
+ fasterdiddle: {
+ rate: 2
+ "1211212212112122"
+ }
+
+ fasterdiddle2: {
+ rate: 2
+ "2112122121121221"
+ }
+
+ blah: {
+ rate: 2
+ "1.2.1121.2.112"
+ }
+
+ blah_flip: {
+ rate: 2
+ "2.1.2212.1.221"
+ }
+
+ roll: {
+ rate: 2
+ "1.2.11112.1.2222"
+ }
+
+ roll_flip: {
+ rate: 2
+ "2.1.22221.2.1111"
+ }
+
+ roll_outro: {
+ rate: 3
+ "1...2...1.1.1.1.2...1...21212121"
+ }
+
+ "intro"
+
+ -- 1 - 4
+ "hits"
+ "hits"
+ "hits_flip"
+ "hits_outro"
+
+ -- 5 - 8
+ "hits_flip"
+ "hits_outro"
+ "hits_flip"
+ "hits"
+
+ -- 9 - 12
+ "fasterdiddle"
+ "fasterdiddle2"
+ "fasterdiddle"
+ "fasterdiddle2"
+
+ -- 13
+ "hits_outro"
+
+ -- 14
+ "default"
+ "default_outro"
+
+ -- 16 - 19
+ "blah"
+ "blah"
+ "blah"
+ "blah"
+
+ -- 20 - 23
+ "blah_flip"
+ "blah"
+ "blah_flip"
+ "blah"
+
+ -- 24 - 27
+ "fasterdiddle"
+ "blah"
+ "fasterdiddle2"
+ "blah_flip"
+
+ -- 28 - 31
+ "roll"
+ "roll_flip"
+ "roll"
+ "roll_outro"
+
+
+ -- 32 - 35
+ "fasterdiddle"
+ "blah"
+ "fasterdiddle2"
+ "blah_flip"
+
+ -- 36
+ "hits"
+ "hits"
+
+ }
+}
View
Binary file not shown.
View
Binary file not shown.
View
@@ -133,19 +133,20 @@ class StageSelect
stages: {
{
- name: "1. tutorial"
+ name: "1. practice"
module: "beat"
desc: "let's go!"
}
+
{
- name: "2. fake"
- module: "beat"
+ name: "2. great ready"
+ module: "1"
desc: "kick it"
}
{
- name: "2. stupid"
- module: "beat"
+ name: "3. to the max"
+ module: "2"
desc: "& love &"
}
}
@@ -169,6 +170,22 @@ class StageSelect
@stage_items.padding = 10
list = VList @stage_items
+
+ list = VList {
+ Label "glasses protector 2000"
+ Label "ld 32 edition"
+ Label ""
+ Label "arrows move, enter select"
+ list
+
+ Label ""
+ with Label "leafo 2015"
+ .color = {255,255,255, 180}
+
+ with Label " dedicated 2 adit"
+ .color = {255,255,255, 180}
+ }
+
@ui = Bin 0, 0, @viewport.w, @viewport.h, list
move: (ds) =>

0 comments on commit 487dbc0

Please sign in to comment.