0% found this document useful (0 votes)
35 views6 pages

Group 2 - ComProg Final Project

The document presents 'EcoTronics-MechaVenture', an educational game that merges mechatronics engineering with sustainability challenges to enhance players' understanding of environmental conservation. The project aims to empower players as eco-engineers through dynamic quests that teach practical skills in automated systems and promote environmental stewardship. Utilizing Python programming, the game features automation design, control system implementation, and energy optimization, contributing to the discourse on gamified education for sustainability.

Uploaded by

aceojack03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views6 pages

Group 2 - ComProg Final Project

The document presents 'EcoTronics-MechaVenture', an educational game that merges mechatronics engineering with sustainability challenges to enhance players' understanding of environmental conservation. The project aims to empower players as eco-engineers through dynamic quests that teach practical skills in automated systems and promote environmental stewardship. Utilizing Python programming, the game features automation design, control system implementation, and energy optimization, contributing to the discourse on gamified education for sustainability.

Uploaded by

aceojack03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

FINAL PROJECT REPORT

CpE 401: Computer Programming


2nd Semester, A.Y 2023-2024

EcoTronics-MechaVenture: Mechatronics Sustainability and Affinity Quest

Submitted by

Instructor
Mariefel T. Basibas

MAY 2024

OVERVIEW
In recent years, the convergence of sustainability and mechatronics engineering has
sparked significant interest. This paper introduces "EcoTronics-MechaVenture" an
educational game designed to immerse players in the relationship between technology and
environmental conservation. Through quests to build automated systems, players explore
sustainability challenges and apply mechatronics principles. Key features include
adventure, mechatronics learning, and empowerment. This project aims to explore
EcoTronics-MechaVenture's impact on promoting engineering skills and environmental
awareness as engineers, contributing to the literature on gamified education for
sustainability and engineering.

OBJECTIVE

"EcoTronics-MechaVenture" is designed to be a multifaceted experience that


combines the excitement of gaming with the depth of educational content. By immersing
players in dynamic quests that challenge them to build and optimize automated systems
for environmental conservation, the game fosters a hands-on understanding of
sustainability principles and mechatronics engineering concepts. Through these quests,
players not only learn about real-world sustainability challenges but also develop practical
skills in mechatronics engineering, empowering them to make a positive impact on the
environment through technology.

The game doesn't just stop at teaching skills; it aims to instill a sense of
environmental stewardship and advocacy in its players. By promoting mechatronics
engineering as a tool for solving pressing environmental issues, "EcoTronics-
MechaVenture" encourages players to see themselves as eco-engineers, capable of driving
positive change in the world. Additionally, the game contributes to the broader discourse
on gamification and educational game design, pushing the boundaries of how games can be
used to promote sustainability and engineering education.

Ultimately, "EcoTronics-MechaVenture" seeks to inspire players to delve deeper


into the world of mechatronics engineering, fostering a lifelong passion for innovation and
environmental conservation. By challenging players to think critically, solve problems
creatively, and advocate for sustainability, the game aims to shape the next generation of
eco-conscious engineers and problem-solvers.

METHODOLOGY

In our program, we used the programming language “python” to create a


sustainability and affinity quest game to find the affinity of the students in mechatronics
engineering and test their ability to solve problems with the account of still taking care of
the environment.

The method that we used in our program are the following:

● We use the “while True loop” in our program creates an infinite loop of actions,
meaning it will continue to execute its code block indefinitely until a break
statement is encountered or the program is terminated externally. It works in our
program by continuously asking the player about their next course of action until
they win the game.

● We use the “define function” multiple times in our program to define a function
using def, where we essentially are creating a reusable block of code that can be
called and executed multiple times throughout your program. We use the define
function in the starting menu where you would see at the beginning of the game and
clear screen which is being called out every time you answer so it looks organized
like a video game.

● We use the “time.sleep function” which makes the output do the transition where
each word comes in a different speed. This makes our program video game aesthetic
so the players are more encouraged to proceed and play.

● We use a “dictionary function” in our game where the collection of the rooms are
put and called out if need be.

PROJECT FEATURES

The following are the possible features that could be implemented in the project:

1. Automation Design
Players design and optimize automated systems for resource management, energy
conservation, and waste reduction. They must consider factors such as efficiency,
reliability, and environmental impact.

2. Control System Implementation:


Players develop control algorithms or in other words, command something in the
game to regulate the behavior of their automated systems. They learn about feedback
control and real-time control implementation.

