Skip to content

Commit

Permalink
Set up musical notes and rests
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Jul 28, 2024
1 parent 3c26e8e commit 8bdc26f
Show file tree
Hide file tree
Showing 25 changed files with 229 additions and 124 deletions.
66 changes: 18 additions & 48 deletions assets/config/actor.ron
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,10 @@
],
),

movement: Movement(
speed: 80.0,
),
// TODO: Does this still work or does it get overwritten?
attack: Attack(
power: 2,
force: 4,
color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000)),
),
health: Health(
max: 100,
current: 100,
),
deck: Deck(
cards: ["step", "pair"],
),
movement: Movement(speed: 80.0),
attack: Attack(color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000))),
health: Health(max: 100, current: 100),
deck: Deck(cards: ["step", "pair"]),
),
},

Expand All @@ -52,15 +40,13 @@
],
),

attack: Attack(
color: Srgba(Srgba(red: 0.929, green: 0.557, blue: 0.576, alpha: 1.000)),
),
deck: Deck(
cards: ["step", "step", "pair"],
),
attack: Attack(color: Srgba(Srgba(red: 0.929, green: 0.557, blue: 0.576, alpha: 1.000))),
deck: Deck(cards: ["step", "step", "pair"]),
),

"pink": Actor(
// TODO: If character select screen is implemented, uncomment this and include logic to
// avoid spawning enemies that look like the player (aka same key).
/*"pink": Actor(
name: "Linus",
texture: "image/actor/pink.png",
Expand All @@ -76,13 +62,9 @@
],
),
attack: Attack(
color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000)),
),
deck: Deck(
cards: ["step", "pair", "pair"],
),
),
attack: Attack(color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000))),
deck: Deck(cards: ["step", "pair", "pair"]),
),*/

"green": Actor(
name: "Jade",
Expand All @@ -100,12 +82,8 @@
],
),

attack: Attack(
color: Srgba(Srgba(red: 0.557, green: 0.722, blue: 0.518, alpha: 1.000)),
),
deck: Deck(
cards: ["pair"],
),
attack: Attack(color: Srgba(Srgba(red: 0.557, green: 0.722, blue: 0.518, alpha: 1.000))),
deck: Deck(cards: ["pair"]),
),

"blue": Actor(
Expand All @@ -124,12 +102,8 @@
],
),

attack: Attack(
color: Srgba(Srgba(red: 0.424, green: 0.694, blue: 0.725, alpha: 1.000)),
),
deck: Deck(
cards: ["step", "pair"],
),
attack: Attack(color: Srgba(Srgba(red: 0.424, green: 0.694, blue: 0.725, alpha: 1.000))),
deck: Deck(cards: ["step", "pair"]),
),

"purple": Actor(
Expand All @@ -148,12 +122,8 @@
],
),

