Over-engineered Domino Game Project

I am still learning about ECS because I have a large project in mind. But I needed a smaller project that could maybe become a game in the process. So I though why not remake the first game I did with JME Multi-Dominoes?

I decided to resemble a real life game where we shuffle the pieces and pick them from the table to the hand. I made a prototype in Unity to see how it was possible and them went back to JME.

I chose to use ECS mostly due to the physics of shuffling. using a 3D physics engine with constraints causes plenty of headaches, so I went to use 2D and it was amazing how well it looked.

I also added a system for “tween?” so I can animate transform components and have the rendering state just update the spatial positions.

So far it’s looking very promising.

9 Likes

I went a bit back to add multiplayer before I proceed any further. I went to use Zay-es-net to see how it went and I love the result!.

For the moment I am using Lemur’s tween to smooth the positions changes since the server sends messages at 20 fps. I will use something else for the next milestone.

2 Likes

Note: I don’t know if you control the position on the server or just send events or whatever… but for real time synching where the server is the authoritative position, SimEthereal may save some trouble.

…it’s also more efficient than the TCP messages that Zay-ES sends. (The two libraries work quite well together because that’s how I use them.)

An example of using Zay-ES and SimEthereal together is here:

In that example, you can see how a BodyPosition component automatically handles the tweening between frames.

Plus, for an over-engineered domino project, there is something that seems perfect about using a real-time network sync library designed for twitch FPS games. lol

As to efficiency, my memory says SimEthereal can fit ~80 object updates in less than 1500 byte UDP messages. It uses a custom change-based reliable protocol built on UDP. Another user’s game was able to handle many thousands of simultaneous players.

3 Likes

Yes, The server handles the physics and handles the positions. the client just updates the spatials.

I was considering SimEthereal, but thought it would have been too much for a small game. But I will give it a go. Thanks for the suggestion!

I agree completely, lol.

1 Like

Some more progress.

Adding some dragging functionality to the tiles from the hands and reflecting that to the other players online. My goal is to have the experience a bit closer to reality, like when I play with family and friends.

6 Likes

To even more over - engineer it this definately requires a augmented realitity version.

1 Like

one day perhaps :slight_smile: . VR too