Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Sep 2012
Offline Last Active Aug 21 2014 02:05 PM

Posts I've Made

In Topic: Why is it that some say that open source multiplayer games are less secure?

22 May 2014 - 10:31 PM

I think making it easier to find exploits is actually a good thing. If everything is closed source and someone malicious exploits it for their benefit then that's all they're able to do. Open source at least allows them to contact you and explain exactly what the problem is. I think It's much better to get hackers on your side rather than banning them as they're probably going to be more willing to help you fix problems rather than using them to ruin the experience of others.


That's the attitude I'm going to have at least if people start hacking my game, I'll embrace it.

In Topic: Safely Simulating Player Movement Server-Side

18 April 2014 - 07:36 AM

Even if it's running the same code, the server is using the last received input to drive the player. Without going back in time on the server, actions are going to happen at completely different times than what got predicted. I know that it's going to go out of sync if the server does something to the player that the client can't predict, I'm fine with that. I just can't fix this specific problem without causing some kind of cheating.


One way I thought about solving this is to timestamp the input packets and have the server go back in time to apply inputs and simulate the player from where they actually happened but only allow a small timeframe of about 200ms. That's still open to abuse but maybe there's no stopping that completely.


Perhaps it's better if I just send frametimes to server so it knows how long to simulate for but protect against huge frametimes that can't possibly happen, that way a cheater wont gain an advantage but could freeze the player in mid-air (which may not be an advantage depending on the game)

In Topic: Rollercoaster Track Orientation

15 June 2013 - 11:42 AM

Hmm, it looks like an angle wrapping problem to me, although I can't figure out exactly where it's ending up backward. Maybe during the interpolation. But I would recommend using a fun technique, where angles are represented as a 16-bit value, with 65536 being a full revolution so it automatically wraps when it overflows. You can simply read the value as signed 16-bit if you need a -180 to +180 degree value rather than 0-360.


At the very least, it'll save you doing those wrapping if checks, and it will keep things wrapped during interpolation. You can subtract, then read as signed, and it naturally takes the shortest path positive or negative to get from one value to the other, as opposed to radians where you might end up trying to go from -180 to +179 degrees by going all the way around, rather than just one degree backward.


There's really not much to it, but here's my code. Scalar is just a typedef of float or double depending on what system I'm coding for, and s16/u16 are signed short/unsigned short. The ScalarConstant macro either does nothing, or adds an f, like 65536.0f. Oh, and sometimes I make Scalar a fixed-point value, although the multiplies in this particular file wouldn't work right unless using C++ with operator overloading...



I don't think it's a wrapping problem because it doesn't matter what combination of roll values the nodes have - it will still twist in that situation no matter what. I'm starting to think there's no simple fix for this and the calculations needed to do this are much more complicated than the basic ones I'm doing.

In Topic: Rollercoaster Track Orientation

15 June 2013 - 04:58 AM



This kinda makes it easier to see what's going on but I still have no idea how to fix it.


They are just the up vectors at each point.

In Topic: Rollercoaster Track Orientation

15 June 2013 - 04:00 AM

Yeah, there's multiple points between nodes, I need to calculate the up vector for each point.


In wireframe just to make it clearer.




I tried dotting the previous up with the current up and negated it if it's negative - doesn't seem to fix it, I'm probably just not understanding what you mean :(