geosearchef / rtsio Goto Github PK
View Code? Open in Web Editor NEWweb based RTS, using js as frontend, java as backend
web based RTS, using js as frontend, java as backend
(and maybe, maybe, maybe Internet Explorer 11)
Uncaught TypeError: Cannot read property 'send' of undefined
at send (gameScript.js:382)
at Object.Latency.update (gameScript.js:871)
at update (gameScript.js:105)
at gameLoop (gameScript.js:222)
5gameScript.js:382 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
at send (http://geosearchef.de:4567/play/gameScript.js:382:12)
at Object.Latency.update (http://geosearchef.de:4567/play/gameScript.js:871:9)
at update (http://geosearchef.de:4567/play/gameScript.js:105:13)
at gameLoop (http://geosearchef.de:4567/play/gameScript.js:222:5)
"The [...] unit is also able to receive an attack command, which is given by right clicking on a hostile unit."
update health setter in unit/building
--> infinite deletion commands
Jitter causes lag/stuttering due to update packets after collisions taking different times to arrive.
-> Sync with backend (periodically update) and delay all packets until x * LAT (with x =~ 1.3).
This is done in backend only and may be the reason for the lag during collision.
#10 related
Log:
{"t":1511906264731,"type":"ping"} {"type":"pong","t":1511906264731} {"type":"updateUnit","unitID":168,"pos":{"x":67.292786,"y":85.01045},"vel":{"x":0.0,"y":0.0},"dest":{"x":66.89562,"y":84.76594},"hp":100.0} {"type":"updateUnit","unitID":170,"pos":{"x":68.523186,"y":84.01323},"vel":{"x":0.0,"y":0.0},"dest":{"x":68.36437,"y":84.25031},"hp":100.0} {"t":1511906264778,"type":"ping"} {"type":"pong","t":1511906264778} {"type":"updateUnit","unitID":161,"pos":{"x":63.861423,"y":82.74544},"vel":{"x":0.0,"y":0.0},"dest":{"x":65.70812,"y":83.18781},"hp":100.0} {"type":"updateUnit","unitID":164,"pos":{"x":64.773705,"y":81.65526},"vel":{"x":0.0,"y":0.0},"dest":{"x":67.83312,"y":82.20344},"hp":100.0} {"type":"updateUnit","unitID":166,"pos":{"x":70.84508,"y":83.34823},"vel":{"x":0.0,"y":0.0},"dest":{"x":68.4425,"y":83.07844},"hp":100.0} {"type":"updateUnit","unitID":173,"pos":{"x":66.05212,"y":84.236176},"vel":{"x":0.0,"y":0.0},"dest":{"x":66.89562,"y":84.76594},"hp":100.0} {"type":"updateUnit","unitID":176,"pos":{"x":64.417755,"y":84.58498},"vel":{"x":0.0,"y":0.0},"dest":{"x":67.02062,"y":83.68781},"hp":100.0} {"type":"updateUnit","unitID":209,"pos":{"x":57.544018,"y":58.094227},"vel":{"x":0.0,"y":0.0},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":202,"pos":{"x":55.99068,"y":56.48169},"vel":{"x":-1.9454277,"y":-0.46401647},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":205,"pos":{"x":56.8031,"y":56.928047},"vel":{"x":-1.8478211,"y":-0.7652165},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":206,"pos":{"x":54.21371,"y":57.3668},"vel":{"x":1.4959936,"y":-1.3274049},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":214,"pos":{"x":56.09512,"y":54.608784},"vel":{"x":-0.7732742,"y":1.8444638},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":215,"pos":{"x":55.476852,"y":55.62032},"vel":{"x":-0.28316778,"y":1.9798526},"dest":{"x":55.375,"y":56.335938},"hp":100.0} {"type":"updateUnit","unitID":200,"pos":{"x":54.14375,"y":55.443523},"vel":{"x":1.619294,"y":1.1738343},"dest":{"x":55.375,"y":56.335938},"hp":100.0} 520597901 [qtp1939302984-17] INFO de.geosearchef.rtsIO.websocket.WebSocket - Session to 85.233.*.* closed for reason: null 520597902 [Thread-2] WARN org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension - java.io.EOFException: Connection has been closed locally at org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:339) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:614) at org.eclipse.jetty.websocket.common.extensions.AbstractExtension.nextOutgoingFrame(AbstractExtension.java:188) at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.nextOutgoingFrame(PerMessageDeflateExtension.java:116) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension.access$1000(CompressExtension.java:42) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension$Flusher.compress(CompressExtension.java:550) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension$Flusher.deflate(CompressExtension.java:451) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension$Flusher.process(CompressExtension.java:431) at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension.outgoingFrame(CompressExtension.java:218) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack$Flusher.process(ExtensionStack.java:419) at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.outgoingFrame(ExtensionStack.java:296) at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.uncheckedSendFrame(WebSocketRemoteEndpoint.java:310) at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.sendAsyncFrame(WebSocketRemoteEndpoint.java:240) at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.sendStringByFuture(WebSocketRemoteEndpoint.java:412) at de.geosearchef.rtsIO.websocket.WebSocket.send(WebSocket.java:89) at de.geosearchef.rtsIO.game.Player.send(Player.java:200) at de.geosearchef.rtsIO.game.PlayerManager.lambda$broadcastPlayers$0(PlayerManager.java:31) at java.lang.Iterable.forEach(Iterable.java:75) at de.geosearchef.rtsIO.game.PlayerManager.broadcastPlayers(PlayerManager.java:31) at de.geosearchef.rtsIO.game.PlayerManager.broadcastPlayers(PlayerManager.java:27) at de.geosearchef.rtsIO.game.Unit.broadcastUpdate(Unit.java:146) at de.geosearchef.rtsIO.game.Unit.lambda$update$8(Unit.java:117) at java.util.Optional.ifPresent(Optional.java:159) at de.geosearchef.rtsIO.game.Unit.update(Unit.java:115) at de.geosearchef.rtsIO.game.Updater.update(Updater.java:18) at de.geosearchef.rtsIO.game.Updater.gameLoop(Updater.java:47) at de.geosearchef.rtsIO.game.Updater.lambda$init$0(Updater.java:53) at java.lang.Thread.run(Thread.java:748) {"type":"updateUnit","unitID":201,"pos":{"x":55.104633,"y":57.864624},"vel":{"x":0.34879532,"y":-1.9693506},"dest":{"x":55.375,"y":56.335938},"hp":100.0} 520669255 [qtp1939302984-14] INFO de.geosearchef.rtsIO.websocket.WebSocket - Session connected from 138.246.*.* 520669276 [qtp1939302984-4611] INFO de.geosearchef.rtsIO.websocket.WebSocket - Redirecting user to login
--> problem in some browsers
--> annoying
Test for 0 length
"Currently owned buildings and units are displayed in the top left, selected units are highlighted. The player can click on a unit icon to select that unit and double click on a unit to move the camera to its position"
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.