# Asuka

Members

12

168 Neutral

• Rank
Member

• Location
Montréal
• URL
1. ## Post Mortem on 4x Strategy Games

What I dislike about most 4X games is that mandatory expansionist mentality. Take all faster = win. Leaving the unlucky players that spawned in less expansible territories to their inevitable doom. Spawning on a stranded islands in Civilization calls for a restart.   I'm trying to fight that mentality in my own 4X game by balancing quantity and quality. A higher developed sectors will yield as much benefits as several underdeveloped sectors. In the end, having more undeveloped sectors might be too risky as they will be much easier to lose.
2. ## Rotate a 4-vev plane to be aligned with to a vector

it is done by setting your matrix axes oriented in the direction you need using crossproducts. dirWant : the direction to align to, normalized. ref: a reference vector for 3D alignment. Could be set to (0,1,0)   a = normalize(crossProduct(dirWant, ref)); b = crossproduct(a, dirWant); c = dirWant;     Then you set your matrix like so if your vertices are on the Z plane: a.x b.x c.x t.x a.y b.y c.y t.y a.z b.z c.z t.z 0 0 0 1   t being your particle position.   Note that if dirWant == ref vector, it won't work. So choose another ref if they are equals.   Hope that help!
3. ## Ray to Ray intersection

You need to find the shortest distance between the 2 rays. look at "Distance between lines, rays, and segments (3D)." on http://www.geometrictools.com/LibMathematics/Distance/Distance.html There is everything you need there. :)   Hope that help! Cheers!

You might want to take a look at the generalization of Bézier Curves : http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Generalization You can do interpolation to any degree.
5. ## Object detection

In my collision system I did something like this: class Capsule3D{ //data for capsule object }; class Sphere3D{ //data for sphere object }; Class IColPrimitive{ public: virtual TestResult test(const IColPrimitive& aOther)const=0; virtual TestResult test(const Capsul3D& aPrim)const=0; virtual TestResult test(const Sphere3D& aPrim)const=0; ... }; class Capsule3DColPrim : public IColPrimitive{ public: virtual TestResult test(const IColPrimitive& aOther)const{ return aOther.test(mCapsule); } virtual TestResult test(const Capsul3D& aPrim)const{ Actual test code using mCapsule and aPrim } virtual TestResult test(const Sphere3D& aPrim)const{ Actual test code using mCapsule and aPrim } Capsul3D mCapsule; }; class Sphere3DColPrim : public IColPrimitive{ public: //similar to Capsule3DColPrim ... Sphere3D mSphere; }; Then you just have to call a_IColPrimitive.test( another_IColPrimitive );     I believe this is the Bridge design pattern but I might be mistaken on this. Hope that help! Cheers!
6. ## Tech tree

From the album New Deep Space Settlement GUI

7. ## In game GUI

From the album New Deep Space Settlement GUI

8. ## Ship editor

From the album New Deep Space Settlement GUI

9. ## Deep Space Settlement (RTS)

I'd say the requirements would be something like Core 2 processor + GeForce 7900 Dx9 or Dx10. Although the game can be scaled up or down. When you setup a fleet you have the option whether ships should maintain their positions at all time or can temporarily quit formation to chase an enemy ships. That greatly influences your strategy since staying in formation can give the ships bonuses (from other ships in the fleet). Bonus such as shield boost, anti-missiles protection, etc. But when corvette class ship (the smallest ship) quit formation and enter in a dogfight with another ship, they are harder to hit since they move very fast. Also they are usually better at close range depending on weaponry installed on the ship. In the video, the ships are not part of a fleet, so they're free to chase any enemy they want. The plot is very basic as of now. Your journey gets you to a star cluster where you have to set your colony and thrive. But your presence will not stay unnoticed for long. You will encounter a fierce enemy. There is no Mac release planned. But I do not reject the idea completely. Hope that answer your questions

11. ## WSASendTo takes a while to complete

At first I thought it might be a buffer filling up and waiting to be freed since blocking after 8k of data sound oddly like a buffer issue. But the strange thing is that it block in the WSASendTo after the data gets transferred. The client executable receive the data sent by that last blocking WSASendTo. So that theory doesn't seem to hold. So my last resort when facing such a strange behavior is to reboot and try again. Which I did. It fixed the issues. That confirm my second thoery, there really is something weird going on. Thanks for the advices anyway, I'll try them if the problem arises again.
12. ## WSASendTo takes a while to complete

I'm having issues with my network layer in my game where WSASendTo will wait for ~10 seconds before completion after calling it in a loop with a total of approximately 8k of data. So I made a little test executable that goes like this: (i'm using boost socket which ultimately calls WSASendTo) [code] boost::asio::ip::udp::socket* mpSocket; mpSocket = new boost::asio::ip::udp::socket(IoService::GetService(), boost::asio::ip::udp::v4()); boost::system::error_code err; boost::asio::ip::udp::endpoint epTo = ResolveAddr("192.168.0.4", 2772, err); if(err){ printf("ResolveAddr err : %d (%s)", err.value(), err.message().c_str()); return; } char buff[1024]; int i = 0; do{ printf("Send %d, ",i); boost::asio::ip::udp::socket::message_flags flags = 0; *((uint32 * )buff) = i; size_t si = mpSocket->send_to(boost::asio::buffer(buff,1024), epTo, flags, err); printf("%d\n", si); if(err){ printf("send err : %d (%s)", err.value(), err.message().c_str()); return; } ++i; } while(i<1024); [/code] 192.168.0.4 is another computer on my local network. It will call mpSocket->send_to 8 times. The last call will send the data (which I successfully receive on 192.168.0.4 ) and wait for an even for ~10 seconds in function WSASendTo. The doc about WSASendTo says: [b]Note[/b] When issuing a blocking Winsock call such as [b]WSASendTo[/b] with the [i]lpOverlapped[/i] parameter set to [b]NULL[/b], Winsock may need to wait for a network event before the call can complete If it waits for that reason, I'm not sure what network event it is waiting for or why, but most importantly why does it takes ~10 seconds? It doesn't make much sense to me to wait that long for every 8k of data transferred. So what am I doing wrong here? Thanks
13. ## New Gfx

From the album DSS early Screen shots

The game is coming along nicely. Lots of new features are in and a major graphics revamp was done lately. I'm going to need a major GUI revamp soon as well.

14. ## 20110819 1

From the album DSS early Screen shots