diff --git a/users/dafluffypotato/ninja_game/README.md b/users/dafluffypotato/ninja_game/README.md new file mode 100644 index 0000000..bf5e9b9 --- /dev/null +++ b/users/dafluffypotato/ninja_game/README.md @@ -0,0 +1,13 @@ +The ninja game from DaFluffyPotato + +- [video](https://www.youtube.com/watch?v=2gABYM5M0ww) + +Additional changes were made to make it run in the browser. + +- All the audio files were converted from .wav to .ogg +- Asyncio sleep was inserted in the main loop. +- Moved the screen to global scope and added a press any key screen before loading the audio. + +``` +python -m pygbag --PYBUILD 3.12 --template noctx.tmpl . +``` diff --git a/users/dafluffypotato/ninja_game/data/images/background.png b/users/dafluffypotato/ninja_game/data/images/background.png new file mode 100644 index 0000000..f31f0a9 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/background.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/clouds/cloud_1.png b/users/dafluffypotato/ninja_game/data/images/clouds/cloud_1.png new file mode 100644 index 0000000..5e0af72 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/clouds/cloud_1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/clouds/cloud_2.png b/users/dafluffypotato/ninja_game/data/images/clouds/cloud_2.png new file mode 100644 index 0000000..6d86f79 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/clouds/cloud_2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/00.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/00.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/00.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/01.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/01.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/01.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/02.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/02.png new file mode 100644 index 0000000..4395a2b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/02.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/03.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/03.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/03.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/04.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/04.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/04.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/05.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/05.png new file mode 100644 index 0000000..5f88abb Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/05.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/06.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/06.png new file mode 100644 index 0000000..e3d9967 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/06.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/07.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/07.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/07.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/08.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/08.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/08.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/09.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/09.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/09.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/10.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/10.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/10.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/11.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/11.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/11.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/12.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/12.png new file mode 100644 index 0000000..5f88abb Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/12.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/13.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/13.png new file mode 100644 index 0000000..e3d9967 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/13.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/14.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/14.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/14.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/15.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/15.png new file mode 100644 index 0000000..26b3afc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/idle/15.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/0.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/0.png new file mode 100644 index 0000000..99b54bb Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/1.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/1.png new file mode 100644 index 0000000..47a8ca0 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/2.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/2.png new file mode 100644 index 0000000..62369b0 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/3.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/3.png new file mode 100644 index 0000000..74f84ea Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/4.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/4.png new file mode 100644 index 0000000..8786a01 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/4.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/5.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/5.png new file mode 100644 index 0000000..c47d31d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/5.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/6.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/6.png new file mode 100644 index 0000000..ce4f1ad Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/6.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/7.png b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/7.png new file mode 100644 index 0000000..49249de Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/enemy/run/7.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player.png b/users/dafluffypotato/ninja_game/data/images/entities/player.png new file mode 100644 index 0000000..c1cde8f Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/00.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/00.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/00.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/01.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/01.png new file mode 100644 index 0000000..e90432a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/01.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/02.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/02.png new file mode 100644 index 0000000..e4348bc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/02.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/03.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/03.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/03.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/04.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/04.png new file mode 100644 index 0000000..ebb6fcf Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/04.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/05.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/05.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/05.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/06.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/06.png new file mode 100644 index 0000000..5e3a006 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/06.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/07.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/07.png new file mode 100644 index 0000000..e90432a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/07.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/08.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/08.png new file mode 100644 index 0000000..6d4b75a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/08.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/09.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/09.png new file mode 100644 index 0000000..9a15060 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/09.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/10.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/10.png new file mode 100644 index 0000000..ebb6fcf Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/10.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/11.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/11.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/11.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/12.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/12.png new file mode 100644 index 0000000..e90432a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/12.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/13.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/13.png new file mode 100644 index 0000000..5e3a006 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/13.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/14.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/14.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/14.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/15.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/15.png new file mode 100644 index 0000000..ebb6fcf Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/15.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/16.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/16.png new file mode 100644 index 0000000..f18fb1d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/16.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/17.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/17.png new file mode 100644 index 0000000..5e3a006 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/17.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/18.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/18.png new file mode 100644 index 0000000..e90432a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/18.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/19.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/19.png new file mode 100644 index 0000000..6d4b75a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/19.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/20.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/20.png new file mode 100644 index 0000000..9a15060 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/20.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/idle/21.png b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/21.png new file mode 100644 index 0000000..ebb6fcf Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/idle/21.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/jump/0.png b/users/dafluffypotato/ninja_game/data/images/entities/player/jump/0.png new file mode 100644 index 0000000..5013f9b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/jump/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/0.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/0.png new file mode 100644 index 0000000..a47a3ff Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/1.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/1.png new file mode 100644 index 0000000..08e443b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/2.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/2.png new file mode 100644 index 0000000..ed931bb Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/3.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/3.png new file mode 100644 index 0000000..30b1a7c Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/4.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/4.png new file mode 100644 index 0000000..d27232d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/4.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/5.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/5.png new file mode 100644 index 0000000..ac85b81 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/5.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/6.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/6.png new file mode 100644 index 0000000..1a97f30 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/6.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/run/7.png b/users/dafluffypotato/ninja_game/data/images/entities/player/run/7.png new file mode 100644 index 0000000..92fde47 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/run/7.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/slide/0.png b/users/dafluffypotato/ninja_game/data/images/entities/player/slide/0.png new file mode 100644 index 0000000..20f4287 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/slide/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/entities/player/wall_slide/0.png b/users/dafluffypotato/ninja_game/data/images/entities/player/wall_slide/0.png new file mode 100644 index 0000000..a9ec0c5 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/entities/player/wall_slide/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/gun.png b/users/dafluffypotato/ninja_game/data/images/gun.png new file mode 100644 index 0000000..5365bbc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/gun.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/00.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/00.png new file mode 100644 index 0000000..3f83440 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/00.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/01.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/01.png new file mode 100644 index 0000000..91c4064 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/01.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/02.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/02.png new file mode 100644 index 0000000..2d75af4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/02.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/03.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/03.png new file mode 100644 index 0000000..f8ac4e8 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/03.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/04.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/04.png new file mode 100644 index 0000000..0de7076 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/04.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/05.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/05.png new file mode 100644 index 0000000..16bf760 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/05.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/06.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/06.png new file mode 100644 index 0000000..9087337 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/06.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/07.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/07.png new file mode 100644 index 0000000..62d726c Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/07.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/08.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/08.png new file mode 100644 index 0000000..36b4f20 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/08.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/09.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/09.png new file mode 100644 index 0000000..20ba32b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/09.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/10.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/10.png new file mode 100644 index 0000000..edb3e91 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/10.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/11.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/11.png new file mode 100644 index 0000000..fa48b28 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/11.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/12.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/12.png new file mode 100644 index 0000000..a7168cc Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/12.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/13.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/13.png new file mode 100644 index 0000000..f6a3fb4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/13.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/14.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/14.png new file mode 100644 index 0000000..f6a3fb4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/14.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/15.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/15.png new file mode 100644 index 0000000..f6a3fb4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/15.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/16.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/16.png new file mode 100644 index 0000000..f6a3fb4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/16.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/leaf/17.png b/users/dafluffypotato/ninja_game/data/images/particles/leaf/17.png new file mode 100644 index 0000000..f6a3fb4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/leaf/17.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/particle/0.png b/users/dafluffypotato/ninja_game/data/images/particles/particle/0.png new file mode 100644 index 0000000..f07f9e0 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/particle/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/particle/1.png b/users/dafluffypotato/ninja_game/data/images/particles/particle/1.png new file mode 100644 index 0000000..4dee623 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/particle/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/particle/2.png b/users/dafluffypotato/ninja_game/data/images/particles/particle/2.png new file mode 100644 index 0000000..20b6a00 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/particle/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/particles/particle/3.png b/users/dafluffypotato/ninja_game/data/images/particles/particle/3.png new file mode 100644 index 0000000..b14a0f7 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/particles/particle/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/projectile.png b/users/dafluffypotato/ninja_game/data/images/projectile.png new file mode 100644 index 0000000..b49149a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/projectile.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/decor/0.png b/users/dafluffypotato/ninja_game/data/images/tiles/decor/0.png new file mode 100644 index 0000000..d42df5a Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/decor/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/decor/1.png b/users/dafluffypotato/ninja_game/data/images/tiles/decor/1.png new file mode 100644 index 0000000..9adb0d8 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/decor/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/decor/2.png b/users/dafluffypotato/ninja_game/data/images/tiles/decor/2.png new file mode 100644 index 0000000..d325cf4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/decor/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/decor/3.png b/users/dafluffypotato/ninja_game/data/images/tiles/decor/3.png new file mode 100644 index 0000000..da11059 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/decor/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/0.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/0.png new file mode 100644 index 0000000..3713f0b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/1.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/1.png new file mode 100644 index 0000000..b19b5ca Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/2.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/2.png new file mode 100644 index 0000000..78cdab8 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/3.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/3.png new file mode 100644 index 0000000..f145bb5 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/4.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/4.png new file mode 100644 index 0000000..bd45f41 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/4.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/5.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/5.png new file mode 100644 index 0000000..586d9c0 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/5.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/6.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/6.png new file mode 100644 index 0000000..43ba3ee Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/6.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/7.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/7.png new file mode 100644 index 0000000..c648b30 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/7.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/grass/8.png b/users/dafluffypotato/ninja_game/data/images/tiles/grass/8.png new file mode 100644 index 0000000..586d9c0 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/grass/8.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/0.png b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/0.png new file mode 100644 index 0000000..e3aa1f4 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/1.png b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/1.png new file mode 100644 index 0000000..9c1b19c Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/2.png b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/2.png new file mode 100644 index 0000000..9516535 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/large_decor/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/spawners/0.png b/users/dafluffypotato/ninja_game/data/images/tiles/spawners/0.png new file mode 100644 index 0000000..9d4b9e2 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/spawners/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/spawners/1.png b/users/dafluffypotato/ninja_game/data/images/tiles/spawners/1.png new file mode 100644 index 0000000..bcda7a8 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/spawners/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/0.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/0.png new file mode 100644 index 0000000..10b426f Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/0.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/1.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/1.png new file mode 100644 index 0000000..ecc86bd Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/1.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/2.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/2.png new file mode 100644 index 0000000..78ec73b Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/2.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/3.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/3.png new file mode 100644 index 0000000..78239cb Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/3.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/4.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/4.png new file mode 100644 index 0000000..9068b2e Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/4.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/5.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/5.png new file mode 100644 index 0000000..736d6ce Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/5.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/6.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/6.png new file mode 100644 index 0000000..e4ec6b9 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/6.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/7.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/7.png new file mode 100644 index 0000000..7380583 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/7.png differ diff --git a/users/dafluffypotato/ninja_game/data/images/tiles/stone/8.png b/users/dafluffypotato/ninja_game/data/images/tiles/stone/8.png new file mode 100644 index 0000000..736d6ce Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/images/tiles/stone/8.png differ diff --git a/users/dafluffypotato/ninja_game/data/maps/0.json b/users/dafluffypotato/ninja_game/data/maps/0.json new file mode 100644 index 0000000..457a22d --- /dev/null +++ b/users/dafluffypotato/ninja_game/data/maps/0.json @@ -0,0 +1 @@ +{"tilemap": {"9;12": {"type": "grass", "variant": 2, "pos": [9, 12]}, "9;13": {"type": "grass", "variant": 8, "pos": [9, 13]}, "10;13": {"type": "grass", "variant": 1, "pos": [10, 13]}, "11;13": {"type": "grass", "variant": 1, "pos": [11, 13]}, "12;13": {"type": "grass", "variant": 1, "pos": [12, 13]}, "13;13": {"type": "grass", "variant": 1, "pos": [13, 13]}, "14;13": {"type": "grass", "variant": 1, "pos": [14, 13]}, "15;13": {"type": "grass", "variant": 1, "pos": [15, 13]}, "15;14": {"type": "grass", "variant": 8, "pos": [15, 14]}, "14;14": {"type": "grass", "variant": 8, "pos": [14, 14]}, "13;14": {"type": "grass", "variant": 8, "pos": [13, 14]}, "12;14": {"type": "grass", "variant": 8, "pos": [12, 14]}, "11;14": {"type": "grass", "variant": 8, "pos": [11, 14]}, "10;14": {"type": "grass", "variant": 8, "pos": [10, 14]}, "9;14": {"type": "grass", "variant": 8, "pos": [9, 14]}, "8;14": {"type": "grass", "variant": 8, "pos": [8, 14]}, "7;14": {"type": "grass", "variant": 8, "pos": [7, 14]}, "8;15": {"type": "grass", "variant": 5, "pos": [8, 15]}, "9;15": {"type": "grass", "variant": 5, "pos": [9, 15]}, "10;15": {"type": "grass", "variant": 5, "pos": [10, 15]}, "11;15": {"type": "grass", "variant": 5, "pos": [11, 15]}, "12;15": {"type": "grass", "variant": 5, "pos": [12, 15]}, "13;15": {"type": "grass", "variant": 5, "pos": [13, 15]}, "14;15": {"type": "grass", "variant": 5, "pos": [14, 15]}, "15;15": {"type": "grass", "variant": 5, "pos": [15, 15]}, "7;15": {"type": "grass", "variant": 6, "pos": [7, 15]}, "8;13": {"type": "grass", "variant": 8, "pos": [8, 13]}, "7;13": {"type": "grass", "variant": 8, "pos": [7, 13]}, "7;12": {"type": "grass", "variant": 8, "pos": [7, 12]}, "8;12": {"type": "grass", "variant": 8, "pos": [8, 12]}, "7;11": {"type": "grass", "variant": 1, "pos": [7, 11]}, "8;11": {"type": "grass", "variant": 2, "pos": [8, 11]}, "6;11": {"type": "grass", "variant": 1, "pos": [6, 11]}, "5;11": {"type": "grass", "variant": 1, "pos": [5, 11]}, "4;11": {"type": "grass", "variant": 1, "pos": [4, 11]}, "3;11": {"type": "grass", "variant": 1, "pos": [3, 11]}, "2;11": {"type": "grass", "variant": 1, "pos": [2, 11]}, "1;11": {"type": "grass", "variant": 1, "pos": [1, 11]}, "1;12": {"type": "grass", "variant": 8, "pos": [1, 12]}, "2;12": {"type": "grass", "variant": 8, "pos": [2, 12]}, "2;13": {"type": "grass", "variant": 8, "pos": [2, 13]}, "3;13": {"type": "grass", "variant": 8, "pos": [3, 13]}, "4;13": {"type": "grass", "variant": 8, "pos": [4, 13]}, "4;14": {"type": "grass", "variant": 5, "pos": [4, 14]}, "5;14": {"type": "grass", "variant": 5, "pos": [5, 14]}, "6;14": {"type": "grass", "variant": 5, "pos": [6, 14]}, "3;14": {"type": "grass", "variant": 5, "pos": [3, 14]}, "2;14": {"type": "grass", "variant": 5, "pos": [2, 14]}, "1;14": {"type": "grass", "variant": 6, "pos": [1, 14]}, "1;13": {"type": "grass", "variant": 8, "pos": [1, 13]}, "3;12": {"type": "grass", "variant": 8, "pos": [3, 12]}, "4;12": {"type": "grass", "variant": 8, "pos": [4, 12]}, "5;12": {"type": "grass", "variant": 8, "pos": [5, 12]}, "6;12": {"type": "grass", "variant": 8, "pos": [6, 12]}, "6;13": {"type": "grass", "variant": 8, "pos": [6, 13]}, "5;13": {"type": "grass", "variant": 8, "pos": [5, 13]}, "0;13": {"type": "grass", "variant": 6, "pos": [0, 13]}, "0;12": {"type": "grass", "variant": 7, "pos": [0, 12]}, "0;11": {"type": "grass", "variant": 0, "pos": [0, 11]}, "16;13": {"type": "grass", "variant": 8, "pos": [16, 13]}, "16;12": {"type": "grass", "variant": 0, "pos": [16, 12]}, "17;12": {"type": "grass", "variant": 8, "pos": [17, 12]}, "17;11": {"type": "grass", "variant": 0, "pos": [17, 11]}, "18;11": {"type": "grass", "variant": 8, "pos": [18, 11]}, "18;10": {"type": "grass", "variant": 0, "pos": [18, 10]}, "19;10": {"type": "grass", "variant": 1, "pos": [19, 10]}, "20;10": {"type": "grass", "variant": 1, "pos": [20, 10]}, "16;15": {"type": "grass", "variant": 5, "pos": [16, 15]}, "17;15": {"type": "grass", "variant": 4, "pos": [17, 15]}, "18;14": {"type": "grass", "variant": 5, "pos": [18, 14]}, "19;14": {"type": "grass", "variant": 5, "pos": [19, 14]}, "20;14": {"type": "grass", "variant": 5, "pos": [20, 14]}, "21;14": {"type": "grass", "variant": 5, "pos": [21, 14]}, "22;14": {"type": "grass", "variant": 4, "pos": [22, 14]}, "22;13": {"type": "grass", "variant": 8, "pos": [22, 13]}, "23;13": {"type": "grass", "variant": 5, "pos": [23, 13]}, "24;13": {"type": "grass", "variant": 4, "pos": [24, 13]}, "24;12": {"type": "grass", "variant": 3, "pos": [24, 12]}, "24;11": {"type": "grass", "variant": 3, "pos": [24, 11]}, "24;10": {"type": "grass", "variant": 2, "pos": [24, 10]}, "23;10": {"type": "grass", "variant": 1, "pos": [23, 10]}, "22;10": {"type": "grass", "variant": 1, "pos": [22, 10]}, "21;10": {"type": "grass", "variant": 1, "pos": [21, 10]}, "23;11": {"type": "grass", "variant": 8, "pos": [23, 11]}, "23;12": {"type": "grass", "variant": 8, "pos": [23, 12]}, "22;12": {"type": "grass", "variant": 8, "pos": [22, 12]}, "21;12": {"type": "grass", "variant": 8, "pos": [21, 12]}, "21;11": {"type": "grass", "variant": 8, "pos": [21, 11]}, "20;11": {"type": "grass", "variant": 8, "pos": [20, 11]}, "19;11": {"type": "grass", "variant": 8, "pos": [19, 11]}, "18;12": {"type": "grass", "variant": 8, "pos": [18, 12]}, "17;13": {"type": "grass", "variant": 8, "pos": [17, 13]}, "16;14": {"type": "grass", "variant": 8, "pos": [16, 14]}, "18;13": {"type": "grass", "variant": 8, "pos": [18, 13]}, "19;13": {"type": "grass", "variant": 8, "pos": [19, 13]}, "19;12": {"type": "grass", "variant": 8, "pos": [19, 12]}, "20;12": {"type": "grass", "variant": 8, "pos": [20, 12]}, "22;11": {"type": "grass", "variant": 8, "pos": [22, 11]}, "21;13": {"type": "grass", "variant": 8, "pos": [21, 13]}, "20;13": {"type": "grass", "variant": 8, "pos": [20, 13]}, "17;14": {"type": "grass", "variant": 8, "pos": [17, 14]}, "19;4": {"type": "grass", "variant": 1, "pos": [19, 4]}, "18;4": {"type": "grass", "variant": 1, "pos": [18, 4]}, "17;4": {"type": "grass", "variant": 0, "pos": [17, 4]}, "17;5": {"type": "grass", "variant": 8, "pos": [17, 5]}, "16;5": {"type": "grass", "variant": 0, "pos": [16, 5]}, "16;6": {"type": "grass", "variant": 6, "pos": [16, 6]}, "17;6": {"type": "grass", "variant": 5, "pos": [17, 6]}, "18;6": {"type": "grass", "variant": 5, "pos": [18, 6]}, "19;6": {"type": "grass", "variant": 4, "pos": [19, 6]}, "19;5": {"type": "grass", "variant": 8, "pos": [19, 5]}, "20;5": {"type": "grass", "variant": 4, "pos": [20, 5]}, "20;4": {"type": "grass", "variant": 2, "pos": [20, 4]}, "18;5": {"type": "grass", "variant": 8, "pos": [18, 5]}, "8;5": {"type": "grass", "variant": 2, "pos": [8, 5]}, "7;5": {"type": "grass", "variant": 1, "pos": [7, 5]}, "6;5": {"type": "grass", "variant": 0, "pos": [6, 5]}, "6;6": {"type": "grass", "variant": 6, "pos": [6, 6]}, "7;6": {"type": "grass", "variant": 8, "pos": [7, 6]}, "7;7": {"type": "grass", "variant": 6, "pos": [7, 7]}, "8;7": {"type": "grass", "variant": 5, "pos": [8, 7]}, "9;7": {"type": "grass", "variant": 4, "pos": [9, 7]}, "9;6": {"type": "grass", "variant": 2, "pos": [9, 6]}, "8;6": {"type": "grass", "variant": 8, "pos": [8, 6]}, "26;8": {"type": "stone", "variant": 0, "pos": [26, 8]}, "26;9": {"type": "stone", "variant": 7, "pos": [26, 9]}, "26;10": {"type": "stone", "variant": 7, "pos": [26, 10]}, "26;11": {"type": "stone", "variant": 6, "pos": [26, 11]}, "27;12": {"type": "stone", "variant": 7, "pos": [27, 12]}, "27;13": {"type": "stone", "variant": 6, "pos": [27, 13]}, "28;13": {"type": "stone", "variant": 5, "pos": [28, 13]}, "29;13": {"type": "stone", "variant": 4, "pos": [29, 13]}, "29;12": {"type": "stone", "variant": 8, "pos": [29, 12]}, "30;12": {"type": "stone", "variant": 4, "pos": [30, 12]}, "30;11": {"type": "stone", "variant": 3, "pos": [30, 11]}, "30;10": {"type": "stone", "variant": 3, "pos": [30, 10]}, "30;9": {"type": "stone", "variant": 3, "pos": [30, 9]}, "30;8": {"type": "stone", "variant": 2, "pos": [30, 8]}, "27;8": {"type": "stone", "variant": 1, "pos": [27, 8]}, "28;9": {"type": "stone", "variant": 8, "pos": [28, 9]}, "28;10": {"type": "stone", "variant": 8, "pos": [28, 10]}, "28;11": {"type": "stone", "variant": 8, "pos": [28, 11]}, "28;8": {"type": "stone", "variant": 1, "pos": [28, 8]}, "29;9": {"type": "stone", "variant": 8, "pos": [29, 9]}, "29;8": {"type": "stone", "variant": 1, "pos": [29, 8]}, "29;10": {"type": "stone", "variant": 8, "pos": [29, 10]}, "29;11": {"type": "stone", "variant": 8, "pos": [29, 11]}, "28;12": {"type": "stone", "variant": 8, "pos": [28, 12]}, "27;11": {"type": "stone", "variant": 8, "pos": [27, 11]}, "27;10": {"type": "stone", "variant": 8, "pos": [27, 10]}, "27;9": {"type": "stone", "variant": 8, "pos": [27, 9]}, "23;9": {"type": "decor", "variant": 0, "pos": [23, 9]}, "20;9": {"type": "decor", "variant": 0, "pos": [20, 9]}, "13;12": {"type": "decor", "variant": 0, "pos": [13, 12]}, "7;10": {"type": "decor", "variant": 0, "pos": [7, 10]}, "5;10": {"type": "decor", "variant": 0, "pos": [5, 10]}, "2;10": {"type": "decor", "variant": 0, "pos": [2, 10]}, "7;4": {"type": "decor", "variant": 0, "pos": [7, 4]}, "18;3": {"type": "decor", "variant": 0, "pos": [18, 3]}, "8;4": {"type": "decor", "variant": 1, "pos": [8, 4]}, "17;3": {"type": "decor", "variant": 1, "pos": [17, 3]}, "22;9": {"type": "decor", "variant": 1, "pos": [22, 9]}, "15;12": {"type": "decor", "variant": 1, "pos": [15, 12]}, "10;12": {"type": "decor", "variant": 1, "pos": [10, 12]}, "8;10": {"type": "decor", "variant": 1, "pos": [8, 10]}, "3;10": {"type": "decor", "variant": 1, "pos": [3, 10]}, "1;10": {"type": "decor", "variant": 2, "pos": [1, 10]}, "6;10": {"type": "decor", "variant": 2, "pos": [6, 10]}, "12;12": {"type": "decor", "variant": 2, "pos": [12, 12]}, "9;5": {"type": "decor", "variant": 2, "pos": [9, 5]}, "19;3": {"type": "decor", "variant": 2, "pos": [19, 3]}, "21;9": {"type": "decor", "variant": 2, "pos": [21, 9]}, "19;9": {"type": "decor", "variant": 3, "pos": [19, 9]}, "6;4": {"type": "decor", "variant": 3, "pos": [6, 4]}, "27;7": {"type": "decor", "variant": 3, "pos": [27, 7]}}, "tile_size": 16, "offgrid": [{"type": "large_decor", "variant": 0, "pos": [457.0, 119.0]}, {"type": "large_decor", "variant": 0, "pos": [361.5, 151.0]}, {"type": "large_decor", "variant": 0, "pos": [70.0, 167.5]}, {"type": "large_decor", "variant": 0, "pos": [301.5, 55.0]}, {"type": "large_decor", "variant": 1, "pos": [278.5, 165.5]}, {"type": "large_decor", "variant": 1, "pos": [293.5, 149.0]}, {"type": "large_decor", "variant": 1, "pos": [133.0, 180.0]}, {"type": "large_decor", "variant": 1, "pos": [4.0, 165.5]}, {"type": "large_decor", "variant": 2, "pos": [25.0, 133.0]}, {"type": "large_decor", "variant": 2, "pos": [170.5, 166.0]}, {"type": "large_decor", "variant": 2, "pos": [239.0, 188.5]}, {"type": "large_decor", "variant": 2, "pos": [252.5, 37.0]}, {"type": "large_decor", "variant": 2, "pos": [118.0, 37.5]}, {"type": "large_decor", "variant": 2, "pos": [340.0, 117.0]}, {"type": "spawners", "variant": 0, "pos": [228.5, 192.5]}, {"type": "spawners", "variant": 1, "pos": [59.5, 159.5]}, {"type": "spawners", "variant": 1, "pos": [321.5, 142.0]}, {"type": "spawners", "variant": 1, "pos": [472.0, 111.0]}]} \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/data/maps/1.json b/users/dafluffypotato/ninja_game/data/maps/1.json new file mode 100644 index 0000000..4754cec --- /dev/null +++ b/users/dafluffypotato/ninja_game/data/maps/1.json @@ -0,0 +1 @@ +{"tilemap": {"8;8": {"type": "grass", "variant": 0, "pos": [8, 8]}, "8;9": {"type": "grass", "variant": 7, "pos": [8, 9]}, "8;10": {"type": "grass", "variant": 7, "pos": [8, 10]}, "8;11": {"type": "grass", "variant": 7, "pos": [8, 11]}, "8;12": {"type": "grass", "variant": 7, "pos": [8, 12]}, "8;13": {"type": "grass", "variant": 7, "pos": [8, 13]}, "8;14": {"type": "grass", "variant": 7, "pos": [8, 14]}, "8;15": {"type": "grass", "variant": 6, "pos": [8, 15]}, "9;15": {"type": "grass", "variant": 8, "pos": [9, 15]}, "9;16": {"type": "grass", "variant": 6, "pos": [9, 16]}, "10;16": {"type": "grass", "variant": 5, "pos": [10, 16]}, "11;16": {"type": "grass", "variant": 5, "pos": [11, 16]}, "12;16": {"type": "grass", "variant": 4, "pos": [12, 16]}, "12;15": {"type": "grass", "variant": 8, "pos": [12, 15]}, "13;15": {"type": "grass", "variant": 4, "pos": [13, 15]}, "13;14": {"type": "grass", "variant": 3, "pos": [13, 14]}, "13;13": {"type": "grass", "variant": 3, "pos": [13, 13]}, "13;12": {"type": "grass", "variant": 3, "pos": [13, 12]}, "13;11": {"type": "grass", "variant": 3, "pos": [13, 11]}, "13;10": {"type": "grass", "variant": 3, "pos": [13, 10]}, "13;9": {"type": "grass", "variant": 3, "pos": [13, 9]}, "13;8": {"type": "grass", "variant": 3, "pos": [13, 8]}, "13;7": {"type": "grass", "variant": 2, "pos": [13, 7]}, "12;7": {"type": "grass", "variant": 1, "pos": [12, 7]}, "11;7": {"type": "grass", "variant": 1, "pos": [11, 7]}, "10;7": {"type": "grass", "variant": 1, "pos": [10, 7]}, "10;8": {"type": "grass", "variant": 8, "pos": [10, 8]}, "9;8": {"type": "grass", "variant": 8, "pos": [9, 8]}, "9;7": {"type": "grass", "variant": 0, "pos": [9, 7]}, "11;8": {"type": "grass", "variant": 8, "pos": [11, 8]}, "12;8": {"type": "grass", "variant": 8, "pos": [12, 8]}, "12;9": {"type": "grass", "variant": 8, "pos": [12, 9]}, "12;10": {"type": "grass", "variant": 8, "pos": [12, 10]}, "12;11": {"type": "grass", "variant": 8, "pos": [12, 11]}, "12;12": {"type": "grass", "variant": 8, "pos": [12, 12]}, "12;13": {"type": "grass", "variant": 8, "pos": [12, 13]}, "12;14": {"type": "grass", "variant": 8, "pos": [12, 14]}, "11;14": {"type": "grass", "variant": 8, "pos": [11, 14]}, "11;15": {"type": "grass", "variant": 8, "pos": [11, 15]}, "10;15": {"type": "grass", "variant": 8, "pos": [10, 15]}, "10;14": {"type": "grass", "variant": 8, "pos": [10, 14]}, "10;13": {"type": "grass", "variant": 8, "pos": [10, 13]}, "9;14": {"type": "grass", "variant": 8, "pos": [9, 14]}, "9;13": {"type": "grass", "variant": 8, "pos": [9, 13]}, "9;12": {"type": "grass", "variant": 8, "pos": [9, 12]}, "9;11": {"type": "grass", "variant": 8, "pos": [9, 11]}, "9;10": {"type": "grass", "variant": 8, "pos": [9, 10]}, "9;9": {"type": "grass", "variant": 8, "pos": [9, 9]}, "10;9": {"type": "grass", "variant": 8, "pos": [10, 9]}, "10;10": {"type": "grass", "variant": 8, "pos": [10, 10]}, "11;10": {"type": "grass", "variant": 8, "pos": [11, 10]}, "11;11": {"type": "grass", "variant": 8, "pos": [11, 11]}, "11;12": {"type": "grass", "variant": 8, "pos": [11, 12]}, "10;12": {"type": "grass", "variant": 8, "pos": [10, 12]}, "10;11": {"type": "grass", "variant": 8, "pos": [10, 11]}, "11;13": {"type": "grass", "variant": 8, "pos": [11, 13]}, "11;9": {"type": "grass", "variant": 8, "pos": [11, 9]}, "16;10": {"type": "grass", "variant": 0, "pos": [16, 10]}, "17;10": {"type": "grass", "variant": 1, "pos": [17, 10]}, "18;10": {"type": "grass", "variant": 1, "pos": [18, 10]}, "19;10": {"type": "grass", "variant": 1, "pos": [19, 10]}, "20;10": {"type": "grass", "variant": 1, "pos": [20, 10]}, "21;10": {"type": "grass", "variant": 1, "pos": [21, 10]}, "22;10": {"type": "grass", "variant": 1, "pos": [22, 10]}, "23;10": {"type": "grass", "variant": 1, "pos": [23, 10]}, "24;10": {"type": "grass", "variant": 1, "pos": [24, 10]}, "25;10": {"type": "grass", "variant": 1, "pos": [25, 10]}, "26;10": {"type": "grass", "variant": 2, "pos": [26, 10]}, "26;11": {"type": "grass", "variant": 8, "pos": [26, 11]}, "27;11": {"type": "grass", "variant": 2, "pos": [27, 11]}, "26;12": {"type": "grass", "variant": 8, "pos": [26, 12]}, "26;13": {"type": "grass", "variant": 8, "pos": [26, 13]}, "26;14": {"type": "grass", "variant": 4, "pos": [26, 14]}, "25;14": {"type": "grass", "variant": 6, "pos": [25, 14]}, "24;13": {"type": "grass", "variant": 5, "pos": [24, 13]}, "23;13": {"type": "grass", "variant": 5, "pos": [23, 13]}, "22;13": {"type": "grass", "variant": 5, "pos": [22, 13]}, "21;13": {"type": "grass", "variant": 5, "pos": [21, 13]}, "20;13": {"type": "grass", "variant": 5, "pos": [20, 13]}, "19;13": {"type": "grass", "variant": 5, "pos": [19, 13]}, "18;13": {"type": "grass", "variant": 5, "pos": [18, 13]}, "17;13": {"type": "grass", "variant": 6, "pos": [17, 13]}, "17;12": {"type": "grass", "variant": 8, "pos": [17, 12]}, "16;12": {"type": "grass", "variant": 6, "pos": [16, 12]}, "16;11": {"type": "grass", "variant": 7, "pos": [16, 11]}, "27;12": {"type": "grass", "variant": 3, "pos": [27, 12]}, "27;13": {"type": "grass", "variant": 4, "pos": [27, 13]}, "17;11": {"type": "grass", "variant": 8, "pos": [17, 11]}, "18;11": {"type": "grass", "variant": 8, "pos": [18, 11]}, "19;11": {"type": "grass", "variant": 8, "pos": [19, 11]}, "20;11": {"type": "grass", "variant": 8, "pos": [20, 11]}, "21;11": {"type": "grass", "variant": 8, "pos": [21, 11]}, "22;11": {"type": "grass", "variant": 8, "pos": [22, 11]}, "23;11": {"type": "grass", "variant": 8, "pos": [23, 11]}, "24;11": {"type": "grass", "variant": 8, "pos": [24, 11]}, "25;11": {"type": "grass", "variant": 8, "pos": [25, 11]}, "25;12": {"type": "grass", "variant": 8, "pos": [25, 12]}, "25;13": {"type": "grass", "variant": 8, "pos": [25, 13]}, "24;12": {"type": "grass", "variant": 8, "pos": [24, 12]}, "23;12": {"type": "grass", "variant": 8, "pos": [23, 12]}, "22;12": {"type": "grass", "variant": 8, "pos": [22, 12]}, "21;12": {"type": "grass", "variant": 8, "pos": [21, 12]}, "20;12": {"type": "grass", "variant": 8, "pos": [20, 12]}, "19;12": {"type": "grass", "variant": 8, "pos": [19, 12]}, "18;12": {"type": "grass", "variant": 8, "pos": [18, 12]}, "32;8": {"type": "stone", "variant": 2, "pos": [32, 8]}, "31;8": {"type": "stone", "variant": 1, "pos": [31, 8]}, "30;8": {"type": "stone", "variant": 0, "pos": [30, 8]}, "30;9": {"type": "stone", "variant": 7, "pos": [30, 9]}, "30;10": {"type": "stone", "variant": 7, "pos": [30, 10]}, "30;11": {"type": "stone", "variant": 7, "pos": [30, 11]}, "31;11": {"type": "stone", "variant": 8, "pos": [31, 11]}, "32;11": {"type": "stone", "variant": 4, "pos": [32, 11]}, "32;10": {"type": "stone", "variant": 3, "pos": [32, 10]}, "32;9": {"type": "stone", "variant": 3, "pos": [32, 9]}, "31;9": {"type": "stone", "variant": 8, "pos": [31, 9]}, "31;10": {"type": "stone", "variant": 8, "pos": [31, 10]}, "31;12": {"type": "stone", "variant": 4, "pos": [31, 12]}, "30;12": {"type": "stone", "variant": 6, "pos": [30, 12]}, "34;5": {"type": "stone", "variant": 7, "pos": [34, 5]}, "34;6": {"type": "stone", "variant": 7, "pos": [34, 6]}, "35;6": {"type": "stone", "variant": 3, "pos": [35, 6]}, "35;5": {"type": "stone", "variant": 3, "pos": [35, 5]}, "35;7": {"type": "stone", "variant": 4, "pos": [35, 7]}, "34;7": {"type": "stone", "variant": 6, "pos": [34, 7]}, "31;4": {"type": "stone", "variant": 4, "pos": [31, 4]}, "31;3": {"type": "stone", "variant": 3, "pos": [31, 3]}, "31;2": {"type": "stone", "variant": 2, "pos": [31, 2]}, "30;2": {"type": "stone", "variant": 0, "pos": [30, 2]}, "30;3": {"type": "stone", "variant": 7, "pos": [30, 3]}, "30;4": {"type": "stone", "variant": 6, "pos": [30, 4]}, "34;4": {"type": "stone", "variant": 7, "pos": [34, 4]}, "34;3": {"type": "stone", "variant": 7, "pos": [34, 3]}, "34;2": {"type": "stone", "variant": 7, "pos": [34, 2]}, "34;1": {"type": "stone", "variant": 7, "pos": [34, 1]}, "34;0": {"type": "stone", "variant": 0, "pos": [34, 0]}, "35;0": {"type": "stone", "variant": 2, "pos": [35, 0]}, "35;1": {"type": "stone", "variant": 3, "pos": [35, 1]}, "35;2": {"type": "stone", "variant": 3, "pos": [35, 2]}, "35;3": {"type": "stone", "variant": 3, "pos": [35, 3]}, "35;4": {"type": "stone", "variant": 3, "pos": [35, 4]}, "27;0": {"type": "stone", "variant": 2, "pos": [27, 0]}, "26;0": {"type": "stone", "variant": 1, "pos": [26, 0]}, "25;0": {"type": "stone", "variant": 1, "pos": [25, 0]}, "24;0": {"type": "stone", "variant": 1, "pos": [24, 0]}, "23;0": {"type": "stone", "variant": 1, "pos": [23, 0]}, "22;0": {"type": "stone", "variant": 1, "pos": [22, 0]}, "21;0": {"type": "stone", "variant": 1, "pos": [21, 0]}, "20;0": {"type": "stone", "variant": 8, "pos": [20, 0]}, "20;1": {"type": "stone", "variant": 8, "pos": [20, 1]}, "20;2": {"type": "stone", "variant": 6, "pos": [20, 2]}, "21;2": {"type": "stone", "variant": 5, "pos": [21, 2]}, "21;1": {"type": "stone", "variant": 8, "pos": [21, 1]}, "22;1": {"type": "stone", "variant": 8, "pos": [22, 1]}, "23;1": {"type": "stone", "variant": 8, "pos": [23, 1]}, "24;1": {"type": "stone", "variant": 8, "pos": [24, 1]}, "25;1": {"type": "stone", "variant": 8, "pos": [25, 1]}, "26;1": {"type": "stone", "variant": 8, "pos": [26, 1]}, "26;2": {"type": "stone", "variant": 4, "pos": [26, 2]}, "25;2": {"type": "stone", "variant": 5, "pos": [25, 2]}, "24;2": {"type": "stone", "variant": 5, "pos": [24, 2]}, "23;2": {"type": "stone", "variant": 5, "pos": [23, 2]}, "22;2": {"type": "stone", "variant": 5, "pos": [22, 2]}, "27;1": {"type": "stone", "variant": 4, "pos": [27, 1]}, "19;0": {"type": "stone", "variant": 7, "pos": [19, 0]}, "19;-1": {"type": "stone", "variant": 0, "pos": [19, -1]}, "19;1": {"type": "stone", "variant": 6, "pos": [19, 1]}, "20;-1": {"type": "stone", "variant": 2, "pos": [20, -1]}, "15;-3": {"type": "grass", "variant": 2, "pos": [15, -3]}, "14;-3": {"type": "grass", "variant": 1, "pos": [14, -3]}, "13;-3": {"type": "grass", "variant": 1, "pos": [13, -3]}, "12;-3": {"type": "grass", "variant": 1, "pos": [12, -3]}, "11;-3": {"type": "grass", "variant": 1, "pos": [11, -3]}, "10;-3": {"type": "grass", "variant": 1, "pos": [10, -3]}, "10;-2": {"type": "grass", "variant": 8, "pos": [10, -2]}, "10;-1": {"type": "grass", "variant": 6, "pos": [10, -1]}, "11;-1": {"type": "grass", "variant": 8, "pos": [11, -1]}, "12;-1": {"type": "grass", "variant": 8, "pos": [12, -1]}, "13;-1": {"type": "grass", "variant": 8, "pos": [13, -1]}, "14;-1": {"type": "grass", "variant": 8, "pos": [14, -1]}, "15;-1": {"type": "grass", "variant": 4, "pos": [15, -1]}, "15;-2": {"type": "grass", "variant": 3, "pos": [15, -2]}, "14;-2": {"type": "grass", "variant": 8, "pos": [14, -2]}, "13;-2": {"type": "grass", "variant": 8, "pos": [13, -2]}, "12;-2": {"type": "grass", "variant": 8, "pos": [12, -2]}, "11;-2": {"type": "grass", "variant": 8, "pos": [11, -2]}, "11;0": {"type": "grass", "variant": 6, "pos": [11, 0]}, "12;0": {"type": "grass", "variant": 5, "pos": [12, 0]}, "13;0": {"type": "grass", "variant": 5, "pos": [13, 0]}, "14;0": {"type": "grass", "variant": 4, "pos": [14, 0]}, "9;-2": {"type": "grass", "variant": 6, "pos": [9, -2]}, "9;-3": {"type": "grass", "variant": 0, "pos": [9, -3]}, "4;0": {"type": "grass", "variant": 1, "pos": [4, 0]}, "3;0": {"type": "grass", "variant": 0, "pos": [3, 0]}, "3;1": {"type": "grass", "variant": 6, "pos": [3, 1]}, "4;1": {"type": "grass", "variant": 8, "pos": [4, 1]}, "5;1": {"type": "grass", "variant": 8, "pos": [5, 1]}, "5;0": {"type": "grass", "variant": 1, "pos": [5, 0]}, "6;0": {"type": "grass", "variant": 2, "pos": [6, 0]}, "6;1": {"type": "grass", "variant": 4, "pos": [6, 1]}, "5;2": {"type": "grass", "variant": 4, "pos": [5, 2]}, "-2;4": {"type": "grass", "variant": 1, "pos": [-2, 4]}, "-3;4": {"type": "grass", "variant": 1, "pos": [-3, 4]}, "-4;4": {"type": "grass", "variant": 1, "pos": [-4, 4]}, "-5;4": {"type": "grass", "variant": 1, "pos": [-5, 4]}, "-6;4": {"type": "grass", "variant": 1, "pos": [-6, 4]}, "-7;4": {"type": "grass", "variant": 1, "pos": [-7, 4]}, "-8;4": {"type": "grass", "variant": 0, "pos": [-8, 4]}, "-8;5": {"type": "grass", "variant": 7, "pos": [-8, 5]}, "-8;6": {"type": "grass", "variant": 6, "pos": [-8, 6]}, "-7;6": {"type": "grass", "variant": 8, "pos": [-7, 6]}, "-6;6": {"type": "grass", "variant": 8, "pos": [-6, 6]}, "-5;6": {"type": "grass", "variant": 8, "pos": [-5, 6]}, "-4;6": {"type": "grass", "variant": 8, "pos": [-4, 6]}, "-3;6": {"type": "grass", "variant": 8, "pos": [-3, 6]}, "-2;6": {"type": "grass", "variant": 8, "pos": [-2, 6]}, "-1;6": {"type": "grass", "variant": 5, "pos": [-1, 6]}, "0;6": {"type": "grass", "variant": 4, "pos": [0, 6]}, "0;5": {"type": "grass", "variant": 3, "pos": [0, 5]}, "-1;4": {"type": "grass", "variant": 8, "pos": [-1, 4]}, "-2;5": {"type": "grass", "variant": 8, "pos": [-2, 5]}, "-3;5": {"type": "grass", "variant": 8, "pos": [-3, 5]}, "-4;5": {"type": "grass", "variant": 8, "pos": [-4, 5]}, "-5;5": {"type": "grass", "variant": 8, "pos": [-5, 5]}, "-7;5": {"type": "grass", "variant": 8, "pos": [-7, 5]}, "-6;5": {"type": "grass", "variant": 8, "pos": [-6, 5]}, "-1;5": {"type": "grass", "variant": 8, "pos": [-1, 5]}, "-2;7": {"type": "grass", "variant": 4, "pos": [-2, 7]}, "-3;7": {"type": "grass", "variant": 5, "pos": [-3, 7]}, "-4;7": {"type": "grass", "variant": 5, "pos": [-4, 7]}, "-5;7": {"type": "grass", "variant": 5, "pos": [-5, 7]}, "-6;7": {"type": "grass", "variant": 5, "pos": [-6, 7]}, "-7;7": {"type": "grass", "variant": 6, "pos": [-7, 7]}, "0;4": {"type": "grass", "variant": 8, "pos": [0, 4]}, "0;3": {"type": "grass", "variant": 1, "pos": [0, 3]}, "-1;3": {"type": "grass", "variant": 0, "pos": [-1, 3]}, "1;3": {"type": "grass", "variant": 2, "pos": [1, 3]}, "1;4": {"type": "grass", "variant": 4, "pos": [1, 4]}, "10;6": {"type": "decor", "variant": 0, "pos": [10, 6]}, "17;9": {"type": "decor", "variant": 0, "pos": [17, 9]}, "21;9": {"type": "decor", "variant": 0, "pos": [21, 9]}, "24;9": {"type": "decor", "variant": 0, "pos": [24, 9]}, "14;-4": {"type": "decor", "variant": 0, "pos": [14, -4]}, "5;-1": {"type": "decor", "variant": 0, "pos": [5, -1]}, "4;-1": {"type": "decor", "variant": 0, "pos": [4, -1]}, "0;2": {"type": "decor", "variant": 0, "pos": [0, 2]}, "-6;3": {"type": "decor", "variant": 0, "pos": [-6, 3]}, "-5;3": {"type": "decor", "variant": 1, "pos": [-5, 3]}, "-3;3": {"type": "decor", "variant": 1, "pos": [-3, 3]}, "6;-1": {"type": "decor", "variant": 1, "pos": [6, -1]}, "11;6": {"type": "decor", "variant": 1, "pos": [11, 6]}, "15;-4": {"type": "decor", "variant": 1, "pos": [15, -4]}, "13;6": {"type": "decor", "variant": 1, "pos": [13, 6]}, "18;9": {"type": "decor", "variant": 1, "pos": [18, 9]}, "25;9": {"type": "decor", "variant": 1, "pos": [25, 9]}, "23;9": {"type": "decor", "variant": 2, "pos": [23, 9]}, "20;9": {"type": "decor", "variant": 2, "pos": [20, 9]}, "9;6": {"type": "decor", "variant": 2, "pos": [9, 6]}, "13;-4": {"type": "decor", "variant": 2, "pos": [13, -4]}, "10;-4": {"type": "decor", "variant": 2, "pos": [10, -4]}, "1;2": {"type": "decor", "variant": 2, "pos": [1, 2]}, "-4;3": {"type": "decor", "variant": 2, "pos": [-4, 3]}, "-8;3": {"type": "decor", "variant": 2, "pos": [-8, 3]}, "12;6": {"type": "decor", "variant": 3, "pos": [12, 6]}, "9;-4": {"type": "decor", "variant": 3, "pos": [9, -4]}, "22;-1": {"type": "decor", "variant": 3, "pos": [22, -1]}, "26;-1": {"type": "decor", "variant": 3, "pos": [26, -1]}, "32;7": {"type": "decor", "variant": 3, "pos": [32, 7]}, "4;2": {"type": "grass", "variant": 6, "pos": [4, 2]}}, "tile_size": 16, "offgrid": [{"type": "large_decor", "variant": 0, "pos": [488.0, 119.0]}, {"type": "large_decor", "variant": 0, "pos": [381.0, -9.0]}, {"type": "large_decor", "variant": 0, "pos": [261.5, 151.5]}, {"type": "large_decor", "variant": 0, "pos": [51.5, -9.0]}, {"type": "large_decor", "variant": 0, "pos": [-111.5, 55.5]}, {"type": "large_decor", "variant": 1, "pos": [406.5, 150.0]}, {"type": "large_decor", "variant": 1, "pos": [424.5, 165.0]}, {"type": "large_decor", "variant": 1, "pos": [131.0, 117.0]}, {"type": "large_decor", "variant": 1, "pos": [-10.5, 36.5]}, {"type": "large_decor", "variant": 2, "pos": [-45.5, 20.5]}, {"type": "large_decor", "variant": 2, "pos": [10.5, 29.5]}, {"type": "large_decor", "variant": 2, "pos": [88.0, -42.5]}, {"type": "large_decor", "variant": 2, "pos": [224.5, -89.5]}, {"type": "large_decor", "variant": 2, "pos": [179.5, -60.5]}, {"type": "large_decor", "variant": 2, "pos": [200.0, 68.5]}, {"type": "large_decor", "variant": 2, "pos": [291.0, 117.0]}, {"type": "large_decor", "variant": 2, "pos": [348.0, 136.5]}, {"type": "spawners", "variant": 0, "pos": [332.5, 142.5]}, {"type": "spawners", "variant": 1, "pos": [490.0, 111.5]}, {"type": "spawners", "variant": 1, "pos": [343.0, -16.5]}, {"type": "spawners", "variant": 1, "pos": [379.5, -17.0]}, {"type": "spawners", "variant": 1, "pos": [409.5, -15.5]}, {"type": "spawners", "variant": 1, "pos": [218.5, -64.0]}, {"type": "spawners", "variant": 1, "pos": [164.0, -64.0]}, {"type": "spawners", "variant": 1, "pos": [85.0, -16.5]}, {"type": "spawners", "variant": 1, "pos": [4.0, 31.0]}, {"type": "spawners", "variant": 1, "pos": [-114.0, 48.0]}, {"type": "spawners", "variant": 1, "pos": [-74.0, 46.5]}, {"type": "spawners", "variant": 1, "pos": [-44.0, 47.0]}, {"type": "spawners", "variant": 1, "pos": [156.5, 93.5]}]} \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/data/maps/2.json b/users/dafluffypotato/ninja_game/data/maps/2.json new file mode 100644 index 0000000..10f5ef4 --- /dev/null +++ b/users/dafluffypotato/ninja_game/data/maps/2.json @@ -0,0 +1 @@ +{"tilemap": {"9;9": {"type": "grass", "variant": 0, "pos": [9, 9]}, "9;10": {"type": "grass", "variant": 8, "pos": [9, 10]}, "9;11": {"type": "grass", "variant": 8, "pos": [9, 11]}, "9;12": {"type": "grass", "variant": 8, "pos": [9, 12]}, "10;12": {"type": "grass", "variant": 8, "pos": [10, 12]}, "11;12": {"type": "grass", "variant": 3, "pos": [11, 12]}, "11;11": {"type": "grass", "variant": 8, "pos": [11, 11]}, "12;11": {"type": "grass", "variant": 4, "pos": [12, 11]}, "12;10": {"type": "grass", "variant": 2, "pos": [12, 10]}, "11;10": {"type": "grass", "variant": 8, "pos": [11, 10]}, "11;9": {"type": "grass", "variant": 2, "pos": [11, 9]}, "10;9": {"type": "grass", "variant": 1, "pos": [10, 9]}, "10;10": {"type": "grass", "variant": 8, "pos": [10, 10]}, "10;11": {"type": "grass", "variant": 8, "pos": [10, 11]}, "8;10": {"type": "grass", "variant": 0, "pos": [8, 10]}, "8;11": {"type": "grass", "variant": 7, "pos": [8, 11]}, "8;12": {"type": "grass", "variant": 7, "pos": [8, 12]}, "8;13": {"type": "grass", "variant": 7, "pos": [8, 13]}, "8;14": {"type": "grass", "variant": 7, "pos": [8, 14]}, "8;15": {"type": "grass", "variant": 6, "pos": [8, 15]}, "9;15": {"type": "grass", "variant": 5, "pos": [9, 15]}, "10;15": {"type": "grass", "variant": 4, "pos": [10, 15]}, "10;14": {"type": "grass", "variant": 3, "pos": [10, 14]}, "10;13": {"type": "grass", "variant": 8, "pos": [10, 13]}, "11;13": {"type": "grass", "variant": 4, "pos": [11, 13]}, "9;13": {"type": "grass", "variant": 8, "pos": [9, 13]}, "9;14": {"type": "grass", "variant": 8, "pos": [9, 14]}, "12;5": {"type": "grass", "variant": 6, "pos": [12, 5]}, "12;4": {"type": "grass", "variant": 7, "pos": [12, 4]}, "12;3": {"type": "grass", "variant": 7, "pos": [12, 3]}, "12;2": {"type": "grass", "variant": 7, "pos": [12, 2]}, "12;1": {"type": "grass", "variant": 7, "pos": [12, 1]}, "13;1": {"type": "grass", "variant": 8, "pos": [13, 1]}, "13;0": {"type": "grass", "variant": 8, "pos": [13, 0]}, "14;0": {"type": "grass", "variant": 8, "pos": [14, 0]}, "14;1": {"type": "grass", "variant": 8, "pos": [14, 1]}, "15;1": {"type": "grass", "variant": 8, "pos": [15, 1]}, "16;2": {"type": "grass", "variant": 8, "pos": [16, 2]}, "16;3": {"type": "grass", "variant": 8, "pos": [16, 3]}, "15;4": {"type": "grass", "variant": 8, "pos": [15, 4]}, "15;5": {"type": "grass", "variant": 8, "pos": [15, 5]}, "14;6": {"type": "grass", "variant": 5, "pos": [14, 6]}, "13;6": {"type": "grass", "variant": 6, "pos": [13, 6]}, "13;5": {"type": "grass", "variant": 8, "pos": [13, 5]}, "13;4": {"type": "grass", "variant": 8, "pos": [13, 4]}, "13;3": {"type": "grass", "variant": 8, "pos": [13, 3]}, "13;2": {"type": "grass", "variant": 8, "pos": [13, 2]}, "14;2": {"type": "grass", "variant": 8, "pos": [14, 2]}, "14;3": {"type": "grass", "variant": 8, "pos": [14, 3]}, "14;4": {"type": "grass", "variant": 8, "pos": [14, 4]}, "14;5": {"type": "grass", "variant": 8, "pos": [14, 5]}, "15;3": {"type": "grass", "variant": 8, "pos": [15, 3]}, "15;2": {"type": "grass", "variant": 8, "pos": [15, 2]}, "9;4": {"type": "stone", "variant": 3, "pos": [9, 4]}, "9;3": {"type": "stone", "variant": 3, "pos": [9, 3]}, "9;2": {"type": "stone", "variant": 3, "pos": [9, 2]}, "9;1": {"type": "stone", "variant": 3, "pos": [9, 1]}, "8;1": {"type": "stone", "variant": 8, "pos": [8, 1]}, "8;0": {"type": "stone", "variant": 8, "pos": [8, 0]}, "7;0": {"type": "stone", "variant": 8, "pos": [7, 0]}, "7;-1": {"type": "stone", "variant": 1, "pos": [7, -1]}, "6;-1": {"type": "stone", "variant": 1, "pos": [6, -1]}, "5;-1": {"type": "stone", "variant": 1, "pos": [5, -1]}, "4;-1": {"type": "stone", "variant": 1, "pos": [4, -1]}, "3;-1": {"type": "stone", "variant": 0, "pos": [3, -1]}, "3;0": {"type": "stone", "variant": 7, "pos": [3, 0]}, "3;1": {"type": "stone", "variant": 6, "pos": [3, 1]}, "4;2": {"type": "stone", "variant": 7, "pos": [4, 2]}, "4;3": {"type": "stone", "variant": 7, "pos": [4, 3]}, "4;4": {"type": "stone", "variant": 6, "pos": [4, 4]}, "5;4": {"type": "stone", "variant": 8, "pos": [5, 4]}, "5;5": {"type": "stone", "variant": 6, "pos": [5, 5]}, "8;5": {"type": "stone", "variant": 5, "pos": [8, 5]}, "9;5": {"type": "stone", "variant": 4, "pos": [9, 5]}, "7;5": {"type": "stone", "variant": 5, "pos": [7, 5]}, "6;5": {"type": "stone", "variant": 5, "pos": [6, 5]}, "9;0": {"type": "stone", "variant": 3, "pos": [9, 0]}, "8;-1": {"type": "stone", "variant": 1, "pos": [8, -1]}, "4;0": {"type": "stone", "variant": 8, "pos": [4, 0]}, "4;1": {"type": "stone", "variant": 8, "pos": [4, 1]}, "5;1": {"type": "stone", "variant": 8, "pos": [5, 1]}, "6;2": {"type": "stone", "variant": 8, "pos": [6, 2]}, "7;2": {"type": "stone", "variant": 8, "pos": [7, 2]}, "8;2": {"type": "stone", "variant": 8, "pos": [8, 2]}, "8;3": {"type": "stone", "variant": 8, "pos": [8, 3]}, "8;4": {"type": "stone", "variant": 8, "pos": [8, 4]}, "7;4": {"type": "stone", "variant": 8, "pos": [7, 4]}, "6;4": {"type": "stone", "variant": 8, "pos": [6, 4]}, "6;3": {"type": "stone", "variant": 8, "pos": [6, 3]}, "5;3": {"type": "stone", "variant": 8, "pos": [5, 3]}, "5;2": {"type": "stone", "variant": 8, "pos": [5, 2]}, "7;3": {"type": "stone", "variant": 8, "pos": [7, 3]}, "7;1": {"type": "stone", "variant": 8, "pos": [7, 1]}, "6;1": {"type": "stone", "variant": 8, "pos": [6, 1]}, "6;0": {"type": "stone", "variant": 8, "pos": [6, 0]}, "5;0": {"type": "stone", "variant": 8, "pos": [5, 0]}, "12;0": {"type": "grass", "variant": 7, "pos": [12, 0]}, "13;-1": {"type": "grass", "variant": 1, "pos": [13, -1]}, "14;-1": {"type": "grass", "variant": 1, "pos": [14, -1]}, "15;0": {"type": "grass", "variant": 8, "pos": [15, 0]}, "15;-1": {"type": "grass", "variant": 1, "pos": [15, -1]}, "12;-1": {"type": "grass", "variant": 0, "pos": [12, -1]}, "9;-1": {"type": "stone", "variant": 2, "pos": [9, -1]}, "16;1": {"type": "grass", "variant": 8, "pos": [16, 1]}, "16;0": {"type": "grass", "variant": 8, "pos": [16, 0]}, "16;-1": {"type": "grass", "variant": 8, "pos": [16, -1]}, "17;-1": {"type": "grass", "variant": 3, "pos": [17, -1]}, "17;-2": {"type": "grass", "variant": 3, "pos": [17, -2]}, "17;-3": {"type": "grass", "variant": 2, "pos": [17, -3]}, "16;-3": {"type": "grass", "variant": 0, "pos": [16, -3]}, "16;-2": {"type": "grass", "variant": 7, "pos": [16, -2]}, "17;0": {"type": "grass", "variant": 8, "pos": [17, 0]}, "17;1": {"type": "grass", "variant": 8, "pos": [17, 1]}, "17;2": {"type": "grass", "variant": 8, "pos": [17, 2]}, "17;3": {"type": "grass", "variant": 8, "pos": [17, 3]}, "17;4": {"type": "grass", "variant": 3, "pos": [17, 4]}, "17;5": {"type": "grass", "variant": 4, "pos": [17, 5]}, "16;5": {"type": "grass", "variant": 5, "pos": [16, 5]}, "15;6": {"type": "grass", "variant": 4, "pos": [15, 6]}, "16;4": {"type": "grass", "variant": 8, "pos": [16, 4]}, "18;0": {"type": "grass", "variant": 1, "pos": [18, 0]}, "19;0": {"type": "grass", "variant": 1, "pos": [19, 0]}, "20;0": {"type": "grass", "variant": 1, "pos": [20, 0]}, "21;0": {"type": "grass", "variant": 1, "pos": [21, 0]}, "22;0": {"type": "grass", "variant": 1, "pos": [22, 0]}, "23;0": {"type": "grass", "variant": 1, "pos": [23, 0]}, "24;0": {"type": "grass", "variant": 1, "pos": [24, 0]}, "25;0": {"type": "grass", "variant": 1, "pos": [25, 0]}, "26;0": {"type": "grass", "variant": 2, "pos": [26, 0]}, "26;1": {"type": "grass", "variant": 4, "pos": [26, 1]}, "25;2": {"type": "grass", "variant": 3, "pos": [25, 2]}, "25;3": {"type": "grass", "variant": 4, "pos": [25, 3]}, "24;3": {"type": "grass", "variant": 5, "pos": [24, 3]}, "23;3": {"type": "grass", "variant": 8, "pos": [23, 3]}, "23;4": {"type": "grass", "variant": 4, "pos": [23, 4]}, "22;4": {"type": "grass", "variant": 5, "pos": [22, 4]}, "21;4": {"type": "grass", "variant": 6, "pos": [21, 4]}, "20;3": {"type": "grass", "variant": 5, "pos": [20, 3]}, "19;3": {"type": "grass", "variant": 5, "pos": [19, 3]}, "18;3": {"type": "grass", "variant": 5, "pos": [18, 3]}, "18;2": {"type": "grass", "variant": 8, "pos": [18, 2]}, "18;1": {"type": "grass", "variant": 8, "pos": [18, 1]}, "19;1": {"type": "grass", "variant": 8, "pos": [19, 1]}, "20;1": {"type": "grass", "variant": 8, "pos": [20, 1]}, "21;1": {"type": "grass", "variant": 8, "pos": [21, 1]}, "22;1": {"type": "grass", "variant": 8, "pos": [22, 1]}, "23;1": {"type": "grass", "variant": 8, "pos": [23, 1]}, "24;1": {"type": "grass", "variant": 8, "pos": [24, 1]}, "25;1": {"type": "grass", "variant": 8, "pos": [25, 1]}, "23;2": {"type": "grass", "variant": 8, "pos": [23, 2]}, "22;2": {"type": "grass", "variant": 8, "pos": [22, 2]}, "24;2": {"type": "grass", "variant": 8, "pos": [24, 2]}, "22;3": {"type": "grass", "variant": 8, "pos": [22, 3]}, "21;3": {"type": "grass", "variant": 8, "pos": [21, 3]}, "20;2": {"type": "grass", "variant": 8, "pos": [20, 2]}, "21;2": {"type": "grass", "variant": 8, "pos": [21, 2]}, "19;2": {"type": "grass", "variant": 8, "pos": [19, 2]}, "33;0": {"type": "grass", "variant": 0, "pos": [33, 0]}, "34;0": {"type": "grass", "variant": 1, "pos": [34, 0]}, "35;0": {"type": "grass", "variant": 1, "pos": [35, 0]}, "36;0": {"type": "grass", "variant": 1, "pos": [36, 0]}, "36;1": {"type": "grass", "variant": 8, "pos": [36, 1]}, "37;1": {"type": "grass", "variant": 8, "pos": [37, 1]}, "37;2": {"type": "grass", "variant": 8, "pos": [37, 2]}, "38;2": {"type": "grass", "variant": 4, "pos": [38, 2]}, "36;2": {"type": "grass", "variant": 8, "pos": [36, 2]}, "35;2": {"type": "grass", "variant": 8, "pos": [35, 2]}, "34;2": {"type": "grass", "variant": 8, "pos": [34, 2]}, "33;2": {"type": "grass", "variant": 8, "pos": [33, 2]}, "33;1": {"type": "grass", "variant": 8, "pos": [33, 1]}, "34;1": {"type": "grass", "variant": 8, "pos": [34, 1]}, "32;1": {"type": "grass", "variant": 0, "pos": [32, 1]}, "35;1": {"type": "grass", "variant": 8, "pos": [35, 1]}, "32;2": {"type": "grass", "variant": 6, "pos": [32, 2]}, "33;3": {"type": "grass", "variant": 6, "pos": [33, 3]}, "34;3": {"type": "grass", "variant": 5, "pos": [34, 3]}, "35;3": {"type": "grass", "variant": 5, "pos": [35, 3]}, "36;3": {"type": "grass", "variant": 5, "pos": [36, 3]}, "37;3": {"type": "grass", "variant": 4, "pos": [37, 3]}, "38;1": {"type": "grass", "variant": 3, "pos": [38, 1]}, "37;0": {"type": "grass", "variant": 1, "pos": [37, 0]}, "38;0": {"type": "grass", "variant": 2, "pos": [38, 0]}, "-1;-1": {"type": "stone", "variant": 2, "pos": [-1, -1]}, "-2;-1": {"type": "stone", "variant": 1, "pos": [-2, -1]}, "-3;-1": {"type": "stone", "variant": 1, "pos": [-3, -1]}, "-4;-1": {"type": "stone", "variant": 1, "pos": [-4, -1]}, "-5;-1": {"type": "stone", "variant": 1, "pos": [-5, -1]}, "-6;-1": {"type": "stone", "variant": 1, "pos": [-6, -1]}, "-7;-1": {"type": "stone", "variant": 1, "pos": [-7, -1]}, "-1;0": {"type": "stone", "variant": 4, "pos": [-1, 0]}, "-2;0": {"type": "stone", "variant": 8, "pos": [-2, 0]}, "-2;1": {"type": "stone", "variant": 4, "pos": [-2, 1]}, "-3;1": {"type": "stone", "variant": 8, "pos": [-3, 1]}, "-3;2": {"type": "stone", "variant": 4, "pos": [-3, 2]}, "-4;2": {"type": "stone", "variant": 5, "pos": [-4, 2]}, "-5;2": {"type": "stone", "variant": 5, "pos": [-5, 2]}, "-6;2": {"type": "stone", "variant": 5, "pos": [-6, 2]}, "-7;2": {"type": "stone", "variant": 6, "pos": [-7, 2]}, "-7;1": {"type": "stone", "variant": 8, "pos": [-7, 1]}, "-8;1": {"type": "stone", "variant": 6, "pos": [-8, 1]}, "-8;0": {"type": "stone", "variant": 7, "pos": [-8, 0]}, "-8;-1": {"type": "stone", "variant": 0, "pos": [-8, -1]}, "-6;0": {"type": "stone", "variant": 8, "pos": [-6, 0]}, "-7;0": {"type": "stone", "variant": 8, "pos": [-7, 0]}, "-5;0": {"type": "stone", "variant": 8, "pos": [-5, 0]}, "-4;0": {"type": "stone", "variant": 8, "pos": [-4, 0]}, "-3;0": {"type": "stone", "variant": 8, "pos": [-3, 0]}, "-6;1": {"type": "stone", "variant": 8, "pos": [-6, 1]}, "-5;1": {"type": "stone", "variant": 8, "pos": [-5, 1]}, "-4;1": {"type": "stone", "variant": 8, "pos": [-4, 1]}, "14;-8": {"type": "stone", "variant": 1, "pos": [14, -8]}, "13;-8": {"type": "stone", "variant": 0, "pos": [13, -8]}, "13;-7": {"type": "stone", "variant": 7, "pos": [13, -7]}, "13;-6": {"type": "stone", "variant": 6, "pos": [13, -6]}, "14;-6": {"type": "stone", "variant": 5, "pos": [14, -6]}, "15;-6": {"type": "stone", "variant": 4, "pos": [15, -6]}, "15;-7": {"type": "stone", "variant": 3, "pos": [15, -7]}, "15;-8": {"type": "stone", "variant": 2, "pos": [15, -8]}, "14;-7": {"type": "stone", "variant": 8, "pos": [14, -7]}, "27;-5": {"type": "stone", "variant": 2, "pos": [27, -5]}, "26;-5": {"type": "stone", "variant": 1, "pos": [26, -5]}, "25;-5": {"type": "stone", "variant": 1, "pos": [25, -5]}, "24;-5": {"type": "stone", "variant": 0, "pos": [24, -5]}, "25;-4": {"type": "stone", "variant": 5, "pos": [25, -4]}, "26;-4": {"type": "stone", "variant": 5, "pos": [26, -4]}, "27;-4": {"type": "stone", "variant": 4, "pos": [27, -4]}, "24;-4": {"type": "stone", "variant": 6, "pos": [24, -4]}, "18;-7": {"type": "stone", "variant": 6, "pos": [18, -7]}, "18;-8": {"type": "stone", "variant": 7, "pos": [18, -8]}, "19;-8": {"type": "stone", "variant": 8, "pos": [19, -8]}, "19;-9": {"type": "stone", "variant": 8, "pos": [19, -9]}, "20;-9": {"type": "stone", "variant": 8, "pos": [20, -9]}, "21;-8": {"type": "stone", "variant": 8, "pos": [21, -8]}, "20;-8": {"type": "stone", "variant": 8, "pos": [20, -8]}, "20;-7": {"type": "stone", "variant": 5, "pos": [20, -7]}, "19;-7": {"type": "stone", "variant": 5, "pos": [19, -7]}, "21;-7": {"type": "stone", "variant": 4, "pos": [21, -7]}, "18;-9": {"type": "stone", "variant": 0, "pos": [18, -9]}, "19;-10": {"type": "stone", "variant": 0, "pos": [19, -10]}, "20;-10": {"type": "stone", "variant": 1, "pos": [20, -10]}, "21;-9": {"type": "stone", "variant": 8, "pos": [21, -9]}, "21;-10": {"type": "stone", "variant": 1, "pos": [21, -10]}, "22;-8": {"type": "stone", "variant": 4, "pos": [22, -8]}, "22;-9": {"type": "stone", "variant": 3, "pos": [22, -9]}, "22;-10": {"type": "stone", "variant": 2, "pos": [22, -10]}, "29;-12": {"type": "grass", "variant": 1, "pos": [29, -12]}, "28;-12": {"type": "grass", "variant": 1, "pos": [28, -12]}, "27;-12": {"type": "grass", "variant": 1, "pos": [27, -12]}, "26;-12": {"type": "grass", "variant": 0, "pos": [26, -12]}, "26;-11": {"type": "grass", "variant": 7, "pos": [26, -11]}, "26;-10": {"type": "grass", "variant": 6, "pos": [26, -10]}, "27;-10": {"type": "grass", "variant": 8, "pos": [27, -10]}, "28;-10": {"type": "grass", "variant": 8, "pos": [28, -10]}, "29;-10": {"type": "grass", "variant": 8, "pos": [29, -10]}, "30;-10": {"type": "grass", "variant": 8, "pos": [30, -10]}, "31;-10": {"type": "grass", "variant": 8, "pos": [31, -10]}, "32;-10": {"type": "grass", "variant": 4, "pos": [32, -10]}, "32;-11": {"type": "grass", "variant": 8, "pos": [32, -11]}, "32;-12": {"type": "grass", "variant": 8, "pos": [32, -12]}, "31;-12": {"type": "grass", "variant": 8, "pos": [31, -12]}, "30;-12": {"type": "grass", "variant": 1, "pos": [30, -12]}, "29;-11": {"type": "grass", "variant": 8, "pos": [29, -11]}, "28;-11": {"type": "grass", "variant": 8, "pos": [28, -11]}, "27;-11": {"type": "grass", "variant": 8, "pos": [27, -11]}, "30;-11": {"type": "grass", "variant": 8, "pos": [30, -11]}, "31;-11": {"type": "grass", "variant": 8, "pos": [31, -11]}, "31;-9": {"type": "grass", "variant": 4, "pos": [31, -9]}, "30;-9": {"type": "grass", "variant": 5, "pos": [30, -9]}, "29;-9": {"type": "grass", "variant": 5, "pos": [29, -9]}, "28;-9": {"type": "grass", "variant": 5, "pos": [28, -9]}, "27;-9": {"type": "grass", "variant": 6, "pos": [27, -9]}, "33;-12": {"type": "grass", "variant": 3, "pos": [33, -12]}, "33;-13": {"type": "grass", "variant": 2, "pos": [33, -13]}, "32;-13": {"type": "grass", "variant": 1, "pos": [32, -13]}, "31;-13": {"type": "grass", "variant": 0, "pos": [31, -13]}, "33;-11": {"type": "grass", "variant": 4, "pos": [33, -11]}, "12;-2": {"type": "decor", "variant": 0, "pos": [12, -2]}, "19;-1": {"type": "decor", "variant": 0, "pos": [19, -1]}, "23;-1": {"type": "decor", "variant": 0, "pos": [23, -1]}, "10;8": {"type": "decor", "variant": 0, "pos": [10, 8]}, "34;-1": {"type": "decor", "variant": 0, "pos": [34, -1]}, "37;-1": {"type": "decor", "variant": 0, "pos": [37, -1]}, "22;-1": {"type": "decor", "variant": 1, "pos": [22, -1]}, "26;-1": {"type": "decor", "variant": 1, "pos": [26, -1]}, "33;-1": {"type": "decor", "variant": 1, "pos": [33, -1]}, "17;-4": {"type": "decor", "variant": 1, "pos": [17, -4]}, "13;-2": {"type": "decor", "variant": 1, "pos": [13, -2]}, "9;8": {"type": "decor", "variant": 1, "pos": [9, 8]}, "14;-2": {"type": "decor", "variant": 2, "pos": [14, -2]}, "20;-1": {"type": "decor", "variant": 2, "pos": [20, -1]}, "12;9": {"type": "decor", "variant": 2, "pos": [12, 9]}, "24;-1": {"type": "decor", "variant": 2, "pos": [24, -1]}, "32;0": {"type": "decor", "variant": 2, "pos": [32, 0]}, "36;-1": {"type": "decor", "variant": 2, "pos": [36, -1]}, "30;-13": {"type": "decor", "variant": 2, "pos": [30, -13]}, "29;-13": {"type": "decor", "variant": 1, "pos": [29, -13]}, "27;-13": {"type": "decor", "variant": 1, "pos": [27, -13]}, "32;-14": {"type": "decor", "variant": 0, "pos": [32, -14]}, "26;-13": {"type": "decor", "variant": 0, "pos": [26, -13]}, "26;-6": {"type": "decor", "variant": 3, "pos": [26, -6]}, "21;-11": {"type": "decor", "variant": 3, "pos": [21, -11]}, "8;-2": {"type": "decor", "variant": 3, "pos": [8, -2]}, "4;-2": {"type": "decor", "variant": 3, "pos": [4, -2]}, "38;-1": {"type": "decor", "variant": 3, "pos": [38, -1]}, "11;8": {"type": "decor", "variant": 3, "pos": [11, 8]}}, "tile_size": 16, "offgrid": [{"type": "large_decor", "variant": 0, "pos": [224.5, -23.0]}, {"type": "large_decor", "variant": 0, "pos": [222.5, -134.5]}, {"type": "large_decor", "variant": 0, "pos": [549.5, -8.5]}, {"type": "large_decor", "variant": 0, "pos": [497.5, -215.0]}, {"type": "large_decor", "variant": 0, "pos": [50.5, -23.5]}, {"type": "large_decor", "variant": 0, "pos": [-121.0, -23.0]}, {"type": "large_decor", "variant": 0, "pos": [-79.0, -23.0]}, {"type": "large_decor", "variant": 0, "pos": [-96.5, -21.5]}, {"type": "large_decor", "variant": 0, "pos": [-95.5, -26.5]}, {"type": "large_decor", "variant": 0, "pos": [-113.0, -28.0]}, {"type": "large_decor", "variant": 2, "pos": [338.5, -38.5]}, {"type": "large_decor", "variant": 2, "pos": [414.0, -18.5]}, {"type": "large_decor", "variant": 2, "pos": [526.5, -42.5]}, {"type": "large_decor", "variant": 2, "pos": [587.5, -35.5]}, {"type": "large_decor", "variant": 2, "pos": [466.0, -233.5]}, {"type": "large_decor", "variant": 2, "pos": [520.0, -252.0]}, {"type": "large_decor", "variant": 2, "pos": [184.0, -46.5]}, {"type": "large_decor", "variant": 1, "pos": [258.5, -58.0]}, {"type": "large_decor", "variant": 1, "pos": [327.0, -11.5]}, {"type": "large_decor", "variant": 1, "pos": [399.0, -9.5]}, {"type": "large_decor", "variant": 1, "pos": [516.5, 6.5]}, {"type": "large_decor", "variant": 1, "pos": [132.0, 149.0]}, {"type": "large_decor", "variant": 1, "pos": [486.0, -201.5]}, {"type": "large_decor", "variant": 1, "pos": [433.5, -203.0]}, {"type": "large_decor", "variant": 1, "pos": [279.5, -11.0]}, {"type": "spawners", "variant": 0, "pos": [166.5, 126.0]}, {"type": "spawners", "variant": 1, "pos": [85.5, -33.0]}, {"type": "spawners", "variant": 1, "pos": [104.5, -32.5]}, {"type": "spawners", "variant": 1, "pos": [120.0, -32.0]}, {"type": "spawners", "variant": 1, "pos": [-116.0, -31.5]}, {"type": "spawners", "variant": 1, "pos": [-93.5, -32.5]}, {"type": "spawners", "variant": 1, "pos": [-78.0, -32.5]}, {"type": "spawners", "variant": 1, "pos": [-53.5, -31.5]}, {"type": "spawners", "variant": 1, "pos": [206.5, -32.5]}, {"type": "spawners", "variant": 1, "pos": [234.5, -32.5]}, {"type": "spawners", "variant": 1, "pos": [307.0, -16.5]}, {"type": "spawners", "variant": 1, "pos": [349.5, -15.0]}, {"type": "spawners", "variant": 1, "pos": [380.5, -17.5]}, {"type": "spawners", "variant": 1, "pos": [404.0, -16.0]}, {"type": "spawners", "variant": 1, "pos": [393.5, -97.0]}, {"type": "spawners", "variant": 1, "pos": [408.5, -99.0]}, {"type": "spawners", "variant": 1, "pos": [428.5, -96.0]}, {"type": "spawners", "variant": 1, "pos": [217.0, -147.0]}, {"type": "spawners", "variant": 1, "pos": [317.5, -176.0]}, {"type": "spawners", "variant": 1, "pos": [354.5, -177.0]}, {"type": "spawners", "variant": 1, "pos": [440.5, -210.5]}, {"type": "spawners", "variant": 1, "pos": [458.0, -211.5]}, {"type": "spawners", "variant": 1, "pos": [474.5, -209.5]}, {"type": "spawners", "variant": 1, "pos": [515.0, -227.0]}, {"type": "spawners", "variant": 1, "pos": [551.5, -16.5]}, {"type": "spawners", "variant": 1, "pos": [586.0, -16.0]}, {"type": "spawners", "variant": 1, "pos": [567.5, -18.0]}, {"type": "spawners", "variant": 1, "pos": [538.0, -17.0]}]} \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/data/music.ogg b/users/dafluffypotato/ninja_game/data/music.ogg new file mode 100644 index 0000000..91e3b02 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/music.ogg differ diff --git a/users/dafluffypotato/ninja_game/data/sfx/ambience.ogg b/users/dafluffypotato/ninja_game/data/sfx/ambience.ogg new file mode 100644 index 0000000..668a195 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/sfx/ambience.ogg differ diff --git a/users/dafluffypotato/ninja_game/data/sfx/dash.ogg b/users/dafluffypotato/ninja_game/data/sfx/dash.ogg new file mode 100644 index 0000000..a061f0f Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/sfx/dash.ogg differ diff --git a/users/dafluffypotato/ninja_game/data/sfx/hit.ogg b/users/dafluffypotato/ninja_game/data/sfx/hit.ogg new file mode 100644 index 0000000..d1f864d Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/sfx/hit.ogg differ diff --git a/users/dafluffypotato/ninja_game/data/sfx/jump.ogg b/users/dafluffypotato/ninja_game/data/sfx/jump.ogg new file mode 100644 index 0000000..3f3d7b9 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/sfx/jump.ogg differ diff --git a/users/dafluffypotato/ninja_game/data/sfx/shoot.ogg b/users/dafluffypotato/ninja_game/data/sfx/shoot.ogg new file mode 100644 index 0000000..1cca571 Binary files /dev/null and b/users/dafluffypotato/ninja_game/data/sfx/shoot.ogg differ diff --git a/users/dafluffypotato/ninja_game/main.py b/users/dafluffypotato/ninja_game/main.py new file mode 100644 index 0000000..9b5dfea --- /dev/null +++ b/users/dafluffypotato/ninja_game/main.py @@ -0,0 +1,248 @@ +import os +import sys +import math +import random +import asyncio + +import pygame + +from scripts.utils import load_image, load_images, Animation +from scripts.entities import Player, Enemy +from scripts.tilemap import Tilemap +from scripts.clouds import Clouds +from scripts.particle import Particle +from scripts.spark import Spark + +pygame.init() +pygame.display.set_caption('ninja game') +screen = pygame.display.set_mode((640, 480)) + +async def press_any_key(): + font = pygame.font.Font(None, 40) + text = font.render('press any key to start', True, (255, 255, 255)) + screen.blit(text, ((screen.get_width() - text.get_width()) // 2, (screen.get_height() - text.get_height()) // 2)) + + while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + if event.type == pygame.KEYDOWN: + return + pygame.display.update() + await asyncio.sleep(0.0) + +class Game: + def __init__(self): + self.display = pygame.Surface((320, 240), pygame.SRCALPHA) + self.display_2 = pygame.Surface((320, 240)) + + self.clock = pygame.time.Clock() + + self.movement = [False, False] + + self.assets = { + 'decor': load_images('tiles/decor'), + 'grass': load_images('tiles/grass'), + 'large_decor': load_images('tiles/large_decor'), + 'stone': load_images('tiles/stone'), + 'player': load_image('entities/player.png'), + 'background': load_image('background.png'), + 'clouds': load_images('clouds'), + 'enemy/idle': Animation(load_images('entities/enemy/idle'), img_dur=6), + 'enemy/run': Animation(load_images('entities/enemy/run'), img_dur=4), + 'player/idle': Animation(load_images('entities/player/idle'), img_dur=6), + 'player/run': Animation(load_images('entities/player/run'), img_dur=4), + 'player/jump': Animation(load_images('entities/player/jump')), + 'player/slide': Animation(load_images('entities/player/slide')), + 'player/wall_slide': Animation(load_images('entities/player/wall_slide')), + 'particle/leaf': Animation(load_images('particles/leaf'), img_dur=20, loop=False), + 'particle/particle': Animation(load_images('particles/particle'), img_dur=6, loop=False), + 'gun': load_image('gun.png'), + 'projectile': load_image('projectile.png'), + } + + self.sfx = { + 'jump': pygame.mixer.Sound('data/sfx/jump.ogg'), + 'dash': pygame.mixer.Sound('data/sfx/dash.ogg'), + 'hit': pygame.mixer.Sound('data/sfx/hit.ogg'), + 'shoot': pygame.mixer.Sound('data/sfx/shoot.ogg'), + 'ambience': pygame.mixer.Sound('data/sfx/ambience.ogg'), + } + + self.sfx['ambience'].set_volume(0.2) + self.sfx['shoot'].set_volume(0.4) + self.sfx['hit'].set_volume(0.8) + self.sfx['dash'].set_volume(0.3) + self.sfx['jump'].set_volume(0.7) + + self.clouds = Clouds(self.assets['clouds'], count=16) + + self.player = Player(self, (50, 50), (8, 15)) + + self.tilemap = Tilemap(self, tile_size=16) + + self.level = 0 + self.load_level(self.level) + + self.screenshake = 0 + + def load_level(self, map_id): + self.tilemap.load('data/maps/' + str(map_id) + '.json') + + self.leaf_spawners = [] + for tree in self.tilemap.extract([('large_decor', 2)], keep=True): + self.leaf_spawners.append(pygame.Rect(4 + tree['pos'][0], 4 + tree['pos'][1], 23, 13)) + + self.enemies = [] + for spawner in self.tilemap.extract([('spawners', 0), ('spawners', 1)]): + if spawner['variant'] == 0: + self.player.pos = spawner['pos'] + self.player.air_time = 0 + else: + self.enemies.append(Enemy(self, spawner['pos'], (8, 15))) + + self.projectiles = [] + self.particles = [] + self.sparks = [] + + self.scroll = [0, 0] + self.dead = 0 + self.transition = -30 + + async def run(self): + pygame.mixer.music.load('data/music.ogg') + pygame.mixer.music.set_volume(0.5) + pygame.mixer.music.play(-1) + + self.sfx['ambience'].play(-1) + + while True: + self.display.fill((0, 0, 0, 0)) + self.display_2.blit(self.assets['background'], (0, 0)) + + self.screenshake = max(0, self.screenshake - 1) + + if not len(self.enemies): + self.transition += 1 + if self.transition > 30: + self.level = min(self.level + 1, len(os.listdir('data/maps')) - 1) + self.load_level(self.level) + if self.transition < 0: + self.transition += 1 + + if self.dead: + self.dead += 1 + if self.dead >= 10: + self.transition = min(30, self.transition + 1) + if self.dead > 40: + self.load_level(self.level) + + self.scroll[0] += (self.player.rect().centerx - self.display.get_width() / 2 - self.scroll[0]) / 30 + self.scroll[1] += (self.player.rect().centery - self.display.get_height() / 2 - self.scroll[1]) / 30 + render_scroll = (int(self.scroll[0]), int(self.scroll[1])) + + for rect in self.leaf_spawners: + if random.random() * 49999 < rect.width * rect.height: + pos = (rect.x + random.random() * rect.width, rect.y + random.random() * rect.height) + self.particles.append(Particle(self, 'leaf', pos, velocity=[-0.1, 0.3], frame=random.randint(0, 20))) + + self.clouds.update() + self.clouds.render(self.display_2, offset=render_scroll) + + self.tilemap.render(self.display, offset=render_scroll) + + for enemy in self.enemies.copy(): + kill = enemy.update(self.tilemap, (0, 0)) + enemy.render(self.display, offset=render_scroll) + if kill: + self.enemies.remove(enemy) + + if not self.dead: + self.player.update(self.tilemap, (self.movement[1] - self.movement[0], 0)) + self.player.render(self.display, offset=render_scroll) + + # [[x, y], direction, timer] + for projectile in self.projectiles.copy(): + projectile[0][0] += projectile[1] + projectile[2] += 1 + img = self.assets['projectile'] + self.display.blit(img, (projectile[0][0] - img.get_width() / 2 - render_scroll[0], projectile[0][1] - img.get_height() / 2 - render_scroll[1])) + if self.tilemap.solid_check(projectile[0]): + self.projectiles.remove(projectile) + for i in range(4): + self.sparks.append(Spark(projectile[0], random.random() - 0.5 + (math.pi if projectile[1] > 0 else 0), 2 + random.random())) + elif projectile[2] > 360: + self.projectiles.remove(projectile) + elif abs(self.player.dashing) < 50: + if self.player.rect().collidepoint(projectile[0]): + self.projectiles.remove(projectile) + self.dead += 1 + self.sfx['hit'].play() + self.screenshake = max(16, self.screenshake) + for i in range(30): + angle = random.random() * math.pi * 2 + speed = random.random() * 5 + self.sparks.append(Spark(self.player.rect().center, angle, 2 + random.random())) + self.particles.append(Particle(self, 'particle', self.player.rect().center, velocity=[math.cos(angle + math.pi) * speed * 0.5, math.sin(angle + math.pi) * speed * 0.5], frame=random.randint(0, 7))) + + for spark in self.sparks.copy(): + kill = spark.update() + spark.render(self.display, offset=render_scroll) + if kill: + self.sparks.remove(spark) + + display_mask = pygame.mask.from_surface(self.display) + display_sillhouette = display_mask.to_surface(setcolor=(0, 0, 0, 180), unsetcolor=(0, 0, 0, 0)) + for offset in [(-1, 0), (1, 0), (0, -1), (0, 1)]: + self.display_2.blit(display_sillhouette, offset) + + for particle in self.particles.copy(): + kill = particle.update() + particle.render(self.display, offset=render_scroll) + if particle.type == 'leaf': + particle.pos[0] += math.sin(particle.animation.frame * 0.035) * 0.3 + if kill: + self.particles.remove(particle) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + if event.type == pygame.KEYDOWN: + if event.key == pygame.K_LEFT: + self.movement[0] = True + if event.key == pygame.K_RIGHT: + self.movement[1] = True + if event.key == pygame.K_UP: + if self.player.jump(): + self.sfx['jump'].play() + if event.key == pygame.K_x: + self.player.dash() + if event.type == pygame.KEYUP: + if event.key == pygame.K_LEFT: + self.movement[0] = False + if event.key == pygame.K_RIGHT: + self.movement[1] = False + + if self.transition: + transition_surf = pygame.Surface(self.display.get_size()) + pygame.draw.circle(transition_surf, (255, 255, 255), (self.display.get_width() // 2, self.display.get_height() // 2), (30 - abs(self.transition)) * 8) + transition_surf.set_colorkey((255, 255, 255)) + self.display.blit(transition_surf, (0, 0)) + + self.display_2.blit(self.display, (0, 0)) + + screenshake_offset = (random.random() * self.screenshake - self.screenshake / 2, random.random() * self.screenshake - self.screenshake / 2) + screen.blit(pygame.transform.scale(self.display_2, screen.get_size()), screenshake_offset) + pygame.display.update() + self.clock.tick(60) + await asyncio.sleep(0.0) + +async def main(): + # request press any key to start before loading any audio files + # this is necessary on the web version to allow audio playback + await press_any_key() + await Game().run() + +asyncio.run(main()) diff --git a/users/dafluffypotato/ninja_game/scripts/clouds.py b/users/dafluffypotato/ninja_game/scripts/clouds.py new file mode 100644 index 0000000..2494480 --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/clouds.py @@ -0,0 +1,32 @@ +import random + +class Cloud: + def __init__(self, pos, img, speed, depth): + self.pos = list(pos) + self.img = img + self.speed = speed + self.depth = depth + + def update(self): + self.pos[0] += self.speed + + def render(self, surf, offset=(0, 0)): + render_pos = (self.pos[0] - offset[0] * self.depth, self.pos[1] - offset[1] * self.depth) + surf.blit(self.img, (render_pos[0] % (surf.get_width() + self.img.get_width()) - self.img.get_width(), render_pos[1] % (surf.get_height() + self.img.get_height()) - self.img.get_height())) + +class Clouds: + def __init__(self, cloud_images, count=16): + self.clouds = [] + + for i in range(count): + self.clouds.append(Cloud((random.random() * 99999, random.random() * 99999), random.choice(cloud_images), random.random() * 0.05 + 0.05, random.random() * 0.6 + 0.2)) + + self.clouds.sort(key=lambda x: x.depth) + + def update(self): + for cloud in self.clouds: + cloud.update() + + def render(self, surf, offset=(0, 0)): + for cloud in self.clouds: + cloud.render(surf, offset=offset) \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/scripts/entities.py b/users/dafluffypotato/ninja_game/scripts/entities.py new file mode 100644 index 0000000..a977d0f --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/entities.py @@ -0,0 +1,232 @@ +import math +import random + +import pygame + +from scripts.particle import Particle +from scripts.spark import Spark + +class PhysicsEntity: + def __init__(self, game, e_type, pos, size): + self.game = game + self.type = e_type + self.pos = list(pos) + self.size = size + self.velocity = [0, 0] + self.collisions = {'up': False, 'down': False, 'right': False, 'left': False} + + self.action = '' + self.anim_offset = (-3, -3) + self.flip = False + self.set_action('idle') + + self.last_movement = [0, 0] + + def rect(self): + return pygame.Rect(self.pos[0], self.pos[1], self.size[0], self.size[1]) + + def set_action(self, action): + if action != self.action: + self.action = action + self.animation = self.game.assets[self.type + '/' + self.action].copy() + + def update(self, tilemap, movement=(0, 0)): + self.collisions = {'up': False, 'down': False, 'right': False, 'left': False} + + frame_movement = (movement[0] + self.velocity[0], movement[1] + self.velocity[1]) + + self.pos[0] += frame_movement[0] + entity_rect = self.rect() + for rect in tilemap.physics_rects_around(self.pos): + if entity_rect.colliderect(rect): + if frame_movement[0] > 0: + entity_rect.right = rect.left + self.collisions['right'] = True + if frame_movement[0] < 0: + entity_rect.left = rect.right + self.collisions['left'] = True + self.pos[0] = entity_rect.x + + self.pos[1] += frame_movement[1] + entity_rect = self.rect() + for rect in tilemap.physics_rects_around(self.pos): + if entity_rect.colliderect(rect): + if frame_movement[1] > 0: + entity_rect.bottom = rect.top + self.collisions['down'] = True + if frame_movement[1] < 0: + entity_rect.top = rect.bottom + self.collisions['up'] = True + self.pos[1] = entity_rect.y + + if movement[0] > 0: + self.flip = False + if movement[0] < 0: + self.flip = True + + self.last_movement = movement + + self.velocity[1] = min(5, self.velocity[1] + 0.1) + + if self.collisions['down'] or self.collisions['up']: + self.velocity[1] = 0 + + self.animation.update() + + def render(self, surf, offset=(0, 0)): + surf.blit(pygame.transform.flip(self.animation.img(), self.flip, False), (self.pos[0] - offset[0] + self.anim_offset[0], self.pos[1] - offset[1] + self.anim_offset[1])) + +class Enemy(PhysicsEntity): + def __init__(self, game, pos, size): + super().__init__(game, 'enemy', pos, size) + + self.walking = 0 + + def update(self, tilemap, movement=(0, 0)): + if self.walking: + if tilemap.solid_check((self.rect().centerx + (-7 if self.flip else 7), self.pos[1] + 23)): + if (self.collisions['right'] or self.collisions['left']): + self.flip = not self.flip + else: + movement = (movement[0] - 0.5 if self.flip else 0.5, movement[1]) + else: + self.flip = not self.flip + self.walking = max(0, self.walking - 1) + if not self.walking: + dis = (self.game.player.pos[0] - self.pos[0], self.game.player.pos[1] - self.pos[1]) + if (abs(dis[1]) < 16): + if (self.flip and dis[0] < 0): + self.game.sfx['shoot'].play() + self.game.projectiles.append([[self.rect().centerx - 7, self.rect().centery], -1.5, 0]) + for i in range(4): + self.game.sparks.append(Spark(self.game.projectiles[-1][0], random.random() - 0.5 + math.pi, 2 + random.random())) + if (not self.flip and dis[0] > 0): + self.game.sfx['shoot'].play() + self.game.projectiles.append([[self.rect().centerx + 7, self.rect().centery], 1.5, 0]) + for i in range(4): + self.game.sparks.append(Spark(self.game.projectiles[-1][0], random.random() - 0.5, 2 + random.random())) + elif random.random() < 0.01: + self.walking = random.randint(30, 120) + + super().update(tilemap, movement=movement) + + if movement[0] != 0: + self.set_action('run') + else: + self.set_action('idle') + + if abs(self.game.player.dashing) >= 50: + if self.rect().colliderect(self.game.player.rect()): + self.game.screenshake = max(16, self.game.screenshake) + self.game.sfx['hit'].play() + for i in range(30): + angle = random.random() * math.pi * 2 + speed = random.random() * 5 + self.game.sparks.append(Spark(self.rect().center, angle, 2 + random.random())) + self.game.particles.append(Particle(self.game, 'particle', self.rect().center, velocity=[math.cos(angle + math.pi) * speed * 0.5, math.sin(angle + math.pi) * speed * 0.5], frame=random.randint(0, 7))) + self.game.sparks.append(Spark(self.rect().center, 0, 5 + random.random())) + self.game.sparks.append(Spark(self.rect().center, math.pi, 5 + random.random())) + return True + + def render(self, surf, offset=(0, 0)): + super().render(surf, offset=offset) + + if self.flip: + surf.blit(pygame.transform.flip(self.game.assets['gun'], True, False), (self.rect().centerx - 4 - self.game.assets['gun'].get_width() - offset[0], self.rect().centery - offset[1])) + else: + surf.blit(self.game.assets['gun'], (self.rect().centerx + 4 - offset[0], self.rect().centery - offset[1])) + +class Player(PhysicsEntity): + def __init__(self, game, pos, size): + super().__init__(game, 'player', pos, size) + self.air_time = 0 + self.jumps = 1 + self.wall_slide = False + self.dashing = 0 + + def update(self, tilemap, movement=(0, 0)): + super().update(tilemap, movement=movement) + + self.air_time += 1 + + if self.air_time > 120: + if not self.game.dead: + self.game.screenshake = max(16, self.game.screenshake) + self.game.dead += 1 + + if self.collisions['down']: + self.air_time = 0 + self.jumps = 1 + + self.wall_slide = False + if (self.collisions['right'] or self.collisions['left']) and self.air_time > 4: + self.wall_slide = True + self.velocity[1] = min(self.velocity[1], 0.5) + if self.collisions['right']: + self.flip = False + else: + self.flip = True + self.set_action('wall_slide') + + if not self.wall_slide: + if self.air_time > 4: + self.set_action('jump') + elif movement[0] != 0: + self.set_action('run') + else: + self.set_action('idle') + + if abs(self.dashing) in {60, 50}: + for i in range(20): + angle = random.random() * math.pi * 2 + speed = random.random() * 0.5 + 0.5 + pvelocity = [math.cos(angle) * speed, math.sin(angle) * speed] + self.game.particles.append(Particle(self.game, 'particle', self.rect().center, velocity=pvelocity, frame=random.randint(0, 7))) + if self.dashing > 0: + self.dashing = max(0, self.dashing - 1) + if self.dashing < 0: + self.dashing = min(0, self.dashing + 1) + if abs(self.dashing) > 50: + self.velocity[0] = abs(self.dashing) / self.dashing * 8 + if abs(self.dashing) == 51: + self.velocity[0] *= 0.1 + pvelocity = [abs(self.dashing) / self.dashing * random.random() * 3, 0] + self.game.particles.append(Particle(self.game, 'particle', self.rect().center, velocity=pvelocity, frame=random.randint(0, 7))) + + if self.velocity[0] > 0: + self.velocity[0] = max(self.velocity[0] - 0.1, 0) + else: + self.velocity[0] = min(self.velocity[0] + 0.1, 0) + + def render(self, surf, offset=(0, 0)): + if abs(self.dashing) <= 50: + super().render(surf, offset=offset) + + def jump(self): + if self.wall_slide: + if self.flip and self.last_movement[0] < 0: + self.velocity[0] = 3.5 + self.velocity[1] = -2.5 + self.air_time = 5 + self.jumps = max(0, self.jumps - 1) + return True + elif not self.flip and self.last_movement[0] > 0: + self.velocity[0] = -3.5 + self.velocity[1] = -2.5 + self.air_time = 5 + self.jumps = max(0, self.jumps - 1) + return True + + elif self.jumps: + self.velocity[1] = -3 + self.jumps -= 1 + self.air_time = 5 + return True + + def dash(self): + if not self.dashing: + self.game.sfx['dash'].play() + if self.flip: + self.dashing = -60 + else: + self.dashing = 60 \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/scripts/particle.py b/users/dafluffypotato/ninja_game/scripts/particle.py new file mode 100644 index 0000000..9fa14e7 --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/particle.py @@ -0,0 +1,25 @@ +class Particle: + def __init__(self, game, p_type, pos, velocity=[0, 0], frame=0): + self.game = game + self.type = p_type + self.pos = list(pos) + self.velocity = list(velocity) + self.animation = self.game.assets['particle/' + p_type].copy() + self.animation.frame = frame + + def update(self): + kill = False + if self.animation.done: + kill = True + + self.pos[0] += self.velocity[0] + self.pos[1] += self.velocity[1] + + self.animation.update() + + return kill + + def render(self, surf, offset=(0, 0)): + img = self.animation.img() + surf.blit(img, (self.pos[0] - offset[0] - img.get_width() // 2, self.pos[1] - offset[1] - img.get_height() // 2)) + \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/scripts/spark.py b/users/dafluffypotato/ninja_game/scripts/spark.py new file mode 100644 index 0000000..6771346 --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/spark.py @@ -0,0 +1,26 @@ +import math + +import pygame + +class Spark: + def __init__(self, pos, angle, speed): + self.pos = list(pos) + self.angle = angle + self.speed = speed + + def update(self): + self.pos[0] += math.cos(self.angle) * self.speed + self.pos[1] += math.sin(self.angle) * self.speed + + self.speed = max(0, self.speed - 0.1) + return not self.speed + + def render(self, surf, offset=(0, 0)): + render_points = [ + (self.pos[0] + math.cos(self.angle) * self.speed * 3 - offset[0], self.pos[1] + math.sin(self.angle) * self.speed * 3 - offset[1]), + (self.pos[0] + math.cos(self.angle + math.pi * 0.5) * self.speed * 0.5 - offset[0], self.pos[1] + math.sin(self.angle + math.pi * 0.5) * self.speed * 0.5 - offset[1]), + (self.pos[0] + math.cos(self.angle + math.pi) * self.speed * 3 - offset[0], self.pos[1] + math.sin(self.angle + math.pi) * self.speed * 3 - offset[1]), + (self.pos[0] + math.cos(self.angle - math.pi * 0.5) * self.speed * 0.5 - offset[0], self.pos[1] + math.sin(self.angle - math.pi * 0.5) * self.speed * 0.5 - offset[1]), + ] + + pygame.draw.polygon(surf, (255, 255, 255), render_points) \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/scripts/tilemap.py b/users/dafluffypotato/ninja_game/scripts/tilemap.py new file mode 100644 index 0000000..7d89272 --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/tilemap.py @@ -0,0 +1,106 @@ +import json + +import pygame + +AUTOTILE_MAP = { + tuple(sorted([(1, 0), (0, 1)])): 0, + tuple(sorted([(1, 0), (0, 1), (-1, 0)])): 1, + tuple(sorted([(-1, 0), (0, 1)])): 2, + tuple(sorted([(-1, 0), (0, -1), (0, 1)])): 3, + tuple(sorted([(-1, 0), (0, -1)])): 4, + tuple(sorted([(-1, 0), (0, -1), (1, 0)])): 5, + tuple(sorted([(1, 0), (0, -1)])): 6, + tuple(sorted([(1, 0), (0, -1), (0, 1)])): 7, + tuple(sorted([(1, 0), (-1, 0), (0, 1), (0, -1)])): 8, +} + +NEIGHBOR_OFFSETS = [(-1, 0), (-1, -1), (0, -1), (1, -1), (1, 0), (0, 0), (-1, 1), (0, 1), (1, 1)] +PHYSICS_TILES = {'grass', 'stone'} +AUTOTILE_TYPES = {'grass', 'stone'} + +class Tilemap: + def __init__(self, game, tile_size=16): + self.game = game + self.tile_size = tile_size + self.tilemap = {} + self.offgrid_tiles = [] + + def extract(self, id_pairs, keep=False): + matches = [] + for tile in self.offgrid_tiles.copy(): + if (tile['type'], tile['variant']) in id_pairs: + matches.append(tile.copy()) + if not keep: + self.offgrid_tiles.remove(tile) + + for loc in self.tilemap: + tile = self.tilemap[loc] + if (tile['type'], tile['variant']) in id_pairs: + matches.append(tile.copy()) + matches[-1]['pos'] = matches[-1]['pos'].copy() + matches[-1]['pos'][0] *= self.tile_size + matches[-1]['pos'][1] *= self.tile_size + if not keep: + del self.tilemap[loc] + + return matches + + def tiles_around(self, pos): + tiles = [] + tile_loc = (int(pos[0] // self.tile_size), int(pos[1] // self.tile_size)) + for offset in NEIGHBOR_OFFSETS: + check_loc = str(tile_loc[0] + offset[0]) + ';' + str(tile_loc[1] + offset[1]) + if check_loc in self.tilemap: + tiles.append(self.tilemap[check_loc]) + return tiles + + def save(self, path): + f = open(path, 'w') + json.dump({'tilemap': self.tilemap, 'tile_size': self.tile_size, 'offgrid': self.offgrid_tiles}, f) + f.close() + + def load(self, path): + f = open(path, 'r') + map_data = json.load(f) + f.close() + + self.tilemap = map_data['tilemap'] + self.tile_size = map_data['tile_size'] + self.offgrid_tiles = map_data['offgrid'] + + def solid_check(self, pos): + tile_loc = str(int(pos[0] // self.tile_size)) + ';' + str(int(pos[1] // self.tile_size)) + if tile_loc in self.tilemap: + if self.tilemap[tile_loc]['type'] in PHYSICS_TILES: + return self.tilemap[tile_loc] + + def physics_rects_around(self, pos): + rects = [] + for tile in self.tiles_around(pos): + if tile['type'] in PHYSICS_TILES: + rects.append(pygame.Rect(tile['pos'][0] * self.tile_size, tile['pos'][1] * self.tile_size, self.tile_size, self.tile_size)) + return rects + + def autotile(self): + for loc in self.tilemap: + tile = self.tilemap[loc] + neighbors = set() + for shift in [(1, 0), (-1, 0), (0, -1), (0, 1)]: + check_loc = str(tile['pos'][0] + shift[0]) + ';' + str(tile['pos'][1] + shift[1]) + if check_loc in self.tilemap: + if self.tilemap[check_loc]['type'] == tile['type']: + neighbors.add(shift) + neighbors = tuple(sorted(neighbors)) + if (tile['type'] in AUTOTILE_TYPES) and (neighbors in AUTOTILE_MAP): + tile['variant'] = AUTOTILE_MAP[neighbors] + + def render(self, surf, offset=(0, 0)): + for tile in self.offgrid_tiles: + surf.blit(self.game.assets[tile['type']][tile['variant']], (tile['pos'][0] - offset[0], tile['pos'][1] - offset[1])) + + for x in range(offset[0] // self.tile_size, (offset[0] + surf.get_width()) // self.tile_size + 1): + for y in range(offset[1] // self.tile_size, (offset[1] + surf.get_height()) // self.tile_size + 1): + loc = str(x) + ';' + str(y) + if loc in self.tilemap: + tile = self.tilemap[loc] + surf.blit(self.game.assets[tile['type']][tile['variant']], (tile['pos'][0] * self.tile_size - offset[0], tile['pos'][1] * self.tile_size - offset[1])) \ No newline at end of file diff --git a/users/dafluffypotato/ninja_game/scripts/utils.py b/users/dafluffypotato/ninja_game/scripts/utils.py new file mode 100644 index 0000000..45fd268 --- /dev/null +++ b/users/dafluffypotato/ninja_game/scripts/utils.py @@ -0,0 +1,38 @@ +import os + +import pygame + +BASE_IMG_PATH = 'data/images/' + +def load_image(path): + img = pygame.image.load(BASE_IMG_PATH + path).convert() + img.set_colorkey((0, 0, 0)) + return img + +def load_images(path): + images = [] + for img_name in sorted(os.listdir(BASE_IMG_PATH + path)): + images.append(load_image(path + '/' + img_name)) + return images + +class Animation: + def __init__(self, images, img_dur=5, loop=True): + self.images = images + self.loop = loop + self.img_duration = img_dur + self.done = False + self.frame = 0 + + def copy(self): + return Animation(self.images, self.img_duration, self.loop) + + def update(self): + if self.loop: + self.frame = (self.frame + 1) % (self.img_duration * len(self.images)) + else: + self.frame = min(self.frame + 1, self.img_duration * len(self.images) - 1) + if self.frame >= self.img_duration * len(self.images) - 1: + self.done = True + + def img(self): + return self.images[int(self.frame / self.img_duration)] \ No newline at end of file