Fix: upload actual homework files instead of git link
This commit is contained in:
Submodule homework5 deleted from aa0d27a9ee
1
homework5/.gitignore
vendored
Normal file
1
homework5/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
142
homework5/PROPOSAL_20265185.md
Normal file
142
homework5/PROPOSAL_20265185.md
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Game Proposal: Bungeoppang Tycoon
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- **Name**: Jisu Park
|
||||||
|
- **Student ID**: 20265185
|
||||||
|
- **Repository URL**: https://git.prototyping.id/20265185/homework5.git
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
1. [Game Overview](#1-game-overview)
|
||||||
|
2. [Game Mechanics](#2-game-mechanics)
|
||||||
|
3. [Core Systems](#3-core-systems)
|
||||||
|
|
||||||
|
* [3.1 Cooking System (Time-based Logic)](#31-cooking-system-time-based-logic)
|
||||||
|
* [3.2 Player Interaction System (Event-based)](#32-player-interaction-system-event-based)
|
||||||
|
* [3.3 Score and Game Goal](#33-score-and-game-goal)
|
||||||
|
* [3.4 Customer and Order Management](#34-customer-and-order-management)
|
||||||
|
* [3.5 Dynamic Difficulty Scaling](#35-dynamic-difficulty-scaling)
|
||||||
|
|
||||||
|
|
||||||
|
4. [UI Design](#4-ui-design)
|
||||||
|
|
||||||
|
## 1. Game Overview
|
||||||
|
|
||||||
|
This project aims to implement a time-management cooking game based on an existing game.
|
||||||
|
The player prepares fish-shaped bread (붕어빵) and serves customers within a limited time.
|
||||||
|
|
||||||
|
The goal of the game is to earn a target score before the time runs out. The player loses if the target score is not reached.
|
||||||
|
|
||||||
|
## 2. Game Mechanics
|
||||||
|
|
||||||
|
The player interacts with the game through **mouse clicks**.
|
||||||
|
|
||||||
|
| Action | Description |
|
||||||
|
| :--- | :--- |
|
||||||
|
| **Fill** | Add batter and click a filling (Red bean, Custard, Sweet potato). |
|
||||||
|
| **Flip** | Flip the bread at the right time to cook both sides. |
|
||||||
|
| **Package** | Once the bread is cooked, clicking it moves it into a **paper bag (Inventory)**. |
|
||||||
|
| **Serve** | Clicking a waiting customer delivers the currently bagged bread to them. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
The player must prepare different types of fish-shaped bread based on customer orders. There are three types of fish bread: **red bean, custard cream, and sweet potato**.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Each customer requests a specific type and quantity. The player must correctly prepare and serve the requested items to earn points.
|
||||||
|
|
||||||
|
## 3. Core Systems
|
||||||
|
|
||||||
|
### 3.1 Cooking System (Time-based Logic)
|
||||||
|
|
||||||
|
The cooking system manages the state of each fish bread over time. Each mold tracks its status using a timer.
|
||||||
|
<br>`Empty` → `Batter Filled` → `Cooking` → `Ready` (or `Burnt` if neglected).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This system will be implemented using fish bread objects stored in an array. Each object will contain its current state and a timer value to track cooking progress.
|
||||||
|
|
||||||
|
Example properties:
|
||||||
|
- state
|
||||||
|
- cookingTime
|
||||||
|
- flipped
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.2 Player Interaction System (Event-based)
|
||||||
|
|
||||||
|
The player interacts with the game mainly through mouse clicks.
|
||||||
|
Possible actions include filling batter, flipping fish bread, collecting finished bread, and serving customers.
|
||||||
|
|
||||||
|
This system will be implemented with **click event handling**.
|
||||||
|
Depending on which game element is clicked, the corresponding object state will be updated.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.3 Score and Game Goal
|
||||||
|
|
||||||
|
The player earns points by serving correct orders within a limited time. Burnt fish bread cannot be sold, and customers may leave if they wait too long.
|
||||||
|
|
||||||
|
This system will be implemented with game-level variables such as score, target score, and remaining time. The game manager will continuously check whether the player has won or lost.
|
||||||
|
|
||||||
|
**Win condition**:
|
||||||
|
- Reach target score within time limit
|
||||||
|
|
||||||
|
**Lose condition**:
|
||||||
|
- Time runs out before reaching the goal
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.4 Customer and Order Management(Higher-Order Functions)
|
||||||
|
|
||||||
|
Customers are stored as objects in an array.
|
||||||
|
|
||||||
|
This system will use higher-order functions to manage customer states efficiently.
|
||||||
|
For example, the game will update customer patience, filter active customers, and check completed orders using array methods.
|
||||||
|
|
||||||
|
Main properties:
|
||||||
|
- orderType
|
||||||
|
- quantity
|
||||||
|
- patience
|
||||||
|
- status
|
||||||
|
|
||||||
|
|
||||||
|
This system will use higher-order functions in three main ways:
|
||||||
|
|
||||||
|
- `map()` to update customer data over time, such as decreasing patience or changing status
|
||||||
|
- `filter()` to extract active customers who are still waiting for service
|
||||||
|
- `some()` and `every()` to check order-related conditions, such as whether any customer has left or whether all active orders have been completed.
|
||||||
|
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// Update customer patience using filter and map
|
||||||
|
function updateCustomers() {
|
||||||
|
customers = customers
|
||||||
|
.map(c => ({ ...c, patience: c.patience - 1 }))
|
||||||
|
.filter(c => c.patience > 0);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.5 Dynamic Difficulty Scaling
|
||||||
|
To increase challenge over time, the game implements a scaling system:
|
||||||
|
- **Spawn Rate**: The interval between new customer arrivals decreases as the score increases.
|
||||||
|
- **Patience Decay**: The rate at which the `patience` value drops will accelerate over time, requiring faster multitasking.
|
||||||
|
## 4. UI Design
|
||||||
|
|
||||||
|
The user interface will be implemented using p5.js by combining geometric shapes and images.
|
||||||
|
Each fish bread mold will be drawn as a frame, and the inside of the frame will display different images based on the cooking state.
|
||||||
|
|
||||||
|
Each mold will correspond to a fish bread object, and its visual representation will be updated according to the object's state (e.g., empty, cooking, ready, burnt).
|
||||||
|
- **Ingredient Zone**: Three distinct colored rectangles or icons representing the fillings.
|
||||||
|

|
||||||
|
- **Inventory Slot**: A dedicated space on the UI showing the bread currently held in the "bag".
|
||||||
|

|
||||||
|
- **Visual Feedback**:
|
||||||
|
- Selected filling will be highlighted with a border.
|
||||||
|
- **Customer Speech Bubbles**: Each customer will display a speech bubble containing an **icon of the ordered filling** and the **required quantity** (e.g., 🥯 x 3).
|
||||||
|
- **Patience Gauge**: A color-changing bar (Green → Red) above the speech bubble to show remaining waiting time.
|
||||||
64
homework5/README.md
Normal file
64
homework5/README.md
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Homework 5 - Writing with Markdown!
|
||||||
|
|
||||||
|
## General Description
|
||||||
|
|
||||||
|
The ultimate objective of this course is to enable you to create a project on your own. In this homework, you will _only_ write the **proposal** describing the implementation plan for your first project, using **[Markdown](https://www.markdownguide.org)** language. You will also learn how to do a **pull request**.
|
||||||
|
|
||||||
|
## About the project
|
||||||
|
|
||||||
|
The first project is _individual_. You will have to implement a **video game** of your choice (existing, or invented by you). You will have about _3 weeks_ (weeks 9-11) for implementing your code and documenting your project. The project will be demonstrated as a live or video demo and evaluated by the professor, the TA, and your colleagues (_peer-review_ evaluation).
|
||||||
|
|
||||||
|
> This proposal is _not binding_. This means that you can change your mind later. This is just a proposal for an idea, and I will provide in-class feedback, after which you can modify your goal.
|
||||||
|
|
||||||
|
For this project, you are encouraged to use libraries (e.g., p5.js or other libraries), online tutorials, or any material you can find (make sure to properly credit your sources in the documentation) but it is **not** required to explore material beyond those seen in class. A detailed explanation of how your project will be evaluated will be shared before the project starts.
|
||||||
|
|
||||||
|
## So, what do you have to do for this homework?
|
||||||
|
|
||||||
|
For this homework, you will have to write a **proposal** in English about the project you plan to implement. You should add several details and organize the document using the **Markdown** language.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
Read carefully these steps.
|
||||||
|
|
||||||
|
1. **Fork** this repository. **Clone** your fork to your own computer.
|
||||||
|
2. Write in the `PROPOSAL_YOURID.md` file with a **description of your plan**. Substitute your ID with your actual ID, like for instance, if your ID is `12345` then the proposal document should be called `PROPOSAL_12345.md`.
|
||||||
|
3. Include the following in the proposal:
|
||||||
|
- Add your **name**, **student ID**, and the **URL** to your forked online repository on [git.prototyping.id](http://git.prototyping.id) on the top of the file. This URL is based on your username.
|
||||||
|
- **Describe the game** and the game mechanics - what does the user have to accomplish? How do you win or lose? What type of interactions are possible?
|
||||||
|
- **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.
|
||||||
|
- What do you expect to be the main **challenges**? What **features** taught in class do you expect to use in your implementation?
|
||||||
|
4. **Commit changes** to the `PROPOSAL_YOURID.md` file. **Push** changes to your repository. If you created a new branch different from main, you need to merge into `main`.
|
||||||
|
5. Create a **pull request** using the Gitea web interface from your account, targeting as destination `andrea:YOURID`. For example, if your ID is 1234567789 you should see a branch called `andrea:123456789`.
|
||||||
|

|
||||||
|
6. Submit the local folder using the class submission system (this is for redundancy purpose).
|
||||||
|
|
||||||
|
> Note: you may use AI to help you creating your project. I will assume that you are going to use AI when evaluating your poject **unless you specifically state that you did not use AI, and in such case the evaluation will not keep this into account**.
|
||||||
|
|
||||||
|
## About grading
|
||||||
|
|
||||||
|
This homework will be evaluated following two criteria:
|
||||||
|
|
||||||
|
1. **Details of the proposal content (50%)**. Include text and images to well explain what you plan to build. See the previous section for details.
|
||||||
|
2. **Quality of presentation (50%)**. Use **Markdown** to style and format the `PROPOSAL_YOURID.md` file to support clarity of communication and readability. Use 4 from the the following **Markdown** features:
|
||||||
|
- images or tables
|
||||||
|
- links to an external page, or to jump to different parts of the document
|
||||||
|
- lists (numbered or bullet points)
|
||||||
|
- headers, **bold** and _italic_
|
||||||
|
- `backquotes` to show any pseudocode
|
||||||
|
- table of content (you can autogenerate one using the [VSCode markdown extension](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one))
|
||||||
|
|
||||||
|
## How to submit
|
||||||
|
|
||||||
|
1. **Fork** the original repo, **commit** your changes, and **push** them online. The crate a **pull request** as described above.
|
||||||
|
2. **Zip** the folder of this repository containing your proposal (`PROPOSAL.md` and this `README.md` file) and any additional file (e.g., images or others).
|
||||||
|
3. **Submit** the homework using the class [submission system](http://homework.designware.xyz). Choose `HW5`.
|
||||||
|
4. For any problem feel free to contact the professor or TA via Discord.
|
||||||
|
|
||||||
|
**NOTES**
|
||||||
|
|
||||||
|
- Only submissions made with the system will be considered (e.g., no direct emails to TA or Prof).
|
||||||
|
- You can re-submit as many times as you want: the last submission only will be considered.
|
||||||
|
- Submissions after the deadline (even a few minutes) will receive a penalty of 20%. Submissions submitted after 24 hours from the deadline will be ignored (score will be 0).
|
||||||
|
- Keep a screenshot that proves your completed submission.
|
||||||
|
- Writing style might be considered in grading
|
||||||
|
- Other subjective metrics by prof may apply
|
||||||
BIN
homework5/assets/screenshot.png
Normal file
BIN
homework5/assets/screenshot.png
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 240 KiB |
BIN
homework5/bag.png
Normal file
BIN
homework5/bag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
BIN
homework5/bungeoppang.png
Normal file
BIN
homework5/bungeoppang.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 555 KiB |
BIN
homework5/fillings.png
Normal file
BIN
homework5/fillings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 721 KiB |
Reference in New Issue
Block a user