Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying JMonkeyEngine 3.0 Cookbook
  • Table Of Contents Toc
JMonkeyEngine 3.0 Cookbook

JMonkeyEngine 3.0 Cookbook

By : Rickard Eden
4 (7)
close
close
JMonkeyEngine 3.0 Cookbook

JMonkeyEngine 3.0 Cookbook

4 (7)
By: Rickard Eden

Overview of this book

If you are a jMonkey developer or a Java developer who is interested to delve further into the game making process to expand your skillset and create more technical games, then this book is perfect for you.
Table of Contents (12 chapters)
close
close
11
Index

Making a networked game – Battleships


In the previous recipes, we looked at how to set up a server, and connect and handle basic messaging. In this recipe, we'll reinforce this knowledge and expand it by adding server verification and applying it to a real game.

A turn-based board game is perhaps not what you would normally develop using a 3D game SDK, but it's a very good game to learn networking. The Battleships game is a good example not only because the rules are simple and known to many but also because it has a hidden element, which will help us understand the concept of server verification.

Note

If you're unfamiliar with the Battleships game, visit http://www.wikipedia.org/wiki/Batt.

Since we're mainly interested in the networking aspects of the game, we'll skip some of the verification normally needed such as looking for overlapping ships. We also won't write any graphical interface and use the command prompt to obtain input. Again, to focus on the networking API, some of the plain Java...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
JMonkeyEngine 3.0 Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon