optimuspi / sko-server Goto Github PK
View Code? Open in Web Editor NEWLinux Server code for Stick Knights Online
Linux Server code for Stick Knights Online
When I warp to a new map through a portal or otherwise,
Other players appear to be stuck walking or not walking at all, because I have not been informed about their position after I got to this map.
Resolve all compiler warnings, or as many as possible.
Some day, need to change to a different networking library that has ipv6 support.
Check party statuses
After successfully using trade or party functionality, and then doing it again, or cancelling and doing it again, seems to put it in a broken state where these actions cannot be performed.
Related to OptimusPi/SKO#31
While this is technically enabled by another bug, it indicated something potentially valuable. If these packets cannot catch up it causes teleporting and rubber-banding. There could be a way to clear our packet jams better.
Furthermore, client bugs should not allow packet spam. Throttle actions such as throwing trophies, dropping items, etc.
When a SKO_Enemy dies, its death is broadcast to players on all maps.
Example:
On Map 0 (Main Cave), Enemy 4 died (A Bandit).
User was on Map 2 (Tutorial Island) and heard items_drop_noise
play, even though there are no enemies nearby.
Acceptance Criteria
When an enemy dies, the server must match the enemy's map with each player's map in order to send the ENEMY_MOVE_STOP packet at coordinates (ENEMY_DEAD_X, ENEMY_DEAD_Y)
Eventually, the physics will run at hyper speed, using a ton of CPU. I've seen 1 server running above 99% CPU, and two servers on the same CPU using ~44-45% each
I believe this might happen when the timestep falls behind, it might be called the "spiral of death" as described here: https://gafferongames.com/post/fix_your_timestep/
OPI_Timestep is loosely based on this code so it might need to be fixed. Not certain what actually causes this or why it would get behind, but making the physics loop / decreasing threads will help I think.
Code like this in main.cpp
:
//maps and stuff :)
const char NUM_MAPS = 6;
SKO_Map map[NUM_MAPS];
Should be loaded using a SKO_ContentLoader class.
I imagine the calling code to look like this:
//Content
SKO_ContentLoader contentLoader = SKO_ContentLoader();
SKO_Map maps[] = contentLoader.loadMaps();
Eventually, called in class SKO_Game
that will initialize everything and become a shared game state object
Need a nice way to exit the server, mostly so everything gets cleaned up and the port is not left in a bound state.
Most of the time, I close the server using sudo killall skoserver
if it's running in the background, otherwise if I ran it using ./skoserver
then Ctrl + C
works. When I do this, the server cannot run again for a minute or two which is annoying / down time is never fun; this happens due to the port being "in use"
I know there's ways to detect an exit interrupt and handle it nicely in C++.
Something like this perhaps? https://stackoverflow.com/questions/1641182/how-can-i-catch-a-ctrl-c-event
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.