Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a134d129f | |||
|
|
9cf9fdf03a |
101
PROPOSAL_20220899.md
Normal file
@@ -0,0 +1,101 @@
|
||||
- [My proposal](#my-proposal)
|
||||
- [Basic Information](#basic-information)
|
||||
- [Video Game: nag a ram](#video-game-nag-a-ram)
|
||||
- [Game Mechanics](#game-mechanics)
|
||||
- [Technical Implementation](#technical-implementation)
|
||||
- [Use of AI](#use-of-ai)
|
||||
|
||||
# My proposal
|
||||
|
||||
## Basic Information
|
||||
|
||||
- Name: Yu Min Choi
|
||||
- ID: 20220899
|
||||
- [Repository](https://git.prototyping.id/20220899/homework5)
|
||||
|
||||
## Video Game: nag a ram
|
||||
|
||||
_**nag a ram**_ is an anagram game that helps English speakers improve problem-solving skills and build vocabulary.
|
||||
|
||||
> An anagram is a word or phrase made by using the letters of another word or phrase in a different order. For example, _silent_ and _listen_ are anagrams. _triangle_, _alerting_, _integral_, and _relating_ are all anagrams of one another.
|
||||
>
|
||||
> \*_nag a ram_ is an anagram of _anagram_.
|
||||
|
||||
### Game Mechanics
|
||||
|
||||
**How to Play**
|
||||
|
||||
1. A base word appears on screen. The player can choose the number of letters beforehand or leave it random.
|
||||
2. Drag the letter tiles to rearrange them into a valid anagram before time runs out. The time limit scales with word length — longer words get more time.
|
||||
3. Press **Complete** to submit the answer.
|
||||
4. If correct, the player earns points and can save the word to a personal vocabulary list for later review.
|
||||
5. If incorrect or time runs out, one life is lost. The player has 5 lives per session. Once all lives are spent, there is a 5-minute cooldown before the game can be restarted.
|
||||
|
||||
**Constraints**
|
||||
|
||||
- Word: Single word only
|
||||
- Time: Scales with word length
|
||||
- Lives: 5 per session
|
||||
|
||||
**Scoring**
|
||||
|
||||
- Base points: Awarded per correct answer, scaled by word length
|
||||
- Streak bonus: Multiplied by consecutive correct answers
|
||||
- Easter egg: Double points for palindrome answers
|
||||
|
||||
**Interface**
|
||||
|
||||
The letter tiles are designed to resemble wooden blocks, giving the game a tactile, physical feel reminiscent of classic word games like Scrabble.
|
||||
|
||||

|
||||
|
||||
### Technical Implementation
|
||||
|
||||
[**Random Word API**](https://random-word-api.herokuapp.com/)
|
||||
|
||||
The base word is randomly generated using the Random Word API with a length parameter.
|
||||
|
||||
For example,
|
||||
https://random-word-api.herokuapp.com/word?length=9 returns:
|
||||
|
||||
```json
|
||||
["triangle"]
|
||||
```
|
||||
|
||||
[**Anagramica API**](http://anagramica.com/api)
|
||||
|
||||
Once base word fetched from the Random Word API, the Anagramica API is used to verify at least one valid anagram (excluding the base word itself) exists. If the player's submission matches any word in the array, the answer is validated.
|
||||
|
||||
For example, http://www.anagramica.com/best/:triangle returns:
|
||||
|
||||
```json
|
||||
{
|
||||
"best": ["alerting", "altering", "integral", "relating", "triangle"]
|
||||
}
|
||||
```
|
||||
|
||||
**Word module**
|
||||
|
||||
- `fetchRandomWord(length)`: Fetches a random word from the Random Word API with the specified or random length
|
||||
- `fetchAnagrams(word)`: Fetches valid anagrams from the Anagramica API
|
||||
- Uses `.filter()` to exclude the base word and ensure at least one valid anagram exists
|
||||
- `validateAnswer(answer, anagrams)`: Checks if the player's input matches a valid anagram
|
||||
- Uses `.includes()` to search the anagram array
|
||||
- `isPalindrome(answer)`: Checks if the given word is a palindrome
|
||||
- Uses recursion to compare letters inward from both ends
|
||||
|
||||
**Game class**
|
||||
|
||||
Manages state: score, timer, lives, streak
|
||||
|
||||
- `addScore(wordLength)`: Calculates and adds points based on word length, applies the streak multiplier, and doubles points if the palindrome check passes
|
||||
- `startTimer(wordLength, onTick, onTimeUp)`: Starts a countdown scaled to word length
|
||||
- `stopTimer()`: Stops the timer, either when the player submits an answer or when time runs out
|
||||
- `deductLife()`: Removes a life and resets the streak
|
||||
- `isGameOver()`: Checks if all lives have been used
|
||||
|
||||
**Vocabulary class**
|
||||
|
||||
## Use of AI
|
||||
|
||||
AI was used to paraphrase and refine the written content of this proposal.
|
||||
@@ -1,133 +0,0 @@
|
||||
# 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.*
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
|
||||
> *Visual tone ref: Kakamora from Moana (2016)*
|
||||
|
||||
---
|
||||
|
||||
## Core Mechanic: Carving
|
||||
|
||||

|
||||
|
||||
You see your **hands holding a knife**, cutting a coconut straight off the tree. Something similar to *Fruitninja.*
|
||||

|
||||
|
||||
|
||||
### 🗡️ 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 |   |
|
||||
| Arrow |  |
|
||||
|
||||
```
|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
### 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 |
|
||||
|
||||
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 149 KiB |
BIN
assets/Moana.jpg
|
Before Width: | Height: | Size: 132 KiB |
BIN
assets/arrow.png
|
Before Width: | Height: | Size: 1.2 MiB |
BIN
assets/face.webp
|
Before Width: | Height: | Size: 611 KiB |
BIN
assets/face2.png
|
Before Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 224 KiB |
BIN
assets/scrabble.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |