jesyikaturner:

Twitter | DeviantArt | Tumblr

‘Monster Game’, an assignment game. 2016.

Monster Game is a local multiplayer game of 2 to 4 players, where players face off against each other in a battle of wits and skill. Players lure their opponents into inescapable corners in order to avoid the wrath of the monstrous alien pursuing them. [Gameplay]

So this game was made in java using JavaFx to handle images. It uses Java RMI to connect to a server hosted on a local network. We were originally going to use UDP but thankfully our tutor pointed us on a better path. It certainly made the sequence diagrams easier to manage. 

I created the tilesheet used for the game and coded the pretty stuff into the game. All the gameplay stuff is thanks to one of my team-mates. I’m pretty pleased with how the game turned out, it certainly looks better than I expected.

 I spent some extra time after we presented it, to build it into a runnable jar file using Eclipse and encountered some issues. I’m using JavaFx to display my images, so I’m coding it like this:

Image title = new Image(“file:./images/title.png”);

But when it builds, it won’t display the image. I looked around and managed to find a fix. I’m not sure I completely understand why it’s wrong, so I’m not going to even try explaining what’s wrong with it. So to fix it, I’ve rewritten the code ot:

try{

BufferedImage b_tbg = ImageIO.read(getClass().getResource(“tbg.png”));
Image i_tbg = SwingFXUtils.toFXImage(b_tbg,null);

} catch (IOException e) { }

This way works and completely fixes my issue. Now I have a completely working game that doesn’t need Eclipse to run.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: