Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Jul 2003
Offline Last Active Oct 21 2016 05:25 PM

Posts I've Made

In Topic: hiding a library's dependencies from users of the library

26 September 2016 - 01:12 PM

I'm not big on hiding this sort of thing from your customers. The code aspects aren't so great, but where you are really letting yourself in for a world of pain, is in needing to provide perfectly working development/release toolchains for every platform under the sun (i.e. you need to provide out-of-box toolchains for Android and iOS, since your customers can't get at the dependencies to do it themselves).

In Topic: Leveling up through mini-quests?

16 September 2016 - 03:32 PM

Ok, I see. To my mind that actually *reduces* the quest variety.


Instead of being able to take any quest that interests me, I'm going to need to reject all quests that don't contribute to a stat that further complements my chosen build.

In Topic: Mutexes and the render thread

16 September 2016 - 12:07 PM

In general, if you are working on the level of mutexes, you are approaching multiprocessing at too low a level.


What you almost certainly need here is one or more asynchronous queues. One queue to feed work orders for new chunks, and one queue feeding back the resulting chunks.


That queue may be implemented using mutexes, of course, but the important part is that they only lock accesses to the queue (not its contents), and work on the items in the queue never involves locks.

In Topic: Leveling up through mini-quests?

16 September 2016 - 12:03 PM

I'm not sure I understand the distinction. What's the difference between 'Quest: kill 10 Slimes' versus 'Quest: move 10 rocks', or 'Quest: wrestle 10 bears'?

In Topic: For casual multiplayer mobile game which protocol to chose UDP , WEBSOCKETS ,...

01 September 2016 - 12:30 AM

TCP and not much Efficient comparing to UDP

On a reliable network, the difference in efficiency between UDP and TCP is generally negligible.

If you expect severe packet loss, TCP can end up in a situation where it isn't making much forward progress. Which is where UDP can be preferable. But, whatever reliable UDP layer you build is going to run into similar problems delivering your control messages (even though many game packets can be sent in unreliable mode, some will still require acknowledgement) - UDP protocol design is a pretty advanced topic.

To obtain the best performance from TCP, make sure you disable Nagle's algorithm (the TCP_NODELAY socket option). This one setting is usually to blame for most of the apparent performance difference between TCP and UDP.