3. Robotics Integration:
Players incorporate robotics technology into their systems to automate tasks (ex.
such as monitoring environmental conditions). They learn about robot kinematics,
dynamics, and control strategies.

4. Energy Optimization:
Players implement energy optimization strategies such as energy-efficient
actuators, renewable energy sources, and power management systems. They learn about
energy harvesting, storage, and distribution.

5. Environmental Impact Assessment:


Players assess the environmental impact of their automated systems and make
adjustments to minimize ecological footprint. They learn about life cycle analysis and
sustainability metrics.

PROJECT TEAM RESPONSIBILITY

NAME OF MEMBERS TASK AND RESPONSIBILITIES


LEADER, MAIN CODER, ASSIGNED IN RESEARCH
PAPER
MEMBER, ASSIGNED IN RESEARCH PAPER
MEMBER, ASSIGNED IN RESEARCH PAPER
MEMBER, ASSIGNED IN RESEARCH PAPER

SOURCE CODE

import os # Clear Screen


import sys def clear():
import time os.system('cls' if os.name == 'nt' else 'clear')

# Display starting menu # Map


def prompt(): rooms = {
time.sleep(2) 'Empty Fields': {'North': 'Trash Valley', 'South':
s = ("\n\t\t\t[EcoTronics MechaVenture]\n\n") 'Treeless Forest', 'East': 'Smelly River'},
for characters in s: 'Trash Valley': {'South': 'Empty Fields', 'Answer' : 'C',
sys.stdout.write(characters) 'Item': 'Mechanical Core', 'problem': 'broken bridge
sys.stdout.flush() that you could not cross...\n\
time.sleep(0.02) There is a missing piece of the bridge that need to be
time.sleep(2) replaced...\n\
It is a component that converts rotary motion into
s = ("\t\t\tWelcome Future Engineers,\n\ linear motion...\n\
Are you ready to prove your affinity for So you look for...\n\
mechatronics\n\ Choices: \tA. Gear\t\tB. Cam\t\tC. Screw\n'},
and become the hero our environment 'Treeless Forest': {'North': 'Empty Fields', 'Answer':
desperately needs?\n\n") 'B', 'East': 'Deadly Garage', 'Item': 'Robotics Core',
for characters in s: 'problem': "old planting robot, by the looks of it you
sys.stdout.write(characters) could see its old...\n\
sys.stdout.flush() You intend to repair the robot...\n\
time.sleep(0.02) But there is a missing piece of component in the robot
time.sleep(2) that is responsible for providing feedback\n\
about the robot's position and orientation in its
environment...\n\
while True: What is it?\n\
response = input("Would you like to play? Choices: \tA. Actuator\t\tB. Sensor\t\tC. Controller\
(YES/NO) \n") n"},
if response.lower().strip() == "yes": 'Smelly River' : {'West': 'Empty Fields', 'North':
clear() 'Sparkling Cabin', 'East': 'Garbage Mountain(Caution)',
break 'Answer' : 'C', 'Item': 'Control Systems Core', 'problem':
'river with an irrigation system connected to a
elif response.lower().strip() == "no": garden...\n\
clear() It appears that to be not working right...\n\
print("Maybe next time! When your ready :)") You approach it and open the hatch which houses the
time.sleep(4) control system...\n\
clear() After which you inspect it find out that it uses both
print("\n\t\t\t[EcoTronics MechaVenture]\n") feedback and feedforward control...\n\
print("\t\t\tWelcome Future Engineers,\n\ In order to fix it, you must first know what kind of
Are you ready to prove your affinity for configuration was used...\n\
mechatronics\n\ So you used the...\n\
and become the hero our environment Choices: \tA. Open-loop control\t\tB. Closed-loop
desperately needs?\n") control\t\tC. Hybrid control\n'},
'Sparkling Cabin' : {'South': 'Smelly River', 'East':
else: 'Power Pit', 'Answer' : 'B', 'Item': 'Electrical Core',
clear() 'problem': 'cabin full of wires after walking for so
print("\n\t\t\t[EcoTronics MechaVenture]\n") long...\n\
print("\t\t\tWelcome Future Engineers,\n\ When you opened the door...\n\
Are you ready to prove your affinity for You see an electrical circuit that powers all the
mechatronics\n\ machine in the vicinity...\n\
and become the hero our environment After close inspection you find out that it was missing
desperately needs?\n") component that is used to store electrical charge...\n\
print("Sorry! I didn't quite catch that.") Through searching the cabin, you see the following,
which will you choose?\n\
s = ("\t\t\t[EcoTronics MechaVenture]\n\ Choices: \tA. Resistor\t\tB. Capacitor\t\tC. Inductor'},
\n\t\t\tWelcome to MechaTerra\n\ 'Power Pit': {'West': 'Sparkling Cabin', 'Answer' : 'A',
\tYou must collect all six MechaCores to defeat the 'Item': 'Humanity Core', 'problem': 'abondoned power
boss.\n\n\ plant...\n\
[Remember]\n\ The facility is still functional and all the equipment is
\tMoves:\t'go {direction}' (north, south, east, or brand new...\n\
west)\n\ You have decided to convert it power source so it will
\t\t'get {letter}' (A, B, or C)\n\n") be benificial to the community...\n\
for characters in s: So you decided to use a source that is "not" harmful in
sys.stdout.write(characters) the environment...\n\
sys.stdout.flush() Choices: A. Hydorpower, it is somewhat costly to
time.sleep(0.02) build\n\
time.sleep(4) B. Nuclear, it gives the most energy among all and
low cost\n\
input("Press any key to continue...") C. Coal, its cheap and easy to use as a source'},
'Deadly Garage': {'West': 'Treeless Forest', 'Answer' :
'C', 'Item': 'Programming Core', 'problem': 'rampaging
harvesting robot that wields a scythe...\n\

You need to hack into its system to stop it...\n\


Among the programming languange, you used the else:
_____________...\n\ text = (f"{italic}You see an {current_problem}
Because it is a widely used programming language for {reset}")
developing software to control mechatronic systems\ for characters in text:
n\ sys.stdout.write(characters)
due to its efficiency, performance, and ability to work sys.stdout.flush()
closely with hardware.\n\ time.sleep(0.02)
Choices: \tA. Java\t\tB. Python\t\tC. C++'}, time.sleep(2)
'Garbage Mountain (Caution)': {'West': 'Smelly
River', 'East': 'Boss Room'}, # Boss encounter
'Boss Room': {'West': 'Garbage Mountain(Caution)', if "Boss" in rooms[current_room].keys():
'Boss': '20th Century Pollution'}
} if len(inventory) < 6:
print(f"You lost a fight with
# List of vowels {rooms[current_room]['Boss']}.")
vowels = ['a', 'e', 'i', 'o', 'u'] break

# List to track inventory else:


inventory = [] print(f"You have all the six MechaCores. You
beat the boss [{rooms[current_room]['Boss']}]!\n\
# Finished Problems \t\t\tCongratulations!!! You won")
finished_problems = [] break

# Tracks current room # Accepts player's move as input


current_room = "Empty Fields" user_input = input("Enter your move:\n")

# Tracks last move # Splits move into words


msg = "" next_move = user_input.split(' ')

clear() # First word is action


prompt() action = next_move[0].title()

# Gameplay loop # Reset item and direction


while True: item = "Item"
direction = "null"
clear() answer = "answer"
#Game Title
print("\t\t\t[EcoTronics MechaVenture]\n") # Second word is object or direction
if len(next_move) > 1:
# Display player info item = next_move[1:]
print(f"You are in the {current_room}\nInventory : direction = next_move[1].title()
{inventory}\n{'-' * 27}")
item = " ".join(item).title()
# Display msg
print(msg) # Moving between rooms
if action == "Go":
# problem indicator
if "Item" in rooms[current_room].keys(): try:
current_room = rooms[current_room]
nearby_item = rooms[current_room]["Item"] [direction]
current_problem = rooms[current_room] msg = f"You travel {direction}"
["problem"]
italic = "\033[3m" except:
reset = "\033[0m" msg = "You can't go that way."

if nearby_item not in inventory: # Picking up items


elif action == "Get":
if current_problem[-1] == 's': try:
text = (f"{italic}You see an {current_problem} if item == rooms[current_room]["Answer"]:
{reset}")
for characters in text: if item not in inventory:
sys.stdout.write(characters)
sys.stdout.flush() inventory.append(rooms[current_room]
time.sleep(0.02) ["Item"])
time.sleep(2) msg = f"{item} is Correct! You've retrieved
the {rooms[current_room]["Item"]} "
elif current_problem[0] in vowels:
text = (f"{italic}You see an {current_problem} else:
{reset}") msg = f"You already have the {item}"
for characters in text:
sys.stdout.write(characters) else:
sys.stdout.flush() msg = f"[Incorrect Answer]"
time.sleep(0.02) except:
time.sleep(2) msg = f"[Incorrect Answer]"

# Exit program
elif action == "Exit":
break

# Any other commands invalid


else:
msg = "Invalid command"

You might also like