attack: Attack(
color: Srgba(Srgba(red: 0.694, green: 0.529, blue: 0.788, alpha: 1.000)),
),
deck: Deck(
cards: ["step"],
),
attack: Attack(color: Srgba(Srgba(red: 0.694, green: 0.529, blue: 0.788, alpha: 1.000))),
deck: Deck(cards: ["step"]),
),
},
)
154 changes: 128 additions & 26 deletions assets/config/card.ron
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,32 @@
),
},
card_icon_map: {
// TODO: Long-duration notes are stronger versions of short-duration notes (more damage and knockback, maybe less speed).
"step": CardIcon(texture: "image/card/icon/step.png"),
"splits": CardIcon(texture: "image/card/icon/splits.png"),
"ballet": CardIcon(texture: "image/card/icon/ballet.png"),
"moonwalk": CardIcon(texture: "image/card/icon/moonwalk.png"),
"cartwheel": CardIcon(texture: "image/card/icon/cartwheel.png"),

"eighth_note": CardIcon(texture: "image/card/icon/eighth_note.png"),
//"quarter_note": CardIcon(texture: "image/card/icon/quarter_note.png"),
//"half_note": CardIcon(texture: "image/card/icon/half_note.png"),
//"whole_note": CardIcon(texture: "image/card/icon/whole_note.png"),
"quarter_note": CardIcon(texture: "image/card/icon/quarter_note.png"),
"half_note": CardIcon(texture: "image/card/icon/half_note.png"),
"whole_note": CardIcon(texture: "image/card/icon/whole_note.png"),
"pair": CardIcon(texture: "image/card/icon/pair.png"),
"major_chord": CardIcon(texture: "image/card/icon/major_chord.png"),
"cluster_chord": CardIcon(texture: "image/card/icon/cluster_chord.png"),
"rest": CardIcon(texture: "image/card/icon/rest.png"),
//"triplet": CardIcon(texture: "image/card/icon/triplet.png"),
"chord": CardIcon(texture: "image/card/icon/chord.png"),
"cluster": CardIcon(texture: "image/card/icon/cluster.png"),

"eighth_rest": CardIcon(texture: "image/card/icon/eighth_rest.png"),
"quarter_rest": CardIcon(texture: "image/card/icon/quarter_rest.png"),
"half_rest": CardIcon(texture: "image/card/icon/half_rest.png"),
"whole_rest": CardIcon(texture: "image/card/icon/whole_rest.png"),

"sharp_flat": CardIcon(texture: "image/card/icon/sharp_flat.png"),
"natural": CardIcon(texture: "image/card/icon/natural.png"),
"fermata": CardIcon(texture: "image/card/icon/fermata.png"),
"bass_clef": CardIcon(texture: "image/card/icon/bass_clef.png"),

"step": CardIcon(texture: "image/card/icon/step.png"),
"splits": CardIcon(texture: "image/card/icon/splits.png"),
"ballet": CardIcon(texture: "image/card/icon/ballet.png"),
"moonwalk": CardIcon(texture: "image/card/icon/moonwalk.png"),
},
// TODO: Write descriptions.
card_map: {
"step": Card(
name: "Basic Step",
Expand All @@ -69,47 +76,142 @@
// TODO: "Movement card" sfx.
play_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
action: Step,
action_config: CardActionConfig(
action_modifier: CardActionModifier(
remove_on_beat: 8,
),
),
"splits": Card(
/*"splits": Card(
name: "Splits",
description: "Split in two!",
background: "blue",
icon: "splits",
// TODO: "Movement card" sfx.
play_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
action_config: CardActionConfig(
action_modifier: CardActionModifier(
remove_on_beat: 16,
),
),*/
// TODO: Add other movement cards.

"eighth_note": Card(
name: "Eighth Note",
description: "",
background: "pink",
icon: "eighth_note",

action: Attack,
action_modifier: CardActionModifier(
remove_on_beat: 0,
attack: Attack(projectile: Some("eighth_note")),
),
),
"quarter_note": Card(
name: "Quarter Note",
description: "",
background: "pink",
icon: "quarter_note",

action: Attack,
action_modifier: CardActionModifier(
remove_on_beat: 0,
attack: Attack(projectile: Some("quarter_note")),
),
),
"half_note": Card(
name: "Half Note",
description: "",
background: "pink",
icon: "half_note",

action: Attack,
action_modifier: CardActionModifier(
remove_on_beat: 0,
attack: Attack(projectile: Some("half_note")),
),
),
"whole_note": Card(
name: "Whole Note",
description: "",
background: "pink",
icon: "whole_note",

action: Attack,
action_modifier: CardActionModifier(
remove_on_beat: 0,
attack: Attack(projectile: Some("whole_note")),
),
),
"pair": Card(
name: "Pair",
description: "Two beats, rapid fire!",
background: "pink",
icon: "pair",

action: DoubleBeat,
action_config: CardActionConfig(
action: Attack,
action_modifier: CardActionModifier(
remove_on_beat: 4,
attack: Attack (
power: 2.0,
force: 4.0,
projectile: Some("quarter_note"),
),
attack: Attack(projectile: Some("eighth_note")),
),
),
"major_chord": Card(
/*"major_chord": Card(
name: "Major Chord",
description: "Notes that move apart synchronously",
description: "",
background: "pink",
icon: "chord",
action_modifier: CardActionModifier(
remove_on_beat: 16,
attack: Attack(projectile: Some("eighth_note")),
),
),
"cluster_chord": Card(
name: "Cluster Chord",
description: "",
background: "pink",
icon: "major_chord",
icon: "chord",
action_config: CardActionConfig(
action_modifier: CardActionModifier(
remove_on_beat: 16,
attack: Attack(projectile: Some("whole_note")),
),
),*/

"eighth_rest": Card(
name: "Eighth Rest",
description: "Heal a little bit",
background: "green",
icon: "eighth_rest",

action: Heal,
action_modifier: CardActionModifier(heal_flat: 5),
),
"quarter_rest": Card(
name: "Quarter Rest",
description: "Heal 25% health",
background: "green",
icon: "quarter_rest",

action: Heal,
action_modifier: CardActionModifier(heal_percent: 25),
),
"half_rest": Card(
name: "Half Rest",
description: "Heal 50% health",
background: "green",
icon: "half_rest",

action: Heal,
action_modifier: CardActionModifier(heal_percent: 50),
),
"whole_rest": Card(
name: "Whole Rest",
description: "Heal 100% health",
background: "green",
icon: "whole_rest",

action: Heal,
action_modifier: CardActionModifier(heal_percent: 100),
),
}
)
41 changes: 34 additions & 7 deletions assets/config/projectile.ron
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
(
// TODO: Tune stats for each projectile.
projectiles: {
"eighth_note": Projectile(
name: "Eighth Note",

texture: "image/projectile/eighth_note.png",
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
spawn_sfx_volume: 0.5,

lifetime: 1,
radius: 3.0,
speed: 20.0,
damage: 2.0,
knockback: 0.5,
),
"quarter_note": Projectile(
name: "Quarter Note",

Expand All @@ -13,18 +27,31 @@
damage: 2.0,
knockback: 0.5,
),
"double_beat": Projectile(
name: "Double Beat",
"half_note": Projectile(
name: "Half Note",

texture: "image/projectile/quarter_note.png",
texture: "image/projectile/half_note.png",
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
spawn_sfx_volume: 0.5,

lifetime: 2,
lifetime: 1,
radius: 3.0,
speed: 25.0,
damage: 3.0,
knockback: 0.6,
speed: 20.0,
damage: 2.0,
knockback: 0.5,
),
"whole_note": Projectile(
name: "Whole Note",

texture: "image/projectile/whole_note.png",
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
spawn_sfx_volume: 0.5,

lifetime: 1,
radius: 3.0,
speed: 20.0,
damage: 2.0,
knockback: 0.5,
),
},
)
Binary file modified assets/image/card/background/backgrounds.aseprite
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file removed assets/image/card/icon/double_beat.png
Binary file not shown.
Binary file added assets/image/card/icon/eighth_rest.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 assets/image/card/icon/half_note.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 assets/image/card/icon/half_rest.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 modified assets/image/card/icon/icons.aseprite
Binary file not shown.
Binary file added assets/image/card/icon/quarter_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/image/card/icon/whole_note.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 assets/image/card/icon/whole_rest.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 assets/image/projectile/eighth_note.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 assets/image/projectile/half_note.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 assets/image/projectile/projectiles.aseprite
Binary file not shown.
Binary file removed assets/image/projectile/quarter_note.aseprite
Binary file not shown.
Binary file added assets/image/projectile/whole_note.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 8bdc26f

Please sign in to comment.