cs56-games-simple-rpg (W15) TBD: It looks like a promising game; the code base looks navigatable but trying to run it produces a really strange window that seems to randomly place blue colored squares on the main green square regardless of what key is pressed and can only be escaped from. It looks fairly extensible but has a bad bug currently and Im having difficulties running it(Paz Zait-Givon)
// Andrew Lai // David Sun
ant build
and then ant runcli
(for the CLI version of the game) or ant run
for the GUI version.build.xml
file.
java
directory in your home folder (cd && mkdir java
).bash_profile
(or to your .zshrc
if you use zsh):
export JUNIT_HOME="$HOME/java"
export PATH="$PATH:$JUNIT_HOME"
export CLASSPATH="$CLASSPATH:$JUNIT_HOME/junit-X.Y.jar:$JUNIT_HOME/hamcrest-core-XX.YY.jar"
/cs/faculty/pconrad/public_html/cs56/lib/junit-4.8.2.jar
in the build.xml
with ${env.JUNIT_HOME}/junit-X.Y.jar
.The first version of the game is a CLI version, with a non-functional GUI implementation.
The second version of the game is a GUI version. (OLD, 2016)
The updated GUI version now features multiple enemies with unique behavior and pathfinding.
YES | bronhuston | barasuishou | A simple rpg game
— Edit
W14 | bronhuston 5pm | barasuishou | A simple rpg game
=============== Features for the CLI version:
A sample playthrough might look like this:
Output: Main Character HP: 100/100 MP: 100/100 XP: 0/100 Current Location: (0,0)
Options:
Input: 2
Output: You have encountered an enemy. Main Character LV: 1 HP: 100/100 MP: 100/100 XP: 0/100 Current Location: (1,0) Enemy LV: 1 HP: 20/20 MP 15/15
Options:
===============
Current GUI Game Implementations:
===================== The code is pretty disorganized. All of the new GUI stuff? That takes place inside the "Graphics" folder, specifically inside Display.java. The game loop itself is actually inside SimpleRPG.java, which is located in the SimpleRPG folder. This is because the previous group of students that worked on this didn't really have a working "game," per se, they had a UI that didn't interact with any of the command line version of the game at all.
The main problem is that all the multiple enemy behaviors all take place (hardcoded) inside Display.java. You're going to have to fix that, if you want to make the code extendable - the behaviors themselves should be understandable to extend and implement. Also, the GUI still needs fixing. It's rather ugly LMAO
There is a lot of room to implement the design patterns outlined by the course here. Each enemy has its own behavior, its own variables, its own view on life - however, they're all determined in one place. More importantly, the location tracking in the game is not specific to the classes, but to the hardcoded instances of those classes spawned by Display.java. These are major issues that need to be fixed in order to create additional types of enemies.