Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Nov 2006
Offline Last Active Oct 21 2016 11:37 PM

#5283293 Meshes rendered with the aid of shaders corrupted in windows 64 bit

Posted by on 24 March 2016 - 07:21 PM


Do you need to recompile the shaders for a 64 bit, or the mesh file needs to be saved as a 64 bit file.

#5282095 Multi thread deadlock issue with a recursive mutex. Need ideas.

Posted by on 19 March 2016 - 10:42 PM


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.

#5280983 Laptop and desktop shows different results.

Posted by on 12 March 2016 - 11:18 PM


Try checking all texture sizes. Happens some time on laptops power of 2 textures only.

#5280837 A ray with an ending position?

Posted by on 12 March 2016 - 01:05 AM

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.

#5269339 Being realistic...

Posted by on 04 January 2016 - 11:36 PM

Hi there.

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.

#5267636 Is this a percentage problem Difference of 9 to 34

Posted by on 23 December 2015 - 06:49 AM

oh sorry when doing it on calculator i did 9 - 100 before the division. too many hours and all excited about the big gain.

Nanoha answer is correct.277.777% that is a crazy amount of extra.

#5259924 C++ Weird Behaviors With Multi-Threading

Posted by on 31 October 2015 - 04:21 PM

Hey there. Maybe you could look in to using boost threads and strands. Or if STD has strands

#5258493 When you Fix your timestep Do you need to change the physics

Posted by on 22 October 2015 - 04:38 AM

I put the time values back in after removing them to see what would happen, Put it this way you get some strange boid movement.

One thing I did notice was open steer uses a Dotptoduct to get a distanceSquared value. This value for me when used is in the millions 2679431.0 then when that is applied to all

obsticles that are near the force becomes so small I it has no effect.

Like this


D3DXVECTOR3 offset = ent->m_EntityPtr->GetWorldPos() - m_Vehicle->GetWorldPos();
float distanceSquared =  D3DXVec3Dot(&offset, &offset);//D3DXVec3Length(&offset);
steeringforce +=  ((offset)/ -distanceSquared);

Is this related to the size of the 3d world or any thing like that, Because if it was a really small world the forces would affect the object is it's wold pos was tiny.


The Steering force is strong in this one.

See I was thinking the size of my world is made up of chuncks of 1024 blocks So i divided the distanceSquared value by 1024 and added max speed and damn thing worked WTH.

What value should be used. or how to pick an acceptable value to create the force. 


D3DXVECTOR3 offset = ent->m_EntityPtr->GetWorldPos() - m_Vehicle->GetWorldPos();
float distanceSquared =  D3DXVec3Dot(&offset, &offset)/1024;//D3DXVec3Length(&offset);
steeringforce +=  ((offset * MaxSpeed())/ -distanceSquared);

Why do I need to add crazy large value to get any force.

#5256966 Migrated from VC++ 2008 Express to Visual Studio 2015: Now getting linking er...

Posted by on 12 October 2015 - 09:59 PM

Have you tryed to clean the build.

#5255626 best math learning source for game programers in all fields(ai, graphics ..)

Posted by on 05 October 2015 - 04:25 AM


#5249856 Need Some Resources for Multi-Threading

Posted by on 31 August 2015 - 05:40 AM

Now this is cool thanks for the TBB link. Keeping this in mind for next game.

#5249812 Need Some Resources for Multi-Threading

Posted by on 30 August 2015 - 10:29 PM


because it is still assumed that Multi-threading is a concept of the past, more like the Future.


If you want you can try boost threading doc good and has some cool stuff, But compile time may go up a bit.


Threading is easy its the Data synchronization thats the hard part.


Things to look for Mutex, semaphore, lockfree queue(advanced)


Google Threading c++ here, here, boost threading, more


Most important part Data synchronization .


Take your time and get it done wright.

#5249293 Advice on weak_ptr usage

Posted by on 28 August 2015 - 01:03 AM

Hello all.


I'm about to add the network class to the objects that need to send information to the server.

By adding a weak_ptr of the network class thats is a shared_ptr into the base object.


Is the weak pointerer ok for this what I'm lead to believe, is that if the network layer is deleted which it can be at any time when disconnect happens.

that doing this

if( auto tmp = weak1.lock() )

        //good to use


        //has been deleted


will stop any use of the class after its been deleted, but no object will be able to keep the shared_ptr alive which would be bad if a dissconnect occurs.


This is my first use for a weak_ptr.


So will the weak_ptr protect me from a deleted network class. Has to be better then a raw pointer.


I was thinking of passing the network class to functions but there is 17 functions and some functions are deep down in sub systems.

never lead to a clean route.


or any other way to pass network class to things that need them.


#5246610 What exactly do I send in packages?

Posted by on 14 August 2015 - 07:50 PM

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.

Class protoMsglocation
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

#5241346 Login System

Posted by on 19 July 2015 - 05:07 AM

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.