From 518c2296e71f7b1258da5b69d87c606a740986d9 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Mon, 27 Jun 2022 08:56:16 -0400 Subject: [PATCH] overhead Signed-off-by: Xe Iaso --- README.md | 18 +++++++++----- TODO.md | 45 ++++++++++++++++++++++++++++++++++ dist/.gitignore | 3 ++- doc/README.md | 3 +++ doc/story.md | 26 ++++++++++++++++++++ release.sh | 14 +++++++++-- sprites/references/Tamamo.jpg | Bin 0 -> 15284 bytes src/main.zig | 12 ++++++++- src/sh0rk.zig | 4 +-- 9 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 TODO.md create mode 100644 doc/README.md create mode 100644 doc/story.md create mode 100644 sprites/references/Tamamo.jpg diff --git a/README.md b/README.md index 7a497c8..294ff1e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# tamamo +# Mara 2: Tamamo's Fury -A game written in Zig for the [WASM-4](https://wasm4.org) fantasy console. +The sequel to +[Mara: Sh0rk of Justice](https://withinstudios.itch.io/mara-sh0rk-justice), +written to target [wasm4](https://wasm4.org). ## Building @@ -16,11 +18,15 @@ Then run it with: w4 run zig-out/lib/cart.wasm ``` -For more info about setting up WASM-4, see the [quickstart guide](https://wasm4.org/docs/getting-started/setup?code-lang=zig#quickstart). +For more info about setting up WASM-4, see the +[quickstart guide](https://wasm4.org/docs/getting-started/setup?code-lang=zig#quickstart). + +## Releasing the game + +```shell +./release.sh +``` ## Links - [Documentation](https://wasm4.org/docs): Learn more about WASM-4. -- [Snake Tutorial](https://wasm4.org/docs/tutorials/snake/goal): Learn how to build a complete game - with a step-by-step tutorial. -- [GitHub](https://github.com/aduros/wasm4): Submit an issue or PR. Contributions are welcome! diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..b76d190 --- /dev/null +++ b/TODO.md @@ -0,0 +1,45 @@ +# TODO + +- [ ] Tile map + - [ ] Write engine to render tiles to the screen + - [ ] Camera logic for maps bigger than the screen +- [ ] Player + - [x] Player movement + - [ ] Player collision + - [x] Player animation + - [ ] Player inventory +- [ ] Sprites + - [ ] Gate segment + - [ ] Rock + - [ ] Gem of power + - [ ] Goblet of justice + - [ ] Dagger of light +- [ ] Actors + - [ ] King + - [ ] Tamamo-no-Mae +- [ ] Maps + - [ ] Bla'futyo + - [ ] Kanar + - [ ] Shent + - [ ] Ishei Volcano +- Palette + - [ ] Bla'futyo + - [ ] Kanar + - [ ] Shent + - [ ] Ishei Volcano + - [ ] Title Screen/Credits +- [ ] Graphics + - [ ] Title Screen + - [ ] Tamamo-no-Mae evil smile + - [ ] Heart of the volcano +- [ ] Music + - [ ] Music engine + - [ ] Title screen + - [ ] Bla'futyo + - [ ] Kanar + - [ ] Shent + - [ ] Ishei Volcano +- [ ] Text boxes + - [ ] 9-patch frame + - [ ] Text box rendering + - [ ] Slide in/out animation diff --git a/dist/.gitignore b/dist/.gitignore index 19e1bce..d6b7ef3 100644 --- a/dist/.gitignore +++ b/dist/.gitignore @@ -1 +1,2 @@ -*.wasm +* +!.gitignore diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..59068e6 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,3 @@ +# Mara 2: Tamamo's Fury + +- [Story Details](./story.md) diff --git a/doc/story.md b/doc/story.md new file mode 100644 index 0000000..084a5c8 --- /dev/null +++ b/doc/story.md @@ -0,0 +1,26 @@ +# Story Details + +The island of Kirtash is at peace. The mage has been defeated before he could +threaten the peace of the world. Mara is on a peaceful walk on the beach and +passes near the killing stone that seals Tamamo-no-Mae, a chaotic evil spirit +that has the ability to control the hearts and minds of people, but prefers to +control rulers. As Mara is walking by it, she notices the stone is shattered and +the sealing katana is missing. She races towards Bla'futyo and seeks the gem of +power. + +Mara is a sh0rk that lives in the Falre'th sea near Bla'futyo. One day the stone +that sealed the evil Tamamo-no-Mae is shattered and Tamamo-no-Mae is released. +Tamamo-no-Mae is a fox demon that is able to control the hearts and minds of +people and prefers to sow chaos in the land. Mara's goal is to free the towns of +Bla'futyo, Kanar and Shent from the evil Tamamo-no-Mae and seal her into the +heart of the volcano in Ishei. + +Mara needs to gather the gem of power from Bla'futyo, the goblet of justice from +Kanar, and the dagger of light from Shent and use them to nullify +Tamamo-no-Mae's power. Then finally seal her into the heart of the volcano in +Ishei so that she can never escape again. + +This game is an adventure game where you walk around the minds of the leaders +and free them from Tamamo-no-Mae's influence. Tamamo-no-Mae locked them up in +the deep recesses of their minds and is controlling them to destroy the local +economy and the people. diff --git a/release.sh b/release.sh index 047018c..fd51a28 100755 --- a/release.sh +++ b/release.sh @@ -1,9 +1,19 @@ #!/usr/bin/env bash -set -e +set -ex mkdir -p dist rm -rf dist/* zig build -Drelease-small=true wasm-opt -Oz --zero-filled-memory --strip-producers --dce ./zig-out/lib/cart.wasm -o ./dist/tamamo.wasm -wasm-strip ./dist/tamamo.wasm \ No newline at end of file +wasm-strip ./dist/tamamo.wasm +w4 bundle \ + --windows ./dist/tamamo.exe \ + --mac ./dist/tamamo.macOS \ + --linux ./dist/tamamo.linux \ + --title "Mara 2" \ + --description "Tamamo-no-Mae's Fury" \ + --html ./dist/web \ + --timestamp \ + --html-disk-prefix "mara-2" \ + ./dist/tamamo.wasm \ No newline at end of file diff --git a/sprites/references/Tamamo.jpg b/sprites/references/Tamamo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ef35bd91834f568df426b87526799e841ce8de27 GIT binary patch literal 15284 zcmbW8Wl$Z#_ogpFgS$&`hhV`WAvnR^U2kxA2o~Jk-MP5CySu~1-JQ$k_g|~pPrG}j z=F@ad_0wH*hZi;XiYNhN1v`!hnLtfcoeMko}t{EYyD);C~p@CukU0 zICzB5h)DkiG@t`MK|w=*f`NvGg@O4u+WX&g01O5!COO*=I4ng&cnW)LcK_I11WJ*b z9vr2aD=H2nhd-YYaq;j82&rjk>F60axxR7p@bdi>6%&_`l#*6fQB_md(9|+EF*P%{ zu(Wb?a&~cbbN2`c3XS#;~&>27#L_6 z`2TQ0eRBPGLu0_elC!~K{!oNBw8x@g_ea1MiOsF)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*WuS>!~S0CcEh<%2wa)91(4YUs^EFm2ihTz~$)$>B(nNsYiBVwY9K|iyVRO=c&6>p^rAgD}?c$cMqdjFD_f1Rs{!oWiO_W+< RMn%P?NA<-iHKqJm`EQ8)H)a3; literal 0 HcmV?d00001 diff --git a/src/main.zig b/src/main.zig index 102d247..050a982 100644 --- a/src/main.zig +++ b/src/main.zig @@ -36,7 +36,12 @@ export fn update() void { w4.m.colors._0 = .p2; } - mara_speed = 0; + var old_speed = mara_speed; + + mara_speed -= 1; + if (mara_speed < 0) { + mara_speed = 0; + } if (gamepad.up) { mara_direction = Direction.Up; mara_speed = 2; @@ -95,6 +100,11 @@ export fn update() void { if (frame_count % 15 == 0 and mara_speed > 0) { mara_frame = !mara_frame; } + + if (old_speed != mara_speed) { + mara_frame = !mara_frame; + } + var frame: u32 = switch (mara_direction) { .Left => 4, .Right => 4, diff --git a/src/sh0rk.zig b/src/sh0rk.zig index e08ed68..fa370fd 100644 --- a/src/sh0rk.zig +++ b/src/sh0rk.zig @@ -39,6 +39,4 @@ pub const Direction = enum(u2) { Down, Left, Right, -}; - - +}; \ No newline at end of file