Tag Info

New answers tagged

0

I've had the same type of quirk, and after some experimentation I've found that it's caused by the while (window.pollEvent(event)) loop. I re-worked my method just to read the message (window.pollEvent(event)); at the beginning of the while(window.isOpen()){ and then go from there. This causes the frame rate to skyrocket, and you'd definitely want to ...


0

You will send the entire state of the given simulation to any player who joins. That does not mean you need to send the entire representation of the host/server representations, but you do need enough that the client can accurately render and interact within the simulation. This might include things like: Sprites Names Position Velocity Bounding sizes ...


2

When you have a multiplayer game, you have to be aware that the players are able to cheat with everything that is computed locally. When you want the game to be fair, you have no other option than to move all game mechanics (movement, mob AI, collision detection, damage calculation, ..., ... ) to a central server. But let's assume that the community around ...


2

Your problem is that mouse move events are discrete. For example, slowly moving the cursor over 50 pixels, might get you 5, 10, 15 or more mouse move events. However, if you move your cursor fast, it's possible to get only one mouse move event for the entire distance or possibly none at all (if the target point is outside your window). This is something ...



Top 50 recent answers are included