Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


wilberolive

Member Since 14 Jan 2014
Offline Last Active Yesterday, 07:43 AM

Topics I've Started

Removing @?

19 October 2014 - 06:16 PM

I've been working the AngelScript for about 12 months now and am progressively get more tired of the @ symbol. For some reason it always confuses me and trips me up. I've read the documentation a number of times about it, but always seem to struggle with this one aspect of AngelScript. Other than that I've found AngelScript to be really good (except for the lack of a supported JIT compiler, but that's another question).

 

I was just browsing the AngelScript website and noticed the removal of the @ symbol under the "Work in progress" section, which made me pretty happy. Why wasn't this decision made earlier? I would love to see all ref types treated as handles. Aren't they almost the same thing anyway?

 

Is there a reason though why this change is under the "long term goals" and how "long term" are we talking here?


Applying Server Corrections to Client Physics

10 June 2014 - 10:31 PM

I've been researching and experimenting with using simple physics in a multiplayer game. Specifically, I'm really only interested in having a character controller move around a 3D environment. To do this, I've been using PhysX, which works great. My game doesn't have any need for more advance physics than that.
 
I have read and followed a lot of the material on Glenn Fiedler's site, which everyone seems to point people to when they start asking these sorts of questions. His material has been really helpful and I've got something working. However, there is one part that I simply cannot get working. That is applying the corrected state on the client when received from the server. Specifically, Glenn says to "rewind" the physics state of the player, apply the correction from the server and then replay the rest of the player's moves.

 

This works fine in a situation where you have explicit control over the player's movements. However, when using a physics engine (like PhysX or Bullet) you have virtually no control over the player character controller's state or the movements it makes. All you can do is apply forces to the player's character controller. It's not possible to rewind the physics state of the character controller to correct it and then reapply the player's unacknowledged moves. How have other games done this using physics engines like these?

 

The best I've been able to come up with so far is to apply corrections using forces. For example, when a correction comes back from the server and I determine that the player's current position is out by a bit from where the server says it should be, I start applying small forces to the character controller to gradually bring it inline with the server over several frames. There's no rewinding going on with this. If the client and server disagree by too much, then I just snap the player to where they should be (rarely happens). Although this "seems" to work, there is a lot of rubber-banding going on when the server says you have run into an object, but the client thinks you haven't for example.

 

Do other games not use entire physics engines for character movement around a 3D level? Do they do something else that gives more control to allow for rewinding and correction?


Backend Player Persistence

30 May 2014 - 04:41 PM

I'm working on a cross-platform multiplayer game (windows, mac and mobile) and I've decided that I want to store some basic information about a player that will persist so that next time they play they can continue on. For example, storing a value to represent the player's level or storing which abilities the player has unlocked. I don't want to store this stuff locally as I want the player to be able to access it from any device and also use it in a multiplayer game. I'm wondering if anyone can recommend any backend services that I could use for something like this. I've started Googling around, but thought others here might also have some advice. Thanks.


Script Authentication Across Game Clients

16 March 2014 - 08:47 PM

I'm just wondering how other games handle the problem of ensuring scripts are identical across clients in a multiplayer game. If one client modifies one of their scripts before joining the game, it could allow them to run different logic that could in some way give them an advantage or allow them to cheat. Obviously, you would use an authoritative server model to prevent most cheating, but there could still be client side cheats by modifying the client side scripts. For example, you could display the positions of enemy players on the screen using a modified client script by reading the positions received from the server for those players.

 

I'm guessing the most common way to solve this problem would be to simply compare scripts between the client and the server. More specifically, you could compare perhaps a hash value of the script's content and then load the script and run it from memory rather than from file. This would prevent the user from modifying a script while the game is running as it would already be loaded in memory. However, I'm not sure if this is a good solution (or the only solution). There are two things that concern me.

 

Firstly the hash value would need to be transmitted, which means it could be intercepted and tampered with to ensure it will always "match" regardless of the content of the script it was generated from. Perhaps this could be solved by encrypting the hash before the server sends it and then decrypting it on the client. However, this requires the decryption algorithm to be included in the client, which could be compromised somehow. Worst yet, the client could be compromised to always "match" or to always send the expected hash.

 

Secondly, hash values and such could be tampered with directly in memory using a memory editor attached to the running executable. Obviously this sort of stuff is not for the casual cheater, but a dedicated cheater will find ways to do this and more often than not broadcast such methods on the Internet with step-by-step instructions so that every kid is doing it before too long.

 

So I'm just wondering what other methods might be available or am I stuck with the above solutions and just have to deal with the problem as it comes up. Stopping cheaters is an on-going battle for developers and often results in game patches to plug holes found. I just want to put a bit of thought into this first to help minimize problems later.


Server Throttling

05 March 2014 - 07:04 PM

So, I'm wondering how I might approach the problem of throttling the server to make best use of the bandwidth. I honestly have no idea where to start with this and my google fu has turned up very little, probably because I don't know what I'm looking for exactly.

 

At the moment, I have the server locked to send updates at 100ms for connected clients. This has been working fine, but it made me realise that when I'm playing on a LAN with a couple of players, the server could afford to send updates faster than this without overloading the network or the clients. However, if I'm connecting to a server on the net with many other players, then the server should back off so as not to overload anything. Is this a reasonable idea? Do other games do things like this or should I just stick with my hard coded 100ms?

 

I can already do things like throttle updates on objects based on their game-play effects and their relevance to a particular client, so not to worried about that. I just feel like that in cases where there are fewer clients or low pings for example, the server can afford to turn things up and thus give the players a better experience with less correction going on.

 

Does anyone have any ideas or experience with doing this? Is it a good or bad idea? If it is a good idea, how might I approach this? Would it involve some algorithm taking into account the connected client pings to work out how fast the server can safely send updates?


PARTNERS