6 Commits

Author SHA1 Message Date
7eb9616337 Merge pull request 'main' (#4) from 20254236/homework5:main into 20254236
Reviewed-on: andrea/homework5#4
2026-04-21 23:37:57 +00:00
d5d200456f done 2026-04-21 18:12:19 +09:00
6f65c876a2 ready 2026-04-21 13:32:26 +09:00
0b9a3c4415 Ready 2026-04-21 13:29:50 +09:00
0570efcdfc test 2026-04-21 13:26:12 +09:00
9e96f5dcbf test 2026-04-21 12:16:09 +09:00
14 changed files with 133 additions and 148 deletions

View File

@@ -1,148 +0,0 @@
# Untitled Maze Game - ID30011 Midterm Project Proposal
- **Name:** Bumgyu Suh
- **Student ID:** 20240905
- **Repository URL:** https://git.prototyping.id/20240905/homework5
## Table of Contents
1. [Game Description and Mechanics](#game-description-and-mechanics)
- [Objective](#objective)
- [Core Mechanics](#core-mechanics)
- [Win / Lose Conditions](#win--lose-conditions)
- [Player Controls](#player-controls)
2. [Visual Design and Implementation](#visual-design-and-implementation)
- [Visual Style](#visual-style)
- [Game Elements](#game-elements)
- [Implementation](#implementation)
3. [Challenges and Features](#challenges-and-features)
- [Expected Challenges](#expected-challenges)
- [Features and Concepts Used](#features-and-concepts-used)
# Game Description and Mechanics
![Ingame Chest](./ingame_chest.png)
**Untitled Maze Game** is planned to be a **3D first-person maze game** made using [Babylon.js](https://www.babylonjs.com/), where the player is attempting to escape from a dungeon. The game is structured in levels. In each level, a **procedurally generated maze** is created, and the player must find the key to the exit in one of the chests in the level, and the exit to advance to the next level. The twist is, if the player opens a chest that the player has already opened before, the player dies and the game is over. The score is determined by how many levels the player wins, and how fast. The ultimate goal is to get the highest highscore.
## Objective
- Search through the chests of the level to find the exit key.
- Avoid opening chests that has already been opened before.
- Escape the maze by finding the exit with the exit key.
- Progress through as many levels as possible, as quickly as possible.
## Core Mechanics
- Each level generates a new maze with increasing size or complexity.
- The main challenge is **memory-based navigation** and **speed**:
- If the player opens a **chest that has already been opened before**, the player dies.
- This forces the player to remember previous paths and avoid repeating mistakes.
- The player also has an incentive to make decisions quick to complete the level in the shortest amount of time.
## Win / Lose Conditions
- **Win (per level):** Reach the exit of the maze with the key.
- **Lose:** Re-open a previously opened chest.
## Player Controls
- `W/A/S/D` keys for movement
- Mouse movement to control camera direction
- Left click with mouse while facing a chest to "open" chest
1. When correct chest with key: gives key right away
2. When chest without key: shows that it is the wrong chest
3. When chest that has already been opened: game over
- Automatic progression to next level when the "exit area" is reached
---
# Visual Design and Implementation
## Visual Style
The game will have a simple 3D dungeon-like appearance, with each wall being as large as the walkable space, similar to a maze built in Minecraft:
- Dark environment (dungeon setting)
- Walls forming a maze
- Minimal lighting to create atmosphere
- The player is represented through a **first-person camera** (no visible body)
## Game Elements
| Element | Description | Implementation |
|----------------|------------------------------------------|----------------|
| Player | First-Person View (cannot see oneself) | Camera object |
| Maze | Procedurally generated dungeon layout | 2D array → 3D meshes |
| Walls | Maze boundaries | Box meshes |
| Floor | Ground surface | Plane mesh |
| Exit | Goal area (highlighted ground) | Plane mesh highlighted in yellow |
| Chests | Special tracked cells | Box mesh |
| UI | Score (round count), instructions | Text overlay |
---
## Implementation
![Maze Topview](./maze_topview.png)
![Maze Topview Annotated](./maze_topview_annotated.png)
### Maze Representation
The maze will be stored as a 2D array that stores ID corresponding to this:
- 0 = empty path
- 1 = wall
- 2 = not-yet opened chest without key
- 3 = already opened before chest
- 4 = chest with key
- 5 = starting point
- 6 = exit
This grid will be converted into 3D.
---
### Procedural Generation
Each level:
1. Generate a new maze with walls and empty paths (0s and 1s in the array)
2. Identify dead-end cells, put chests in them
3. Make one of the chests the chest with the key
4. Make another "chest" (dead-end) the exit
5. Randomly place player in empty path position
These steps will be implemented as a sequence of functions using **functional programming**.
---
### Maze Array Logic
States that need to be stored are stored in the level array (whether chest has been opened, whether the chest is the chest with the key).
- The game will store opened chests by turning the value in the array to 3.
- When the player opens a chest marked with 3, the game over screen shows.
- When the player reaches an "exit" space WITHOUT the key, the player is told to find the key first.
- When the player reaches an "exit" space WITH the key, the player proceeds to the next level.
---
# Challenges and Features
## Expected Challenges
### 1. Procedural Maze Generation
Generating a valid and solvable maze for every level while keeping it balanced in difficulty.
### 2. Difficulty Scaling
Designing how the maze size increases over levels without making the game frustrating or too easy. Making the highscore meaningful to incentivize fast gameplay, which turns a boring memorization-based game into something more competitive in order to be fun.
### 3. Player Navigation Experience
Ensuring that the maze is readable enough for satisfying gameplay without visual confusion.
### 4. Learning to use the Babylon.js
Learning a completely new thing I have never used before effectively.
---
## Features and Concepts Used
The implementation will use the following concepts learned in class:
- **JavaScript arrays** (maze array, chests' state)
- **Functional programming** (steps involved in maze generation)
- **Event handling** (keyboard and mouse input)
- **Using javascript libraries** (using [Babylon.js](https://www.babylonjs.com/))
- **Working with real-time** (stopwatch system for high score)

133
PROPOSAL_20254236.md Normal file
View File

@@ -0,0 +1,133 @@
# Kakamora: C🥥c🥥nut Carvers
Haeri Kim (20254236) | [git.prototyping.id/20254236/homework5](https://git.prototyping.id/20254236/homework5)
### Table of Contents
- [Concept Overview](#concept-overview)
- [Core Mechanic: Carving](#core-mechanic-carving)
- [Progression System](#progression-system)
- [Tribe and Combat Phase](#tribe-and-combat-phase)
- [Win and Lose Conditions](#win-and-lose-conditions)
- [Key Controls](#key-controls)
---
## Concept Overview
> *Inspired by the Kakamora from Disney **Moana**. Tiny coconut warriors who go absolutely wild at sea.*
![Moana](assets/Moana.jpg)
A **first-person crafting and survival game** where you carve 🥥 coconuts into warriors, weapons, and tools. The better you carve, the stronger your tribe. Get enough crew together and they sail out to sea and then things get wild.
![Kakamora Warriors](assets/Kakamora.webp)
> *Visual tone ref: Kakamora from Moana (2016)*
---
## Core Mechanic: Carving
![Coconut](assets/Coconut-cutting.webp)
You see your **hands holding a knife**, cutting a coconut straight off the tree. Something similar to *Fruitninja.*
![Fruitninja](assets/fruitninja-1.jpg.webp)
### 🗡️ Knife Sharpness
Knife starts out **dull and slow**. Carving is a bit of a struggle at first.
Level up and the blade gets **sharper and snappier.**
```
bladeLevel = 1 -> slow drag, rough edges
bladeLevel = 5 -> smooth arc, clean cuts
bladeLevel = MAX -> one-swipe precision
```
### Facial Expressions and Accessories
How fast you carve changes what the Kakamora looks like:
| Carving Speed | Face Expression | Accessories |
|:---:|:---:|:---:|
| Slow | Blank stare | Plain coconut shell |
| Medium | Determined | Tiny painted markings |
| Fast | Fierce grin | War paint + bone trinkets |
| Ultra Fast | Battle-ready | Full armor + war crown |
---
## Progression System
1. **Start** - Grab a coconut off the tree (first-person knife action)
2. **Carve** - Shape it up. Carving speed decides warrior quality
3. **Level Up Knife** - Sharper blade = faster and cleaner carves
4. **Craft Arrows** - Once the tribe is big enough, start carving **poison arrows** for sea combat
| Name | Reference |
|:---:|:---:|
| Face | ![Face](assets/face.webp) ![Faces](assets/face2.png) |
| Arrow | ![Arrow](assets/arrow.png) |
```
if (tribeSize >= 10):
unlockPhase("ocean_voyage")
beginCrafting("toxic_arrows")
```
> **Toxic arrow carving** is its own minigame -- you need good timing or the poison goes to waste
---
## Tribe and Combat Phase
![Moana Ocean](assets/Moana.jpg)
### Setting Sail
Once you have **10+ Kakamora** carved and ready, the whole group **heads out to sea**.
Enemies start showing up.
### Ocean Battle
- Warriors fight with the **arrows you made**
- You keep crafting from the boat to resupply on the fly
### Retreat
If **more than half the tribe goes down** at sea:
```
if (survivors < tribeSize / 2):
triggerRetreat()
returnToLand()
// back to square one -> harvest new coconuts from trees
```
---
## Win and Lose Conditions
| Condition | Outcome |
|:---|:---|
| Tribe makes it through ocean combat | **Win** |
| Over half the tribe dies at sea | **Retreat** |
| Whole tribe wiped out | **GAME OVER** |
---
## Key Controls
All **keyboard-based**:
| Key | Action |
|:---:|:---|
| `W A S D` | Move / navigate |
| `Space` | Grab coconut from tree |
| `← →` | Carving stroke direction |
| `E` | Confirm / finish carve |
| `Q` | Switch to arrow crafting mode |

BIN
assets/Coconut-cutting.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
assets/Coconut.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
assets/Kakamora.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
assets/Kakomora_face.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
assets/Moana.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
assets/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
assets/face.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 KiB

BIN
assets/face2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB