Skip to content

Issues During Development

Rowan Hart edited this page Apr 28, 2019 · 6 revisions

One particularly challenging aspect of this project was trying to select which features to implement in order to best meet the client's needs within the given time restraints, while keeping in mind our coding ability. We both had multitudes of ideas of features we could add, but with a target user of a 12 year old adding unnecessary complexity is clearly a bad idea, plus the timeline was a matter of weeks. This issue first emerged when we were pair-programming/designing the structure our game would take on, we would encounter an issue, such as which class to store the game loop, but coming up with solutions that didn't make implementing at least one of our ideas more difficult was challenging. We found that taking a step back and compiling lists of necessary and if-we-have-time features made it far easier to proceed. Similar to the client, both of us had memories of playing 2D computer games as children, so we tried to draw upon these experiences when designing the game based on what aspects were most enjoyable.

Another key issue encountered were cross-platform difficulties. To support ease of use for the client we wanted the code to work on any operating system (Windows, Linux, Mac, etc), fortunately Java was designed with this in mind. The 'Write once, run anywhere' mentality from the Java developers made it easier to achieve this goal, but there were several obstacles along the way. Keeping the warnings from the brief in mind, we tested our code on both Windows and Ubuntu regularly, but as we discovered later on the lab computers at university don't always display the same behaviour. A frustrating case of this was when implementing sound effects, using the MediaPlayer class from the JavaFX packages run fine on both operating systems on our laptops, but when it came to the lab computers it didn't seem to work, which we attribute to different/outdated software versions. Fortunately a different approach, using an AudioInputStream, worked. Similarly, although the game loop was called at regular intervals on our machines, due to differences in computing powers this wasn't the case on the lab machines, resulting in a speeding up & slowing down of the game depending on what was being rendered. We overcame this by reducing the game loop iterations and scaling the movement speeds until a balance was achieved.

Java is a widely used, robust, object-oriented language which would allow us as developers to build our software with a high level of abstraction. This makes it a strong choice for game design, though obviously not as efficient as specialised game design platforms such as Unity. Using the JavaFX packages with Scenebuilder to support made level design incredibly intuitive, and our previous experience with JavaFX made getting started much simpler. In-built nodes such as progress bars, groups, image views, etc. featured heavily in our code. Overall, with the project scale as it was, Java was definitely suitable for the task and allowed us to create a game that surpasses the minimum specifications.

Clone this wiki locally