Discovery Gaming Community
Help with Source Code (C#/XNA) - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: The Community (https://discoverygc.com/forums/forumdisplay.php?fid=4)
+--- Forum: Freelancer Forum (https://discoverygc.com/forums/forumdisplay.php?fid=11)
+--- Thread: Help with Source Code (C#/XNA) (/showthread.php?tid=80602)

Pages: 1 2


Help with Source Code (C#/XNA) - guideX - 05-20-2012

I'm trying to build a Freelancer type game, could someone help my game have the same mouse rotation settings like in Freelancer?

http://team-nexgen.org/rl_pbv01.zip

I have the game responding to the spacebar, and am trying to duplicate the mouse mode/free flight mode, but my version isn't even close.

Thanks


Help with Source Code (C#/XNA) - massdriver - 05-20-2012

well if you have troubles with such a (lame) problem, you gonna have more in future


Help with Source Code (C#/XNA) - Alex. - 05-20-2012

' Wrote:well if you have troubles with such a (lame) problem, you gonna have more in future
So helpful.


In case it interests anyone, OP has posted information about what he's doing here: http://the-starport.net/freelancer/forum/v...p?topic_id=4828


Help with Source Code (C#/XNA) - guideX - 05-20-2012

I'm at the beginning stages, and have a lot to do, hence the (lame) request, as it's holding me up, I figured I can find someone who has dealt with it before, so I'm not re creating the wheel (some more).:)

' Wrote:So helpful.
In case it interests anyone, OP has posted information about what he's doing here: http://the-starport.net/freelancer/forum/v...p?topic_id=4828



Help with Source Code (C#/XNA) - Hielor - 05-20-2012

Uhm...

If you're in mouse flight mode, either via toggle or holding down the button,
Get the x/y coordinates of the mouse relative to the center of the screen
Get the maximum distance from center of the mouse in each axis (screen size)
Calculate the ratio between the current mouse deflection and maximum
Calculate the target angular velocity for each axis by multiplying that ratio by the ship's maximum angular velocity in that axis

(prototype: set the angular velocity of the ship in the corresponding axis to that value)
(final: set the target angular velocity of the ship to that value, then increase or decrease the ship's current angular velocity by whatever the angular acceleration is)

Not that difficult.


Help with Source Code (C#/XNA) - massdriver - 05-20-2012

take a look of my little project. it has scpritable system loader like FL has through ini files, supports shiparch.ini analog and has custom atmosphere shader. currently me and some other guys, we are writing project documentation.

Tech demo video link


Help with Source Code (C#/XNA) - Durandal - 05-20-2012

First instead of offering to help you tell the man his problem is lame, and then you attempt to hijack the thread with your own project to stroke your own ego. You my friend, are a true saint. I hope life treats you as well as you treat those around you.


Help with Source Code (C#/XNA) - massdriver - 05-20-2012

' Wrote:First instead of offering to help you tell the man his problem is lame, and then you attempt to hijack the thread with your own project to stroke your own ego. You my friend, are a true saint. I hope life treats you as well as you treat those around you.

whatever bro, but Im not sure why ask on disco forum about problem that is actually can be found on the first google request. I just wonder


Help with Source Code (C#/XNA) - arvg - 05-20-2012

Moderator Notice:

When someone asks a question, it's a good idea to be polite and help them

consider this a warning.


~Alvin


Help with Source Code (C#/XNA) - guideX - 05-20-2012

Thanks I'll give this a try, it's pretty basic and easy to convert down to C# code, thanks!

' Wrote:Uhm...

If you're in mouse flight mode, either via toggle or holding down the button,
Get the x/y coordinates of the mouse relative to the center of the screen
Get the maximum distance from center of the mouse in each axis (screen size)
Calculate the ratio between the current mouse deflection and maximum
Calculate the target angular velocity for each axis by multiplying that ratio by the ship's maximum angular velocity in that axis

(prototype: set the angular velocity of the ship in the corresponding axis to that value)
(final: set the target angular velocity of the ship to that value, then increase or decrease the ship's current angular velocity by whatever the angular acceleration is)

Not that difficult.