Giter Club home page Giter Club logo

sko-server's People

Contributors

jacobodden avatar optimuspi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sko-server's Issues

Nice exit handler

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

Physics runs in hyper speed eventually

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.

ipv6 support

Some day, need to change to a different networking library that has ipv6 support.

Class SKO_ContentLoader

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

Throwing trohpies repeatedly causes lagg, chaos ensues

Related to OptimusPi/SKO#31

sko-bug-trophies-thron-behind -me

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.

SKO_Enemy death is accidentally broadcasting to all players

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.