Games i would like to make a multiplayer game, any ideas?

ilan

Expert
Licensed User
Longtime User
hi

i would like to make a multi player game where 3-6 people are connected and fight each other.
what could be the right (best) approach for that?
 

ilan

Expert
Licensed User
Longtime User
You can use B4J to implement a WebSockets server. This will allow all clients to be connected

How? I am very weak with everything that is about server, websockets,...

Do i need to run the server with a unique ip?
Can i use RP2 for the server?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

andymc

Well-Known Member
Licensed User
Longtime User
How about a worms type game. It's real-time multiplayer but allows for latency. The physics would be easy using box 2d. Not sure about the terrain destruction though. Maybe expand on your knight game by having knights throwing arrows and swords at each other over castle walls?
 

ilan

Expert
Licensed User
Longtime User
How about a worms type game. It's real-time multiplayer but allows for latency. The physics would be easy using box 2d. Not sure about the terrain destruction though. Maybe expand on your knight game by having knights throwing arrows and swords at each other over castle walls?

i was thinking about a Boxing Fight game where 2 Player fight each other.

i think before i do this game i will make a turn based multiplayer game that should be much simpler.
i will use firebase for this.

but the realtime multiplayer option is something that i want to study. i think those game are very popular and people like to play against others.
first i need to finish 3 projects (update 2 b4a apps UI + 1 new b4a App) then i will start the turn based multi game and then go for a box2d game.
 

ilan

Expert
Licensed User
Longtime User
BTW, I wouldn't use Firebase as the backend of a multiplayer. You need a real server.
You can find low cost VPS for about $10 per month.

ok, i will use firebase to see that it works and then change it to my own Server using Push massaging.
i am planning to create my own server at home. i have about 6-7 notebooks that are only laying down.
i found a good tutorial how to make a server and i want to try it out.

having my own server will give me a lot possibilities like using self made b4j servers :)
 

LucaMs

Expert
Licensed User
Longtime User
building the framework for that should be very simple
Right, it should be very simple :)

As usual you will meet many unforeseen, like disconnections/reconnections, activity paused, slow connections, etc.

If the game has few rules / actions (and if only the active player, which has the turn, can act) you already have a small advantage.
 

ilan

Expert
Licensed User
Longtime User
Right, it should be very simple :)

As usual you will meet many unforeseen, like disconnections/reconnections, activity paused, slow connections, etc.

If the game has few rules / actions (and if only the active player, which has the turn, can act) you already have a small advantage.

Sorry but you are talking about a different approach.

Turn based game look FOR ME like this.

2 phones
1 ask the other to start game by sending push msg.
Player 2 accept 》 game starts

Player 1 turn - player 2 wait for push msg to know what player 1 did

If 30 sec nothong appears player 1 is out.
Game end

If someone end the game it sends push msg that game was wnded.

Slow connection,... is not a factor on a turn based game.
You are not on realtime connected.

The game runs on your phone and not on a server.
 

ilan

Expert
Licensed User
Longtime User
Look at it as a messaging app like whatsapp
Firebase is a good solution in my opinion.
And should be very simple to do.

2 player subscribe to the gameid topic that 1 player created and start sending each other notifications that are in real coordinates of game move.
 

LucaMs

Expert
Licensed User
Longtime User
If 30 sec nothong appears player 1 is out.
Game end
if the game requires less time for each move and the user has a slow connection, you throw him out and he curses you :).

The game runs on your phone and not on a server.
the server must "have the power", otherwise if someone (hacker) changes the client...

Anyway, try to develop a multiplayer turn based card game (b4j websocket server + b4a client), do it well (OOP & make if flexible) then... share it :D
 

wonder

Expert
Licensed User
Longtime User

LucaMs

Expert
Licensed User
Longtime User
From that page:

In the authoritative group, the most common approach is the client-server architecture, where a central entity (the authoritative server) controls the whole game. Every client connected to the server constantly receives data, locally creating a representation of the game state. It's a bit like watching TV.

In many cases you will need to send and receive information not strictly related to the game (client <--> server); for this reason I think it is better to use this methodology, instead of the other cited, non-authoritative.



In the non-authoritative group, there is no central entity and every peer (game) controls its game state. In a peer-to-peer (P2P) approach, a peer sends data to all other peers and receives data from them, assuming that information is reliable and correct (cheating-free):

cheating-free!
 

Beja

Expert
Licensed User
Longtime User
I am thinking about very unusual outside the box solution.. The idea is a lttle blured and not ripe yet (in terms of final algrthm). Will share it as soon is it gets together. Generally it is a combination of smart figures and interaction. I am not very active in coding and that's why I look for the easy and impossible solutions.
 

Troberg

Well-Known Member
Licensed User
Longtime User
A game idea I had, but probably won't make, is based on the old style bullet hell shoot em ups. Typically, you flew an aircraft or spaceship over a landscape, shooting oncoming enemies and ground structures, while dodging a shitload of incoming shots and missiles.

Now, here's the twist: Make it turn based.

So, instead of a single ship, you have a large, tough ship (with turrets and a big cannon) you need to escort to the boss (you need the large ship to destroy the boss) using, say, two fighters and two bombers. You give your orders, everything moves a little bit, then new orders. You'd get the same "ballet around the bullets", but turn based.

So, here's the next twist:

The boss represents another player, and each player builds their own defenses, placing turrets, ships, powerups and so on. Now, how do you balance it? Well, before a player can be attacked, he first have to beat his own defenses, to show that it can be done.

Then, you score points for successfully attacking, and for successfully defending.

If you make it, tell me, because I'd love to play it.
 
Top