Comments (2)
@Poea Could you give more details please?
You may get items disappearing on the map if your front end doesn't receive updated data for a while.
That can happen if your WORLD_UPDATE_INTERVAL is too low and the cell processing takes longer than the update interval (the CPU can become congested).
If this happens, you may want to make the WORLD_UPDATE_INTERVAL
higher. The default 20ms is actually really low/fast (it's 50 times per second), 40ms is more reasonable (and most games seem to update at that rate since bandwidth can be expensive anyway); if you find the 40ms interval to be too 'choppy', you may want to add some sort of motion smoothing/interpolation on the front-end to smooth things out.
Having a longer interval duration allows you to perform more processing without overwhelming the CPU.
Another solution if you don't want to increase the WORLD_UPDATE_INTERVAL
, is to make the cells in your grid smaller (see this) - With more smaller cells, each cell will cover less area and will have fewer items/states to process so it means that it can process them faster (and, therefore, it will be able to keep up with the low WORLD_UPDATE_INTERVAL
).
from iogrid.
i'll take a look into client side interpolation
from iogrid.
Related Issues (10)
- basic start up error HOT 2
- Can I use yarn install instead of npm install?
- Updating to latest socketcluster version HOT 1
- Error when starting testing/development serve. HOT 8
- Error: listen EADDRINUSE :::15454 HOT 1
- How do I add additional player operation events to cell.js? HOT 5
- Are there any games currently using this framework? HOT 1
- help
- `iogrid/public/socketcluster.js` can be replaced?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iogrid.