My First full JME Project: Dominoes

Hello Everyone. I am sharing with you all what I am doing so far with my very first JME full game project: Dominoes. You may have seen it in the monthly screenshots. I wanted to create a topic to post my updates as the project goes

I was planning of making another type of game but since I was changing from Unity to JME and I wanted to learn more about the API and the strengths of this engine I decided to start with this one instead.

Why Dominoes?

In reality, because it’s one of the easiest board games to play once you know the rules. and to translate a board game to a videogame is to me one of the best ways to start learning about a game engine API as well using the strengths of the programming language and get experience with JME in the process.

The game is still in development as I start optimizing and refactoring code to something more reusable.


  • User Inputs to play with the tiles, not just camera.
  • Different levels of AI instead of just putting the first available tile at hand.
  • Determine the winner of a match.
  • UI
  • Background (Skybox maybe?).
  • Audio.
  • Multiplayer.


  • Cross Dominoes.
  • Mexican Train.
  • Solitaire games with tiles.
  • More tables.
  • More tile sets.
  • more backgrounds


  • Double left click on the tile to play it.
  • Right click and drag to rotate the camera.
  • Use the mousewheel to zoom

It looks really good, nice work!

Thanks! :smiley:

It has been really interesting the use of the interpolations for the tiles as they move from a stack to the hand, arranging the hand and placing the tile on game. Also I am learning where Controls or AppStates are more suited, using a separate thread for AI (basic for now), among other stuff that JME can do to help me make this project.

A quick simple update:

since I am aiming to go from double 6 to possibly double 18 dominoes sets, I made a simple solution of modeling just one tile in blender that will contain two main materials:

  • the material for the whole tile
  • The material for the numbers of each side of the tile

Then for each number I prepared the 19 textures from 0 to 18 withe a normal map (needs work I know) and texture for the tile itself. So that in code I could replace the textures according to the tile I am creating and complete the set. My first test worked but something worried me:

With double 12 I was getting a performance hit, and the problem was easy to find: I was changing the texture of each material for each tile. The solution was simple too: create a map of the common materials and load them once, then for each tile I assign these materials to the tiles making them faster to load and it improved the performance quite a bit

I also added winning conditions and now I am starting with the player Input. Then there may be some other optimizations :stuck_out_tongue:


Update #2:

After playing and fighting with Nifty I managed to dynamically have a list of players with scores and end numbers that change values only when an event from the game occurs. Started adding localization as well that later on I will add other languages.

Also player inputs with mouse have been implemented.

  • Right mouse button and drag moves the camera with your titles at hand.
  • Single/Double click (by setup) on a tile of your hand to set it to play automatically.
  • If on automatic play you have two or more different destinations, a GUI will appear asking for the destination number. The buttons are created dynamically so it can be reused for cross dominoes and mexican train. It was a good learning experience with Nifty

Now I have a complete game with two trains.

I hope to have a fully playable demo soon.

Edit: forgot to mention that I am currently looking at Leap Motion support as well

1 Like

Bumping here but it’s better to keep the topic for translation purposes. I need some help

Anyone interested the base properties file is located here

properties file

Thanks to everyone for their help in advance :smiley: d


Alright! Cross Dominoes (Spinner) is ready to go!

Also Switching between games is easy :smile:


Sorry guys. Being an employee takes a lot of time for me to keep on the project in a steady pace but I do have some updates.

The AI has been improved but I decided to release the game with two difficulty levels with more to come in the future:

  1. the “Lucky” difficulty is just as the name implies. The computer looks for the tiles it can play in its turn and chooses one at random. This one is easy to beat but it can be a good challenge for beginners as they get strategies to win or to lose with the least points possible.

  2. The normal difficulty has some strategy that never knows which tiles the other players own but has these basic concepts:

  • Get rid of doubles as soon as the opportunity arises.
  • Count the played pips(numbers) of the tiles on the table, the more that are played the more valuable they are to play.
  • Look for ways to close the ends to its favor and make other player take tiles from the boneyard or pass.

Another difficulty will be added with other strategies, but the code needs to be improved to that it becomes quite the challenge, but it can be quite good against amateur players.


  • Use the multiples in the ai calculations for Normal.
  • Ideas for cross platform multiplayer that is low cost :stuck_out_tongue_winking_eye:

Sound effects were added, recorded with my headset =P and audacity.
Music is free with creative license, so I had to show the proper license when each song plays.


Always been following this thread and now with music this is awesome…
Looks like a nice casual game of dominoes ^^

If you’re even gonna add multiplayer, throw it on to Steam for a few dollars!
I’ve seriously seen MUCH worse games there.

Totally agree with @zanval there, nice work :smiley:

Thanks @zanval and @DannyJo

Yes, I am adding multiplayer, I already have the code that will use any multiplayer library. I am looking at the oprions.

  1. make it P2P, since it’s dominoes the amount of data sent is small and I would only need a lobby server
  2. Use a standard server client multiplayer like spidermonkey, but that maybe be too much for a feature so simple as sending simple data every now and then.
  3. A simple server for messaging.
    $) I am open for other ideas :stuck_out_tongue_winking_eye:

I am thinking about putting it on Steam Greenlight, but I don’t know how much will that take to get it greenlit so I am aiming to use as much available channels as possible.

Note that spider monkey would be fine for this though you will run into scalability issues at some point if you ever want to support hundreds of thousands of simultaneous players.

If it were me, this is the route I might use (and I basically wrote Spider Monkey).

Me, I’d probably do some kind of RESTful web service. Done properly then you could even support disjointed games where people didn’t all even have to be online at the same time to play. (Kind of like ‘words with friends’ and stuff.) You get that essentially for free with a bit of design consideration. It’s also really easy to plop such services up on AWS nodes or similar cloud services should you decide to scale this up.


Thanks @pspeed I will take a look at that idea

I guess you can use service like PubNub or Google App Engine (less admin than AWS Node) for your backend. iirc Steam also provide this kind of service but in this case you’ll be lock to them.

1 Like

Steam offers leaderboards, achievement management, interacting with others, but not synchronising data between two players. So even if you implement steams features, you will need a server to synch your players.

You can also use Microsoft Bizspark, which gives you quite some VM power for 3 years for free if I remember correctly. After the three years you have to start paying for the VM @ Microsoft or rent a VM elsewhere. Anyhow, you get 3 years or free servers.

Heroku is a nice alternative too. It’s more flexible than app engine and it’s also free for the basic service.

Correct me if I’m wrong, but Heroko (like AWS) require to admin the node (OS, security,…) . Paas vs Saas :wink:

The cheapest backend I ever saw was a free php hoster.

jus have a serverlist there for initial ip exchange,
then try directly to conect.

This of course requires to have ports opened, but only the hosting player (server) has to if you use tcp as the basis.

AFAIK, AWS is IaaS, App Engine and Heroku are PaaS.
SaaS in another thing.

In heroku you deploy your app and you’re not aware what it’s running on, you need to choose the amount of “web dynos” by moving a slider, if you choose only one it’s free. (Pricing | Heroku)
I don’t know if it has any kind of auto-scaling.

I was looking a vpsdime since they offer a cheap backend service as long as it’s not a game server, ;P.

And so far build my backend with Jersey and client with Retrofit in the game. I am still reading though other services and clients that I can use though.