forked from andrea/homework5
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1467668240 | |||
| d2fca8e7ae | |||
| 98917111a8 |
@@ -1,101 +0,0 @@
|
|||||||
- [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.
|
|
||||||
41
PROPOSAL_20256426.md
Normal file
41
PROPOSAL_20256426.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# My Proposal
|
||||||
|
|
||||||
|
- Name: Tomas Horsky
|
||||||
|
- Student ID: 20256426
|
||||||
|
- Email: tomashorsky@kaist.ac.kr
|
||||||
|
- URL to forked repository: https://git.prototyping.id/20256426/homework5
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
- [My Proposal](#my-proposal)
|
||||||
|
- [Table of Contents](#table-of-contents)
|
||||||
|
- [The Game](#the-game)
|
||||||
|
- [Optional Features](#optional-features)
|
||||||
|
- [Implementation and Challenges](#implementation-and-challenges)
|
||||||
|
|
||||||
|
## The Game
|
||||||
|
|
||||||
|
I want to create an endless vertical platform jumping game, similar to [Doodle Jump](https://doodlejump-2.io/). The goal of the game will be to jump on small platforms and get as high as possible without falling down.
|
||||||
|
|
||||||
|
The game will be controlled only by moving left and right, jumping will be handled automatically by the game periodically. The "map" of the game will be endless, and will be generated on the go, so every game will have unique platform arrangements. The higher the player goes, the more special platforms will appear, and the game will get harder. After the player dies, the score (height) will be saved to a leaderboard and will also be displayed during future games as a reference line.
|
||||||
|
|
||||||
|
The types of platforms will be:
|
||||||
|
1. **Basic platform**
|
||||||
|
2. **Moving platform**
|
||||||
|
3. **Spring platform** (the player's next jump will be 3× higher)
|
||||||
|
4. **One-time platform** (disappears after one jump)
|
||||||
|
5. **Combined platforms** (moving spring platform, one-time moving platform, etc.)
|
||||||
|
|
||||||
|
## Optional Features
|
||||||
|
|
||||||
|
After implementing the base game, I may add some of the following features:
|
||||||
|
- **Power-ups** – such as a jetpack (which boosts height) or an extra life
|
||||||
|
- **Monsters and shooting** – monsters will spawn on platforms, and players will be able to shoot them by pressing the *up arrow*, monsters will kill the player by touching them
|
||||||
|
- **Cosmetics** – players will be able to customize their character
|
||||||
|
- **Multiplayer** – an option for two players on one PC competing against each other
|
||||||
|
- **Camera control** – an option to control the game using a camera, which will track the player's hand movement to move left or right
|
||||||
|
|
||||||
|
## Implementation and Challenges
|
||||||
|
|
||||||
|
I want to learn [Svelte](https://svelte.dev/), so I will develop the game using it. From other features taught in class, I am planning to use the [p5.js](https://p5js.org/) library for rendering the game, event handling to get the player's input and definitely some higher-order functions.
|
||||||
|
|
||||||
|
I think the main challenge will be managing player movement and the upward movement of the game world so that everything feels smooth and responsive. Another challenge will be generating platforms in a way that makes the game progressively harder without becoming impossible.
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
Reference in New Issue
Block a user