Settlers in a new world

I've been trying out JGN together with jME for a while and the following was the result. It's the beginning of a multiplayer strategy game in the spirit of settlers of catan (board game) and civilization.



The current features:

  • servers verifies and executes all commands sent by the clients
  • clients subscribe to different sectors for updates
  • player can build resource buildings and will get resources from them
  • player has armies (the flags for now…)
  • player can select to move army
  • borders around territories, colored red or green
  • 5 different types of terrain
  • different minerals in the mountains
  • army banners showing current count of troops



    What's left to do:
  • make it possible to fight each other
  • make it possible to build new armies (in the city)



    But I will probably not finish it soon. Will have to much other things to do. And sorry for the bad art, I’ve made it in a hurry.



    And here comes some screenshots:



    Login:



    A fresh start for a new user:



    Multiple clients connected:



    Player maybe wants to build:



    Player wants to move army:


Looks very nice actually… you are too modest about the artwork :slight_smile:



What are your plans for this game? You said that you probably will not finish it any time soon… But what will you do when you do finish it? release it or just share the source or just play with your friends?  :roll:



I am asking because there is a distinct lack of example jME multiplayer apps, Flagrush being the only thing that resembles a game.



Nice work in any case and I hope you will finish this game…

Thanks for the feedback, I too enjoy reading about other peoples use of jME. I will try to answer your questions.



1)

I tried swing, FengGUI and BUI but didn't like any of them. Swing is to hard to change the look on and both FengGUI and BUI isn't ideal for the way jME works. Therefore I did my own very simple GUI. It realies heavly on a simple event model that I made.

a) click with mouse -> search thru list of gui-components -> find the target

b) if target implements the interface Selectable then ask the target to execute it's mouse clicked action

and so on…



2) Those shaders was for testing only in an other project. This game only uses the fixed function pipeline with the exception of the BloomPass.



3) The terrain and the buildings are separated models. The clients just reads an array that describes the terrain and creates the appropriate terraintiles, buildings and so on…

The banners is a little more advanced because they allow text (or images) to be printed on them in real time. This is done by having a text label quad in front of them with a little offset. Not the most elegant way but it works.

The highlighting works like that I put a special lightstate (with a dark light) at that node which will make it darker. This is a little cheating but works very well and will also affect the objects deeper down in the hierachy which I wanted.

I agree that the artwork looks terrific.  Also, whatever you end up doing with this project, thanks for posting this update: I find it encouraging to see what others are doing.



A couple specific questions, if you'd be willing to share some tips and tricks:

  1. How have you done the GUI?
  2. In the multi-client screen-shot, I see some shader files open in the editor in the background.  Are you using custom shaders?  If so, for what?
  3. Anything else you can share regarding what models you're using (for the terrain and buildings), or different techniques you're using (such as the banners, highlighting the selected hexes, etc)?



    Thanks again.

I'm new to jME and even newer to GUIs with jME, so I don't want to make you have to spell it out, but I'm very curious about what you've done.  (Of course, if you wanted to write a tutorial about it… :slight_smile:



I looked at the HUD tutorial and I'm wondering if you did the same textured quads, or an entirely different technique?



The Selectabled interface: I'm assuming that's something specific to your project?



Your gui components that can be clicked by the mouse: are they subclasses of a "core" jME class, or are they custom code from java.lang.Object on down?



Thanks again.

If you are interested in UI stuff then search for FenGUI in the forum.

That should give you a good start on what is possible.