-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(WIP): improve RPG demo to modernise scripting syntax
fix(Sprites): Sprites were rendering on every layer instead of just their assigned one feat(Sprites): new empty_sprites function to delete all sprites (optionally on a layer) fix(Conditions): Allow equality condition with only one parameter (useful for hacky code) chore(demo): remove hacky buttons system for displaying enemies and player and replace it with dynamic sprites chore(demo): use custom yaml file to store data about possible enemies and classes
- Loading branch information
Showing
16 changed files
with
457 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1 @@ | ||
buttons: | ||
goblin: | ||
enabled: false | ||
background: rpg/img/enemies/goblin.webp | ||
position: | ||
left: 100 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
slime: | ||
enabled: false | ||
background: rpg/img/enemies/slime.webp | ||
position: | ||
left: 150 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
skeleton: | ||
enabled: false | ||
background: rpg/img/enemies/skeleton.webp | ||
position: | ||
left: 100 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
wizard: | ||
enabled: false | ||
background: rpg/img/players/wizard.webp | ||
position: | ||
left: 600 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
rogue: | ||
enabled: false | ||
background: rpg/img/players/wizard.webp | ||
position: | ||
left: 600 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
warrior: | ||
enabled: false | ||
background: rpg/img/players/wizard.webp | ||
position: | ||
left: 600 | ||
top: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
go_left: | ||
enabled: false | ||
background: rpg/img/ui/left.webp | ||
position: | ||
left: 100 | ||
top: 250 | ||
width: 96 | ||
height: 96 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
action: choose_left | ||
go_right: | ||
enabled: false | ||
background: rpg/img/ui/right.webp | ||
position: | ||
left: 770 | ||
top: 250 | ||
width: 96 | ||
height: 96 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
action: choose_right | ||
go_front: | ||
enabled: false | ||
background: rpg/img/ui/front.webp | ||
position: | ||
left: 440 | ||
top: 120 | ||
width: 96 | ||
height: 96 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
action: choose_front | ||
buttons: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
wizard: | ||
stats: | ||
maxHp: 30 | ||
maxMp: 60 | ||
def: 1 | ||
spd: 1 | ||
strength: 1 | ||
agility: 2 | ||
intelligence: 3 | ||
spells: | ||
fireball: | ||
cost: 10 | ||
heal: | ||
cost: 12 | ||
sprite: | ||
background: rpg/img/players/wizard.webp | ||
x: 600 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
rogue: | ||
stats: | ||
maxHp: 50 | ||
maxMp: 30 | ||
def: 2 | ||
spd: 3 | ||
strength: 2 | ||
agility: 3 | ||
intelligence: 1 | ||
sprite: | ||
background: rpg/img/players/wizard.webp | ||
x: 600 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
warrior: | ||
stats: | ||
maxHp: 100 | ||
maxMp: 15 | ||
def: 3 | ||
spd: 2 | ||
strength: 2 | ||
agility: 3 | ||
intelligence: 1 | ||
skills: | ||
whirlwind: | ||
cost: 12 | ||
sprite: | ||
background: rpg/img/players/wizard.webp | ||
x: 600 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
enemies: | ||
- id: goblin | ||
name: Goblin | ||
stats: | ||
hp: 3 | ||
str: 2 | ||
def: 1 | ||
spd: 3 | ||
sprite: | ||
background: rpg/img/enemies/goblin.webp | ||
x: 100 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
- id: slime | ||
name: Slime | ||
stats: | ||
hp: 10 | ||
str: 1 | ||
def: 1 | ||
spd: 1 | ||
sprite: | ||
background: rpg/img/enemies/slime.webp | ||
x: 150 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 | ||
- id: skeleton | ||
name: Skeleton | ||
stats: | ||
hp: 5 | ||
str: 2 | ||
def: 2 | ||
spd: 2 | ||
sprite: | ||
background: rpg/img/enemies/skeleton.webp | ||
x: 100 | ||
y: 600 | ||
width: 255 | ||
height: 512 | ||
anchor: | ||
x: 0.5 | ||
y: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
battle_rooms: | ||
- screen: battle_grass | ||
id: grass | ||
- screen: battle_cave | ||
id: cave | ||
- screen: battle_dungeon | ||
id: dungeon | ||
dungeon_rooms: | ||
FRL: | ||
screen: dungeon_FRL | ||
directions: | ||
left: true | ||
right: true | ||
front: true | ||
F: | ||
screen: dungeon_F | ||
directions: | ||
front: true | ||
FL: | ||
screen: dungeon_FL | ||
directions: | ||
front: true | ||
left: true | ||
FR: | ||
screen: dungeon_FR | ||
directions: | ||
front: true | ||
right: true | ||
LR: | ||
screen: dungeon_LR | ||
directions: | ||
left: true | ||
right: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
go_left: | ||
background: rpg/img/ui/left.webp | ||
x: 100 | ||
y: 250 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
onClick: choose_left | ||
go_right: | ||
enabled: false | ||
background: rpg/img/ui/right.webp | ||
x: 770 | ||
y: 250 | ||
width: 96 | ||
height: 96 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
onClick: choose_right | ||
go_front: | ||
enabled: false | ||
background: rpg/img/ui/front.webp | ||
x: 440 | ||
y: 120 | ||
width: 96 | ||
height: 96 | ||
anchor: | ||
x: 0.5 | ||
y: 0.5 | ||
onClick: choose_front |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import rpg from './scripts/rpg.narrat'; | ||
import battle from './scripts/battle.narrat'; | ||
import levels from './scripts/levels.narrat'; | ||
|
||
export default [rpg]; | ||
export default [rpg, battle, levels]; |
Oops, something went wrong.