Concept
Link to Sketch: https://editor.p5js.org/sa8831/sketches/R-3aQof8X
Inspired by a small app I made during high school (Refer to the blog about Midterm progress), I decided that for the upcoming midterm project, to create an interactive visual novel game. The game takes place in a school of “The Periodic Table” where chemical elements are personified as classmates and teachers. Throughout the game, the user plays as a personified version of Carbon meets other elements like Hydrogen and oxygen to discuss who they are. However, there are 2 endings to this game, where after interacting with either characters, each gets a different ending and a different activity.
How the game works:
How the Periodic Table Academy Game Works (Updated Version):
- Starting the Game:
- When the game starts, a title screen with a Play button appears. Upon clicking the Play button, the game transitions to the instruction screen.
- Instructions are displayed, welcoming the player to the Periodic Table Academy and explaining that the player can click the Play button again to begin the game. The player is presented with two characters to interact with: Oxygen and Hydrogen. The characters are displayed on the screen, and the player can choose who to talk to by selecting an option like “Talk to Oxygen” or “Talk to Hydrogen”.
-
- If the player chooses to talk to Oxygen, they enter the oxygen-talk state. Oxygen responds with different dialogue options like:
- How are you?
- Tell me about yourself
- Bye
- Based on the selected option, the game displays different responses from Oxygen, with the dialogue box updating each time.
- If the player selects “Bye”, the game moves into a cutscene where Oxygen says goodbye, and then the game transitions to one of the endings after a short delay (CO2).Hydrogen’s Dialogue:
- Similarly, if the player chooses to talk to Hydrogen, they enter the hydrogen-talk state. Hydrogen responds with dialogue options such as:
- How are you?
- Tell me about yourself
- Bye
- The game progresses similarly as with Oxygen, with the player receiving different responses from Hydrogen.
- Selecting “Bye” leads to a cutscene where Hydrogen says goodbye, followed by a transition to another ending (C-H).
- Similarly, if the player chooses to talk to Hydrogen, they enter the hydrogen-talk state. Hydrogen responds with dialogue options such as:
- If the player chooses to talk to Oxygen, they enter the oxygen-talk state. Oxygen responds with different dialogue options like:
Endings:
-
-
-
- There are two possible endings:
- CO2 (Carbon Dioxide): If the player interacts with Oxygen, they receive the CO2 ending. The game then displays a message congratulating the player for making CO2.
- C-H (Hydrocarbon): If the player interacts with Hydrogen, they receive the Hydrocarbon ending. The game congratulates the player for making Hydrocarbons.Interactive Ending:
- During the ending state, the player can click around the screen to generate particles that represent either CO2 or Hydrocarbons depending on the ending.
- Particles are displayed on the screen, and each particle shows a label (either “CO2” or “C-H”) as it moves upward. These particles are generated when the player clicks anywhere on the screen.
- There are two possible endings:
-
-
Game Design
I initially wanted to draw a personified Carbon and allow the user to move using keys A and D to include a walking animation, to go either direction to the characters. However, due to breaking the screen and difficulty to link my spritesheet with the character, I removed that idea but instead made it inspired by the game Undertale:
(inspiration for the dialogue)
In addition to this, the endings involves particles that resembles a “bond” between 2 characters. I aim for the particles to represent the compounds for reacting Carbon with either Oxygen or Hydrogen to create molecules (like C-H or Hydrocarbons, and Carbon Dioxide or CO2).
Highlights/ Challenges:
The highlights of this would be this snippet:
// Particle Class class Particle { constructor(x, y, text) { this.x = x; this.y = y; this.size = random(20, 50); this.text = text; this.ySpeed = random(-2, -1); } move() { this.y += this.ySpeed; // Move upward } display() { fill('#ADD8E6'); noStroke(); ellipse(this.x, this.y, this.size); fill(255); textSize(this.size / 2); text(this.text, this.x, this.y); } } // Generate particles on click function mousePressed() { if (state === 'ending') { let newParticle = new Particle(mouseX, mouseY, endingType); particles.push(newParticle); } }
Because of clicking around the ending screen to get the needed “molecule” for each ending.
However, the challenges involves the following:
- Ensuring smooth user interaction with the character dialogues was challenging, especially with different choices for interactions such as “How are you?”, “Tell me about yourself?”, and “Bye.”
- I structured the dialogue system using buttons that allow for straightforward user input. This kept the interactions clean, with each character giving distinct options based on the user’s previous choices. This helped in providing a more guided yet flexible experience.
- Since I wanted to integrate Object-Oriented Programming, handling multiple characters (Oxygen and Hydrogen) with unique behaviors, interactions, and background transitions was tricky, especially with the game requiring seamless transitions from one scene to another.
- I utilized OOP principles to create classes for characters, backgrounds, and game states. This allowed for easy management of multiple elements interacting with each other, while ensuring that transitions and character interactions felt fluid and natural. The background changed dynamically as Carbon moved, which helped convey the progression of the game.
- Another challenge was implementing multiple endings depending on which character the player interacts with first and ensuring the game could be easily restarted without refreshing the page.
- I included an instruction screen and a restart button after each ending. To handle game state management, I kept track of the character interactions and ensured the game’s ending sequences could be triggered based on the order of choices. The restart button was designed to reset the game state while keeping the experience accessible without needing to reload the page.
- The game’s concept of displaying chemistry information such as oxygen bonding with carbon, and visual representations of molecules like CO2 and hydrocarbons, needed to be both educational and engaging.
- I decided to keep the visual representations simple, using floating shapes and rain animations to visually communicate the chemical reactions. This allowed players to understand the results of their choices (CO2 and hydrocarbons) in a non-overwhelming way.
Improvements
-
Enhancing Character Interactions:
- Add more diverse dialogue options that react to previous choices, making conversations more personalized and dynamic.
-
Expanding the Periodic Table Academy Environment:
- Introduce additional elements from the periodic table with unique interactions, personalities, and visual effects.
- Create puzzles or mini-games based on chemical properties to increase educational value.
-
Improved Visual Effects for Chemical Reactions:
- Implement particle effects, such as glowing or color-changing molecules when bonding occurs, to enhance visual appeal and illustrate chemical reactions more vividly.