Jump to content
  • Advertisement

Stefan Fischlschweiger

Member
  • Content Count

    208
  • Joined

  • Last visited

Community Reputation

788 Good

About Stefan Fischlschweiger

  • Rank
    Member

Personal Information

  • Interests
    Art
    Audio
    Programming
  1. So, I've recently updated the SharpDX libraries in my project (which I've barely worked on in the past years) from v2.6 to v4.2 It took a lot of code changes to get everything to compile again, but now it works. Except for keyboard input. Now, I haven't done any changes to code related to RawInput, but now I'm getting no responses to key presses anymore. If I set a breakpoint in the event handler responsible for reacting to keyboard input and sending it to the InputMapper (which is just another class that maps keys to game functions) void KeyboardInput(object sender, KeyboardInputEventArgs e) { if (e.Key == _lastKeys) { _lastKeys = Keys.None; return; } GameServices.GetService<InputState>().Mapper.InvokeAction(e.Key); _lastKeys = e.Key; } then e.Key is always Keys.None The event does actually fire when I press a key, so I know that it has detected something, but just no Keys. Mouse input works fine as before. Has anyone else run into this?
  2. Stefan Fischlschweiger

    Spaceship steering problem

    Yes, thanks, that did the trick. I probably had it wrong in my head because earlier iterations of my movement system, both physics and non-physics based required the Z component to be zeroed out here to prevent unwanted rolling. The vector components being out of order in the AddTorque line has a reason though. It's required so that steering input from the mouse and actual turning match up in direction
  3. Stefan Fischlschweiger

    C# Spaceship steering problem

    Hey guys. I haven't been here for a long time. Reason being that I didn't really code in that time. Now I've returned to my project and ran into some problem. Last time I've worked on it, I've switched my physics engine from bullet to jitter due to unresolvable problems, but there's now an issue with my steering code. In essence, depending on what direction I'm facing relative to the initial orientation the actual change in direction differs more or less from the actual input. For example, I'f I turn 90 degrees left or right it becomes impossible to turn up or down. Now, in order to make the spaceship turn, this is the code for it: Within InputSystem I calculate cursor offset from the screen center and then from it a multiplier that is then used by MovementSystem: var mouseOffsetMagnitude = Math.Abs(_mouseOffset.Length()); if(mouseOffsetMagnitude < 10) rot.TurnMultiplier = Vector3.Zero; else if (mouseOffsetMagnitude > _screenCenter.Y*0.8) { rot.TurnMultiplier = Vector3.Zero; } else { var multiX = _mouseOffset.X/(_screenCenter.Y*0.8); var multiY = _mouseOffset.Y/(_screenCenter.Y*0.8); rot.TurnMultiplier = new Vector3((float) multiY, (float) -multiX, 0); } MovementSystem takes this multiplier, which is then multiplied by the ships steering torque and a constant to get the torque vector for steering. The torque vector is also transformed by the ships orientation to ensure it's facing the correct way and then fed into Jitter to make the ship actually turn: var torqueVector = Vector3.Transform(rot.TurnMultiplier*phys.SteeringTorque*0.00025f, body.Orientation.FromJMatrix()); body.AddTorque(new JVector(0.0f, torqueVector.Y, -torqueVector.X)); Currently roll is not used, hence the 0 value in the last line.
  4. Got my first custom file formats to work - Yay :D
  5. Yea, but how many games on Steam do offer a demo?   @braindigitalis: Good article =) I think a good addition would be another one about how to actually find out your minimum/recommended specs.
  6. Stefan Fischlschweiger

    How to Record High Quality Video of Your Game using a Slow Computer

    One solution I used was to record without video compression. You need quite some free HDD space, but takes a lot of load off your CPU
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!