Skip to content

Issues During Development

mmir415 edited this page May 20, 2019 · 1 revision

Sound Problems: We had difficulties getting the game to read and play the music. We would frequently come up against NullPointerExceptions, and even when we were able to load them, we had issues with the music tracks overlapping each other. Fixing this was eventually managed by creating a new thread for the sound so that it could run alongside the game. We also created the music player at the beginning rather than inside the function as it was previously out of scope.


Collision Glitch: When the enemy hits the player, the player was unable to move and any attacks missed the enemy. We fixed this by increasing the attack radius so that you were able to hit the enemy. While this seemed to be successful, the enemies would still stick to the player. The way to fix this was to input a function into the Entity class, which Enemy extends. We added an isSolid() function for the Entity which returned true. This was overridden by instances of the Creature class to return false. Then, during the collision detection for whether Asha was allowed to move, the creatures (which weren't solid) were skipped over, allowing Asha to move freely.


Rendering Hierarchy: As all items, trees, rocks, puzzle tiles, etc. were entities, when our entity manager went through all the items and rendered all the entities, these would all render on top of Asha. This was fine for trees, but for the tiles and door that Asha needed to step on top of, it wouldn't work. To solve this, we added in a variable called 'ontop' that started out as true and any entities that should be rendered below Asha would set this to false. Our entity manager would then run through everything twice and render entities set to false before entities set to true. This made Asha render on top of the tiles and door.


Suitability of Tools: During development, became clear to us that Java Swing was not an ideal library to use for game development, nor is Java an ideal software to develop a game in. The online resources for Java Game Development with Swing are quite scarce, forcing students to become as familiar as possible with the bare bones of game design so as to utilize Swing properly. The particular kind of game we have been making; an action-adventure RPG in the style of Zelda, would be much better suited to the Unity engine, which offers a great deal of support and ease of use in the design of the game. However, it is to be said that the degree of encapsulation with Unity is quite high, and when it comes to the first time many students will be designing a game of this magnitude, it is perhaps most essential that the students know how everything works. Thus, while the scarcity of online resources for Swing was an issue during development, we as a team feel we better understand game development due to being made to use it.

Clone this wiki locally