Skip to content

Fansesi/jghws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshots From Games

jghws - Java Game Homeworks

This repository contains the homework implementation for our "Introduction to OOP" course. During the semester, we were tasked to implement three games: Interceptor 2042, Super Mario Bros. and Pac-Man (clicking leads to gameplay videos).

For each game, we were given a description and simple boilerplate code. We were asked to provide a complete implementation according to explanations, a report that details our approaches and a video showcasing the gameplay. In addition to the base game, we were instructed to implement custom features for bonus points.

You may refer to individual reports for more information about each game.

Folder Structure

Interceptor 2042
├── assets
│   ├── background.png
│   ├── bullet.png
│   ├── customEnemyBullet.png
│   ├── customEnemyFighter.png
│   ├── enemyBullet.png
│   ├── enemyFighter.png
│   ├── explosionBig.png
│   ├── explosionSmall.png
│   ├── gameOver.png
│   ├── heart.png
│   ├── interceptor.png
│   ├── paused.png
│   ├── title.png
│   └── victory.png
├── compile.zsh
├── report
│   ├── interceptor.pdf
│   └── interceptor.tex
└── src
    ├── Bonus.java
    └── Main.java
Super Mario Bros.
├── assets
│   ├── block.png
│   ├── coin.png
│   ├── crouch.png
│   ├── dead.png
│   ├── jumpLeft.png
│   ├── jumpRight.png
│   ├── mushroom.png
│   ├── standLeft.png
│   ├── standRight.png
│   ├── walkLeft1.png
│   ├── walkLeft2.png
│   ├── walkRight1.png
│   └── walkRight2.png
├── compile.zsh
├── data
│   ├── coins.txt
│   ├── obstacles.txt
│   ├── pipes.txt
│   └── portals.txt
├── misc
│   ├── badPowerup.png
│   ├── goodPowerup.png
│   └── powerups.txt
├── report
│   ├── mario.pdf
│   └── mario.tex
└── src
    ├── Enemy.java
    ├── Game.java
    ├── Level.java
    ├── Main.java
    ├── Map.java
    └── Mario.java
Pac-Man
├── assets
│   ├── BlinkyDown.png
│   ├── BlinkyDown2.png
│   ├── BlinkyLeft.png
│   ├── BlinkyLeft2.png
│   ├── BlinkyRight.png
│   ├── BlinkyRight2.png
│   ├── BlinkyUp.png
│   ├── BlinkyUp2.png
│   ├── GameOver.png
│   ├── InkyDown.png
│   ├── InkyDown2.png
│   ├── InkyLeft.png
│   ├── InkyLeft2.png
│   ├── InkyRight.png
│   ├── InkyRight2.png
│   ├── InkyUp.png
│   ├── InkyUp2.png
│   ├── PacmanClosed.png
│   ├── PacmanFullOpen.png
│   ├── PacmanHalfOpen.png
│   ├── PinkyDown.png
│   ├── PinkyDown2.png
│   ├── PinkyLeft.png
│   ├── PinkyLeft2.png
│   ├── PinkyRight.png
│   ├── PinkyRight2.png
│   ├── PinkyUp.png
│   ├── PinkyUp2.png
│   └── Ready.png
├── bonus
│   ├── BFSPathFinder.java
│   ├── Blinky.java
│   ├── Enemy.java
│   ├── Game.java
│   ├── GameRenderer.java
│   ├── Inky.java
│   ├── Main.java
│   ├── MapData.java
│   ├── Pinky.java
│   ├── Player.java
│   ├── Position.java
│   ├── SimpleQueue.java
│   ├── SimpleStack.java
│   └── Snapshot.java
├── compile.zsh
├── data
│   ├── map.txt
│   └── smallmap.txt
├── report
│   ├── pacman.pdf
│   └── pacman.tex
├── run_testBFS.zsh
├── src
│   ├── BFSPathFinder.java
│   ├── Blinky.java
│   ├── Enemy.java
│   ├── Game.java
│   ├── GameRenderer.java
│   ├── Inky.java
│   ├── Main.java
│   ├── MapData.java
│   ├── Pinky.java
│   ├── Player.java
│   ├── Position.java
│   └── SimpleQueue.java
├── testBFS.java
└── tests
    ├── mapTest.txt
    ├── smallmapTest1.txt
    ├── smallmapTest2.txt
    └── smallmapTest3.txt

Compilation

Each project uses StdDraw library to handle graphics and keyboard input. To compile, please include it in your compilation command. An example command for linux/macos would be as follows:

javac src/*.java path/to/your/StdDraw.java
java -cp src Main

or you can just use corresponding compile.zsh files under each folder. These zsh scripts expect you to put StdDraw.java to GAME_NAME/src/StdDraw.java.

My Picks from The Reports

Axis-Aligned Bounding Box (AABB)
Axis-Aligned Bounding Box (AABB) visualization.
3D Enemy Movement Pattern with z Showing Time
Custom enemy movement pattern visualized in 3D where z shows time.
Custom Mario Power-ups
Custom power-ups from Mario's bonus level.
Pac-Man BFS Path-finding
BFS path-finding in Pac-Man visualized.

Academic Integrity Disclaimer

This repository contains solutions to coursework assigned by the following assistants:

  • Interceptor: Deniz Baran Aksoy.
  • Mario: Alperen Izbudak, Volkan Bora Seki.
  • Pac-Man: Memduh Çelik, Havva Bahar Bakan.

The underlying assignment ideas, all assets and initial boilerplate code are the intellectual property of the instructor. I do not publish the assignment descriptions.

This code is published publicly for portfolio and reference purposes only. Current students enrolled in this or similar courses are strictly discouraged from copying this code to comply with institutional academic honesty policies.

AI Policy

No AI code was used while writing the code. I have used AI to only discussed some of the core algorithms (e.g. collision handling in Mario or BFS path finding in Pac-Man), implementations are all mine.

About

Java Game Homeworks

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors