It could be because the function extraWork you call doworkB which locks b but b is locked already in the call to extraWork.
Maybe boost::strands could help you here. or lockfree queue's. The only place for mutex is in the connection phase of the networking, where you have simultaneous clients connecting to a data base or some thing even then you could go lock free as well.
Hi there. You may be able to use D3DXIntersect by converting the line segment to a ray and then checking the pDist returned from the D3DXIntersect. If PDist is greater then the Lines length not a collision.
RTS you say. I have a engine for RTS game plus multi player only good for windows. Its not quite complete, it would be good for demos plus a bit more.
It has a build menu working, has spell buttons,drop ships can attach to objects or carry them inside, Units , vehicles planes, towers, buildings , plants, are the base types with them you can create as many different types you have assets for. Has a very crude map editor menu creator and asset library editor.
the Library is where you define all your objects for any one game type.
May not work on newer OS only windows a port would not be doable. this is what its at now.
you could try down loading the demo you need the folder ShipRTSand the folder UpDatedFullscreenRTS it ships with the run time for VC10 and DX10. the server is down so it will not connect but if it loads and starts the menu system the engine would work on your windows OS.
The links seem not to work on my iphone not sure.
As for time well you would need to work out what format to hold you graphic objects in, how you load and create them, you probably need to write or have written some form of
helper apps like asset creator, map editor, Unit testing apps, work on sound the demo needs sound.
it's going to take a lot of time, but the more modular the program is the less of a pain implementing new object into the system will be.
I may not be able to help I feel burnt out or no longer get a kick out of programming this RTS engine(may post the lot on hosting site). I've taken 4 month of so far no programming.
Hi. It all depends on the protocol you want to use.
Like http you build a sting with command tokens.
Or you can roll your own protocol
Using something like google protocol buffers.
That will create data classes that can be serialized to a device independent format that can be transmitted over the wire.
With the proto buffer you can put in a message type identifier uneque for each message then when you receive a whole message you check the type and parse the data as that type.
Int32_t Type;// the message type for this message only
// other data members go her
Then in some header you define all your message types
Hi. heres a good read on password hashing. And OpenSSL Im at the same stage, and have been reading stuff for the last week. I have some other links on my other system next time I log in Ill post them, it shows how to create the certificate used in the hand shake when clients connect using a SSL socket wait may be a boost one sorry.