Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 01 Sep 2010
Offline Last Active Sep 06 2014 07:42 AM

#5101858 XMVECTOR vs XMFLOAT4 in classes

Posted by savail on 16 October 2013 - 10:39 AM

thanks for answer!


 Isn't it better to properly align class and then always use XMVECTOR in it?



A lot of libs (I'm using Bullet Math) follow that pattern. You should be very careful again, with passing aligned values, type casting ect. (http://msdn.microsoft.com/en-us/library/83ythb65.aspx)

 So it's a better solution if I want my program / game run as smoothly and quickly as possible?


According to my 2. question I mean:

I have a XMFLOAT3A Position in my class and

Should I use something like this:

DirectX::XMStoreFloat3A(&Position, DirectX::XMVectorSet(-1.0f, -1.0f, 0.0f, 0.0f));


Position.x = -1.0f;
Position.y = -1.0f
Position.z = 0.0f;

to fill the Position vector? What's faster and better to use? or it doesn't matter at all?

#4970265 Networking Book

Posted by savail on 16 August 2012 - 11:45 AM

http://gafferongames.com/networking-for-game-programmers/ - here's a good tutorial on programming network for action, fps etc games using UDP. It's written by a real pro but I find it a bit hard to fully understand it. You need advanced c++ knowledge and some experience with winsock imho.

#4969389 WINSOCK - connection refused to localhost

Posted by savail on 14 August 2012 - 04:11 AM

ah true. Next lesson in thsi tut was creating a server... Though there was nothing said that in order to connect to localhost you need to create a server first and run it. For some really new users it might not be so obvious. Thanks for your help