Is it possible to do multi-player on different platforms?

Hi
Suppose we have a LAN multi-player game which is developed in JME for Linux , Widows and Android .
we run the server on windows . is it possible the clients from Android and Linux also connect to it and play the game whit each other?
Sorry if my question is awkward .

Sure.

3 Likes

Yup, though people tend not to do this in competitive play on account of the advantages/disadvantages of the relative controllers

Its mostly down to contracts and corporate interests. What would be the difference between an XBox and PS4 controller? Or a Mac and Windows mouse?

Although i cannot imagine how you would play any rts on an android.

With lower resolution units? Actually RTS games are some of the few that make sense to me on a touch screen.

Is there any specific code by which we can lower polygon of a mesh inside jme? (not using blender or makehuman)
for example we imported a high poly human from makehuman and we want to decrease the mesh to low poly in android but high poly in windows or Linux.

Edit: or we should use different character mesh for windows and android?

Different meshes, yeah.

I just read about Level of Detail (LOD) Optimization.
Can i use it for reduce polygon in level 0 (original mesh)?

You’d still load all vertices to the memory of the android device, then only render half of them - that doesn’t make much sense. LOD is for levels of distance (hence the name).

Hi normen
I’m asking this because I don’t know about networking yet . (It is my next plan to learn)
for now I am curious to know if I use two different mesh for same character in windows and android (a high poly for windows and a low poly for android) how will they see each other on their screen ?
will android client see windows player’s character with high poly or low poly in it’s screen?
would be any problem or no ? I will appreciate you if answer my last question.
thanks…

you create 2 assets pack: low and high (with same asset path/name inside).
on desktop you use high, on android you use low. Same code on both.

1 Like

I think you’re having a little of trouble because you don’t know how networking works in JME. Let me put it this way:

The clients are constantly sendind messages to the server. The server handles those messages and responds the way you want. For example, a client sends a PlayerPosition message. The server then broadcasts to the other players the same message, so the other clients know someone moved.

I used to think of a server as a world where people join and do whatever you want. I pretend that the server is just a master computer that sends little information to others, so the client has to use that info to pretend you’re playing with others. It helped me understand the concept.

Any problem with networking, we are here to help! xD

1 Like

Thanks my friend.Yes I do not know much about networking. It is so interesting and I will learn it as soon as I can.
I’m planning to develop a multi-player game for my university project.
As I explained above I make it for windows ,linux and android and so they can play multi-player in lan. I did not know how should I manage for android. because I want a high graphic characters for windows and a low graphic for android I found that it is possible thanks to @normen $ @david_bernard_31 . as David mentioned I should use to different assets for windows and android. I hope I can do a good job with help of you guys.
I really love this place . always there is someone to help you.
I really appreciate you.

Never do that, or you’ll end up with a game where people can fly-hack and teleport-hack etc.
The client must send orders (movements etc) to the server and let the server accept or deny the commands (and incidently transmit positions to all players). The client don’t send position, it’s something that only the server should be able to do.
Always think: “what if the program running client side is NOT my client but a completly different program that does all what he can do to hack my game ?”. Everything the client does must be checked, and at the very first attempt to do something not correct the server must throw it away. This includes spamming.

1 Like

Thanks, but that was just an example. Of course I don’t do that in my game!

I am highly agree with you. authentication and authorization (AA) are concepts that are important in case of security .

Not sure If I ask in this post or not but Now that we talked about security ; what is your idea of using spring security API in my game?

i dont know the psring api, but last time i tried to do security on jme i needed to do everything myself (there was no ssl channel on the spider monkey, so the encryption and decryption of datas and certificate chain validation etc needed to be done manually.
If you plan to have a central-in-the-world server, then you can add the public key of it in the assets of the game, it will save some time and some work in the code (like certification authority etc).

If you have to ask these sort of questions you should take 10 steps back and make a VERY basic simple game. Then look at other concepts one by one.

Multiplayer will kill you if you do not even understand where the assets are in a networked environment.
You will face challenges like race conditions, “a player disconnecting during gameplay”, etc.

I don’t mean to offend or insult you. Do yourself a favor and do not try this yet.

1 Like