Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 53f5e9467e | |||
|
|
80d19c2e55 |
@@ -1,115 +0,0 @@
|
||||
# My proposal
|
||||
|
||||
- name: Chaewon Lee
|
||||
- student ID: 20220552
|
||||
- [URL](https://git.prototyping.id/20220552/homework5)
|
||||
|
||||
## Describe the game
|
||||
|
||||
```
|
||||
what does the user have to accomplish? How do you win or lose? What type of interactions are possible?
|
||||
```
|
||||
|
||||
**Orb.io** is a 3D survival game inspired by `.io-style` games, particularly [Slither.io](http://slither.com/io), reinterpreted in a _three-dimensional_ visual environment.
|
||||
|
||||
The player controls a glowing sphere moving through a dark space filled with smaller orbs. While the gameplay mechanics are based on classic snake-like systems, the game presents them using 3D rendering and spatial depth.
|
||||
|
||||
### Objective
|
||||
|
||||
The player's goal is to survive as long as possible while collecting glowing orbs to increase their score and grow in size.
|
||||
|
||||
### Core Mechanics
|
||||
|
||||
- The player moves continuously across a 3D environment (constrained to a flat plane for clarity and control).
|
||||
- Small glowing orbs are scattered throughout the space.
|
||||
- When the player collects an orb, their score increases and their body grows longer.
|
||||
- The player leaves behind a trail of body segments that follow the head, forming a snake-like structure.
|
||||
- As the player grows, navigation becomes more difficult due to increased length and space constraints.
|
||||
|
||||
### Win / Lose Conditions
|
||||
|
||||
- There is no fixed win condition. The game is endless, and success is measured by the player's score and survival time.
|
||||
- The player loses if:
|
||||
- They collide with their own body
|
||||
- They hit obstacles or boundaries in the environment
|
||||
|
||||
### Player Interactions
|
||||
|
||||
The player can:
|
||||
|
||||
- Control movement using keyboard (`WASD` or `arrow keys`) or mouse input
|
||||
- Collect orbs to grow and gain points
|
||||
- Avoid collisions with their own body and obstacles
|
||||
- Restart the game after losing
|
||||
|
||||
The gameplay loop is simple and repetitive:
|
||||
`Play` → `Collect` → `Grow` → `Avoid` → `Fail` → `Restart`
|
||||
|
||||
The simplicity of the mechanics allows for immediate understanding, while increasing difficulty creates tension and replayability.
|
||||
|
||||
## How will the game look like?
|
||||
|
||||
```
|
||||
What are the game elements (e.g. characters, world, interface) and how will they be implemented in code (e.g., modules, classes, objects, functions)? Feel free to use diagrams, flow-charts or any other visual representation to show your plan.
|
||||
```
|
||||
|
||||
The game will feature a dark 3D environment with glowing spheres as the main visual elements, creating a clean and immersive experience.
|
||||
|
||||
<img src="environment.png" style="max-height: 300px;">
|
||||
|
||||
### Game Elements
|
||||
|
||||
- **Player**: glowing sphere with trailing body segments
|
||||
- **Orbs**: collectible glowing spheres
|
||||
- **Obstacles**: larger objects that cause collision
|
||||
- **World**: bounded arena on a flat plane
|
||||
- **UI**: score, best score, start and game over screens
|
||||
|
||||
### Code Structure
|
||||
|
||||
The game will be organized into simple modules:
|
||||
|
||||
`main.js`
|
||||
├── `GameManager`
|
||||
├── `Player`
|
||||
├── `Orb`
|
||||
├── `Obstacle`
|
||||
└── `UI`
|
||||
|
||||
- **Player**: movement, growth, collision
|
||||
- **Orb**: spawning and collection
|
||||
- **Obstacle**: collision handling
|
||||
- **GameManager**: game state, score, restart
|
||||
- **UI**: display elements
|
||||
|
||||
### Gameplay Flow
|
||||
|
||||

|
||||
|
||||
### Technical Approach
|
||||
|
||||
- Built using **Three.js** for 3D rendering
|
||||
- Movement constrained to a plane for simplicity
|
||||
- Objects managed using classes and arrays
|
||||
- Collision detection using distance checks
|
||||
|
||||
## challenges & features
|
||||
|
||||
### Expected Challenges
|
||||
|
||||
- 3D rendering (camera, lighting, materials)
|
||||
- Implementing smooth body-following behavior
|
||||
- Managing performance with multiple objects
|
||||
- Balancing _visual effects_ and _performance_
|
||||
|
||||
### Relevant Course Concepts
|
||||
|
||||
- **Types and Variables**: used to store positions, score, and game state
|
||||
- **Arrays and Objects**: used to manage body segments, orbs, and obstacles
|
||||
- **Functions**: used to organize update, rendering, and interaction logic
|
||||
- **Modules**: used to structure the project into components such as `Player`, `Orb`, and `GameManager`
|
||||
- **Event Handling**: used to process user input (keyboard or mouse)
|
||||
|
||||
---
|
||||
|
||||
> This proposal was written with the assistance of ChatGPT for structuring and language support.
|
||||
148
PROPOSAL_20240905.md
Normal file
148
PROPOSAL_20240905.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# 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
|
||||
|
||||

|
||||
|
||||
**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 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)
|
||||
BIN
environment.png
BIN
environment.png
Binary file not shown.
|
Before Width: | Height: | Size: 1002 KiB |
BIN
ingame_chest.png
Normal file
BIN
ingame_chest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 266 KiB |
BIN
maze_topview.png
Normal file
BIN
maze_topview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 191 KiB |
BIN
maze_topview_annotated.png
Normal file
BIN
maze_topview_annotated.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 211 KiB |
Reference in New Issue
Block a user