6.2 KiB
Proposal for Apple Life Game
Name: Jungwoo Rhee Student ID: 20234333 Repository URL: http://git.prototyping.id/TA/homework5
Table of Contents
- Overview
- Game Description
- Game Mechanics
- Life Stage Progression
- Technology Stack
- Challenges and Milestones
- Conclusion
Overview
Apple Life reinterprets the classic 2048 puzzle game by replacing numbers with a series of emojis representing the stages of human life. Built using Svelte, the game features a reactive UI and smooth animations. When two tiles bearing the same life stage emoji merge, they evolve into the next stage. Reaching the final (11th) stage—the farmer—completes the game.
Game Description
In Apple Life, players slide the tiles on a grid (using swipes or arrow keys). Each tile displays a unique emoji corresponding to a life stage, starting from a shovel and evolving step by step until the farmer is reached. The gameplay is focused on merging identical stages to create the next evolution stage, symbolizing human growth.
Key Features:
- Dynamic Movement: All tiles shift in the chosen direction.
- Merging Logic: Identical tiles merge to advance to the next life stage.
- Random Generation: A new tile is generated after each move.
- Win Condition: The game ends successfully when the 11th stage (farmer) is achieved.
Game Mechanics
- Tile Movement: Controlled via swipes or keyboard arrows.
- Merging Algorithm: When two tiles with the same stage meet, they combine and evolve.
- Random Tile Addition: Each move introduces a new tile at a random position.
- End Game: Successful completion is achieved when a tile representing the "farmer" stage is formed.
Life Stage Progression
The following table shows the 11 life stages of the game, with each stage represented by a distinct emoji. These images are sourced from verified emoji repositories:
Stage | Emoji/Image | Description |
---|---|---|
1 | ![]() |
Shovel – The tool for beginning work. |
2 | ![]() |
Water Drop – Nourishment and care. |
3 | ![]() |
Sunlight – Energy and warmth. |
4 | ![]() |
Seedling – The beginning of growth. |
5 | ![]() |
Herb – Early development and potential. |
6 | ![]() |
Potted Plant – Nurtured growth in a confined space. |
7 | ![]() |
Tree – Strong roots and expansion. |
8 | ![]() |
Flower – Blossoming beauty and vitality. |
9 | ![]() |
Green Apple – A stage of vibrant life. |
10 | ![]() |
Red Apple – Maturity and richness. |
11 | ![]() |
Farmer – The culmination of growth (Game Completed). |
Technology Stack
- Svelte: For reactive UI components and efficient state management.
Svelte Official Site - HTML5 & CSS3: To structure and style the game board.
- Vanilla JavaScript (within Svelte): To implement game logic (tile movement, merging, etc.).
- Local Storage API (optional): For storing high scores and game progress.
Challenges and Milestones
Challenges:
- Custom Merging Logic: Transforming numeric merging rules into an emoji-based life progression.
- Reactive Integration: Ensuring Svelte correctly handles UI updates with every tile movement and merge.
- Theme and Visual Consistency: Accurately representing human growth with a coherent set of emoji stages.
Milestones:
- Initial Setup: Project scaffolding and grid display complete.
- Core Mechanics: Tile movement and merging logic implemented.
- Final Integration: Complete life-stage progression with smooth animations and win conditions.
Sample Pseudocode
The following pseudocode is adapted from the Tile.svelte component:
<script>
// Exported property for a tile object containing the life stage and grid position
export let tile;
// Reactive statement for computing the CSS transform based on tile's position
$: tileStyle = `transform: translate(${tile.x * tileSize}px, ${tile.y * tileSize}px);`;
</script>
<div class="tile" style="{tileStyle}">
<!-- Display the emoji corresponding to the current life stage -->
{tile.emoji}
</div>
Adapted from GuilhermeBohnstedt's 2048-Svelte.
Conclusion
The Apple Life game offers a unique twist on the classic 2048 game by incorporating life stages represented by emojis. This project not only challenges players to think strategically but also provides a visually engaging experience. With the use of Svelte and modern web technologies, the game promises smooth performance and an interactive user interface. The journey from a simple shovel to a farmer encapsulates the essence of growth and achievement.