Cosmos is a tile-based strategy game where the player battles the peculiar monstrosities of deep space. You play as a Cosmic Knight, a warrior sent to explore the deep Cosmos in order to vanquish the deadly creatures that threaten planet Earth. Collect the Souls found on the various planets of space in order to gain energy to travel deeper into the Cosmos. Be ready to face the strange array of monsters that await you in the Cosmos.
Created by Leo Shen and Urjit Sharma.
Use WASD or the directional keys to navigate the Cosmic Knight around the space dungeon tilemap. Coming into contact with an enemy will defeat them at the expense of losing one of your three lives. Be careful! The enemies will follow your movement!
You can collect a shield item to prevent life loss when fighting an enemy. Collecting a Red Potion will restore one life to the Cosmic Knight.
The goal of the game is to collect the required amount of Souls in order to progress to the next level. As you go higher in level through the dungeons, you will be required to collect a greater number of souls in order to progress.
Challenge yourself by collecting as many Souls as possible within the time limit!
User authentication for Cosmos was created using Swing UI forms and Java JDBC connectors for MySQL.
For the user authentication and stat tracking system to work, the local instance of the game must have the local user's MySQL credentials in the LoginForm (line 77), RegistrationForm (line 115), and User (line 105) classes. This will facilitate the connection between MySQL and Java. The database schema is called comp2522-game-cosmos.sql. Please ensure to run the code in the SQL file to create the database schema on your local machine.
Passwords for user accounts are written into the MySQL database in encrypted form using Java MD5 hashing.
The default test account is Username: test, Password: test1234. The password will be stored in the MySQL database in its encrypted form.
All the assets and sound used are royalty free, and under the public domain copyright.
Our enemy AI is a modified version of the Dijkstra's search algorithm. Original code can be found here.
Swing UI registration form created using BoostMyTool's video guide.
Swing UI login form created using BoostMyTool's video guide.
Password hashing created through Lokesh Gupta's guide.
Player sprite by DeepDiveGameStudio.
Enemy sprites by DeepDiveGameStudio.
Game backdrops by Wenrexa.
Enemy explosion by pimen.
Game board created using blackdragon1727's tilemap assets.
Soul sprite by pimen.
Potion sprite by Flip.
Shield sprite by Free Game Assets.
Background music made by Holizna can be found on freemusicarchive.