raitobezarius / accel-turn-poc Goto Github PK
View Code? Open in Web Editor NEWAn Accel Turn proof of concept. (explorating a gameplay)
License: Other
An Accel Turn proof of concept. (explorating a gameplay)
License: Other
I won't implement auth mechanism.
But a bit of database serialization would be cool though.
Just for position, skin, player ID and player name.
I feel bad to auto-generate them at server runtime. :///
Currently, there is no such mechanism implemented.
And in order to achieve the Accel Turn (TM), we'll need it because movements are going to be highly unpredictable and different.
Sometimes, it seems like that two clients can be desynchronized.
To understand easily, the result is we got that during a playing session:
There is one unit of difference between them.
The issue seems to arise when you move one of the player very quickly.
My feeling on that is that I should check the client prediction system which is not limited to local player only, whereas it should.
If you spam a lot moves to go outside of the map, you will actually go outside of the map.
... Because, between doing a pre-check of your position and doing the real check, there is two world of difference. :c
Anyway. That's it.
I don't know why but it's taking a lot of time to load a 30 x 20 tile map.
I'm sure that it isn't due to the JSON stuff (loading big JSON blob isn't a real issue and it is a fast operation).
But, I don't understand why 10 400 iterations seems to be a issue for Python.
for x, y, tx, ty in structured_data['map']:
variations = [(0, 0), (0, 1), (1, 1), (1, 0)]
for delta_index, delta_pos in enumerate(variations):
dx, dy = delta_pos
self.tileMap[index + delta_index].position = sf.Vector2((x + dx) * self.tileSize, (y + dy) * self.tileSize)
self.tileMap[index + delta_index].tex_coords = sf.Vector2((tx + dx) * self.tileSize, (ty + dy) * self.tileSize)
index += 4
I should look where can I optimize those.
Maybe by pre-computing some stuff. I could down this loop to 2 600 iterations.
As said in 96be65b, it seems like that the server does bad things on his side to simulate the world state.
Going to investigate that, as it could be the key to a nearly perfect client prediction.
Whenever #3 is implemented, we'll naturally need this one.
If I implement some melee or attack system, attacking someone which is in Accel Turn (TM) will be impossible without lag compensation.
The client's loading screen isn't working
Let's add some stuff to make it nicer :)
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.