dasilvacontin / ag-drift Goto Github PK
View Code? Open in Web Editor NEW:mountain_cableway: Online multiplayer AG-racing web game.
Home Page: http://ag-drift.herokuapp.com/
License: MIT License
:mountain_cableway: Online multiplayer AG-racing web game.
Home Page: http://ag-drift.herokuapp.com/
License: MIT License
And pools for other commonly created objects, to avoid GC.
Default official weekly race: Tuesday 5PM UTC.
What should happen?
๐ฅ๐ฅ๐ฅ It is Tuesday 5PM UTC, time for AG DRIFT's official weekly race ๐ฅ๐ฅ๐ฅ\n\nStopping the current race to give way to the official race.
The official weekly race starts in X seconds
, with the text changing every second to reflect the remaining time to startOther requirements:
Mixpanel says that 10AM Tuesday is the most popular race time.
11:39AM is 7:39PM London.
London is in UTC +1 BST. Which means that Mixpanel's time is UTC -7.
Which means that Tuesday 5PM UTC is the most popular race time.
A player connected about 30 idle ships. Server became non-responsive.
Excerpt from logs:
2017-03-01T12:23:39.397946+00:00 app[web.1]: ci: 1, cj: 9, oldC: 4, c: NaN
2017-03-01T12:23:39.398090+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.398182+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.441265+00:00 app[web.1]: ci: 2, cj: 8, oldC: 4, c: NaN
2017-03-01T12:23:39.449498+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.449558+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.449631+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.489322+00:00 app[web.1]: ci: 5, cj: 8, oldC: 9, c: NaN
2017-03-01T12:23:39.500274+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
2017-03-01T12:23:39.500377+00:00 app[web.1]: ci: 5, cj: 10, oldC: 1000, c: NaN
This log statement comes from the following line:
Line 233 in e83ba95
It's meant for debugging the checkpoint system (which sucks big time). Not sure how oldC
becomes 1000
-> investigate.
Still, not sure if that detail is at fault for server's irresponsive behavior. A large amount of ships from which we don't get new inputs shouldn't be a big performance hit on the simulation (at least on the network side, since we only send inputs).
I should be logging key numbers for each simulation step, like simulationTime
, player#
, input#
.
Also, it may be possible that, in the client, background tabs are not stepping their simulation, yet receiving new inputs and becoming "lost", thus requiring a sync-back from the server, which IS network intensive. Log also sync-back requests over time.
should make a map selector to go to the old map if wanted too
You can get knocked out of bounds on certain turns on the main map making it impossible to finish a race.
and maybe some other properties. It may be causing part of the desync between client - server.
Socket.io probably optimises data serialisation when using .broadcast()
in groups of sockets.
Currently, it is probably serialising the data once for each socket, since we are currently iterating and executing .emit()
for each socket.
When hitting:
HP, and then blow up.
When the round ends it does not restart properly, it just freezes up and you have to refresh to enter the next match. This could also just be a connection issue on my end.
The map is formed by a combination of square colliders. We need an algorithm that combines/joins squares to form larger colliders.
It's an optimisation plus it fixes the bug where ships sometimes get stuck at walls, between two squares.
and please change the turn sfx
No need to broadcast inputs as soon as we get them. Buffer them and broadcast them in batches. Results in lower network usage, and a decreased number of re-simulations, both in the client and the server. Increasingly useful with the # of players.
eg. out of 40 players, 15 players change inputs in a given time range. Instead of producing 15 re-simulations, both in the server and the client, it produces a single re-simulation. Top gain.
The build status that appears on the README seems to be broken.
Sometimes, in a requestAnimationFrame
, there's not enough delta
to tick()
the game, and therefore, the ship's position is the same one as in the last frame.
We should generate a non-logical turn to smooth the game/animation.
press on the side to side-boost to that side. swipe left or right to turn 90 deg.
Extreme lag when opening up the site sometimes. Requires multiple refreshes before it allows me to start running smoothly.
To avoid people rendering the present and playing in the past.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.