TankWars php multiplayer test

Show us your completed creations made in Construct 2

Post » Wed Nov 20, 2013 8:32 am

Yeah I think with over 50 players it wwould become problematic already, not so much on the php side, but more on the app/client side.

Every update it fetches all the info from the players alive and process/updates it.

Perhaps I should look into doing targetted update requests.

IE, only update/process the units in x distance around the viewport.

That might actually work and greatly improve performance, allowing support of more users.
Perhaps for a later stage, so far still good hehe
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Wed Nov 20, 2013 8:45 am

A good server with above average specs should handle a hundred or so no problem.

A 1000 or more players. Load balancing and server clustering - Probably Load balancing switches. I'm not an expert in this :) would be needed.
DUTOIT2013-11-20 08:47:49
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Wed Nov 20, 2013 8:53 am

[QUOTE=DUTOIT] A 1000 or more players. Load balancing and server clustering - Probably Load balancing switches.[/QUOTE]

@dutoit

PHP/mysql is able to process sooo much information in half a second, with the current mechanics I have, I doubt it would become an issue up to 1000 players. As long as your using a dedicated host (not private single server) Generally, good webhosts have so much capacity nowadays ....

That lennaerthohe.nl address, hosts 2 sites, several other highscores and mmorpgs, and this tank game, and so far I can see its hardly having any impact :)

Good times ^_^
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Wed Nov 20, 2013 9:20 am

[QUOTE=lennaert] As long as your using a dedicated host (not private single server) Generally, good webhosts have so much capacity nowadays ....
[/QUOTE]

And not VPS.net lol, 4gig ram with them is equavalant to 1gig elsewhere. I was with them for over a year and it was the worst experience ever. I also had mediatemple, etc and could compare very accurately that VPS>NET suck.


I like wpengine at the moment(I favor wordpress as cms) and those guys can sure take on some serious server load. And one less thing to worry about - updates, caching, etc etc etc. Guess you get what you pay for.

Agreed, good times, and only getting better.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Fri Nov 22, 2013 10:34 am

Updates:

Added high score table, which shows when you are kiled.
Your high score will consist of the kills you did during an active session, if your killed, your kill score gets reset.
If you reload to replace yourself, your kill score goes to 0.

Added a red dot on the radar to indicate self position.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri Nov 22, 2013 10:38 pm

I built the Firebase plugin to do this kind of thing without a server. Firebase's hosts are served off a CDN and are a million times faster than anything you or I could afford bandwidth wise.

I played your tanks game but I got lonely :(

I don't understand the radar, it it's coordinates relative?? It seemed to be taunting me but I could never get anywhere. I got stuck and annoyed in the wall maze too. The walls are waaaay too long to be fun trying to navigate whilst moving at snails pace.

I want a fight though! It will be awesome if enough people are online at the same time.
tlarkworthy2013-11-22 22:39:18
B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Fri Nov 22, 2013 11:27 pm

@tlarkworthy

Hi, thanks for playing ^_^

The radar is just a small representation of the entire map, but you can hide in the corners xD as the radar dial is round and only shows positions when the dial cross's it.

I figured the map huge yesterday already, but making half as small would require some repositioning.

I'm making progress on a somewhat different game where I was testing the php for, which requires far less connection stress as this one, but still :)

TanksWars game mechanics in construct itself is less then 60 events though :)


I was just playing your game still, busy trying to get the controls to work decent to get that nebuchanezer one hehe :D


About other methods to connect, and send data, this does work with cocoon hehe, and I am a php programmer myself with quite some mysql experience and if need be build enormous relational databases :)   its a bit of my forte, so dont want to switch ^_^


Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sat Nov 23, 2013 9:03 am

@lennaert,

nice job, me and a friend of mine poked around in the map for a while. took a bit for us to get on the same 'game', but then we got and trolled around for zombie tanks...lol.

good job on the multiplayer. you may get swamped with requests for a tutorial soon...lol.
B
81
S
32
G
23
Posts: 1,053
Reputation: 35,965

Post » Sat Nov 23, 2013 10:27 am

[QUOTE=harrio] @lennaert,

nice job, me and a friend of mine poked around in the map for a while. took a bit for us to get on the same 'game', but then we got and trolled around for zombie tanks...lol.

good job on the multiplayer. you may get swamped with requests for a tutorial soon...lol.[/QUOTE]


hahah awesome :D

thanks for the feedback ^_^

I was creating an on screen control for mobile devices this morning, and suddenly noticed people slaughtered all the other tanks :P

Good work :D


am already in the process of making a tutorial for the engine :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sat Nov 23, 2013 7:30 pm

I have added a tutorial to make games like this, everything should be in the   tutorial   including a capx file which holds the PHP files.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: paradine and 7 guests