parent
a1be32b5c6
commit
518c2296e7
18
README.md
18
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!
|
||||
|
|
|
@ -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
|
|
@ -1 +1,2 @@
|
|||
*.wasm
|
||||
*
|
||||
!.gitignore
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# Mara 2: Tamamo's Fury
|
||||
|
||||
- [Story Details](./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.
|
12
release.sh
12
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
|
||||
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
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
12
src/main.zig
12
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,
|
||||
|
|
|
@ -40,5 +40,3 @@ pub const Direction = enum(u2) {
|
|||
Left,
|
||||
Right,
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue