-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Implement isometric level support
- Loading branch information
1 parent
297f146
commit acd8ec0
Showing
4 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,48 @@ | ||
// Build levels with addIsometricLevel() | ||
|
||
// Start game | ||
kaboom() | ||
|
||
// Load assets | ||
loadSprite("grass", "/sprites/iso_grass.png") | ||
|
||
gravity(0) | ||
|
||
const level = addIsometricLevel([ | ||
// Design the level layout with symbols | ||
"@", | ||
"@@", | ||
"@@@", | ||
"@@@@", | ||
"@@@@@", | ||
"@@@@@@", | ||
"@@@@@@@", | ||
"@@@@@@@@", | ||
"@@@@@@@@@", | ||
"@@@@@@@@@@", | ||
"@@@@@@@@@@@", | ||
"@@@@@@@@@@@@", | ||
"@@@@@@@@@@@@@", | ||
"@@@@@@@@@@@@", | ||
"@@@@@@@@@@@", | ||
"@@@@@@@@@@", | ||
"@@@@@@@@@", | ||
"@@@@@@@@", | ||
"@@@@@@@", | ||
"@@@@@@", | ||
"@@@@@", | ||
"@@@@", | ||
"@@@", | ||
"@@", | ||
"@", | ||
], { | ||
// The size of each grid | ||
tileWidth: 144, | ||
tileHeight: 71, | ||
// The position of the top left block | ||
// pos: vec2(100, 200), | ||
// Define what each symbol means (in components) | ||
"@": () => [ | ||
sprite("grass"), | ||
], | ||
}) |
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