Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

162 Neutral

About mitchw

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mitchw

    XNA 4.1 Confusion

    To answer your question about Windows support, the SL and XNA integration feature is available on Windows Phone only.
  2. If you're using SpriteBatch, be sure to set SpriteSortMode to Immediate, which tells SpriteBatch to set all of it's render states inside of Begin, rather than End. Otherwise, your state changes will get overwritten on End. SpriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None); You can refer to this post to see exactly how SpriteBatch modifies the GraphicsDevice. http://blogs.msdn.com/shawnhar/archive/2006/11/13/spritebatch-and-renderstates.aspx (Of course had I taken a moment to put 1 and 1 together, SpriteBatch defaults to the behavior you mention)
  3. You can use "internal" if they are in the same assembly or use friend assemblies if they generally are trusted assemblies. You shouldn't expect access to a private member of an arbitrary assembly, though.
  4. Quote:Original post by TheTroll IDisposable is good for releasing resources that you are using. Such as files, netowrking, ect. You can get resource leaks just like you get memory leaks. theTroll This is generally untrue. Unless the class is using unmanaged resources and only releases them in Dispose (rather than properly implementing the dispose pattern) then the resources will get released eventually, just maybe not as soon as you would like or need.
  5. mitchw

    Space ship control

    Perhaps my understanding would be better if I understood the definition of "local axis". Does this mean starting with one world axis (perhaps a look of (0,0,1), do a pitch, for example, then construct up, right, etc as well as further rotations (yaw,roll) based on the results? So you pitch up, construct the up from look x right (since right hasn't rotated yet), yaw the look, then construct right from look x up, etc.?
  6. mitchw

    Space ship control

    The code looks great. One question. To transmit over the wire, I was just using a Vector3 that stored the x,y and z rotations. What would be the best way to transmit the angles now, so that they can be turned into a proper model matrix for rendering on the client? I'd like to avoid sending 3 Vector3's across.
  7. mitchw

    Space ship control

    Sure, here it is. The rotation vector stores the yaw (Y), pitch(X) and roll(Z). So my character movement works perfectly for a quake style control, as long as you clamp the pitch to straight up or down. What I am looking for is regardless of the up vector, left is left, right is right, etc. I would like to add roll as well. this.up = new Vector3(0.0f, 1.0f, 0.0f); this.look = new Vector3(0.0f, 0.0f, 1.0f); this.right = new Vector3(1.0f, 0.0f, 0.0f); Matrix yawMatrix = Matrix.RotationY(MathUtil.DegreesToRadians(-this.rotation.Y)); this.look = yawMatrix.TransformCoord(look); this.right = yawMatrix.TransformCoord(right); Matrix pitchMatrix = Matrix.RotationAxis(right, MathUtil.DegreesToRadians(-this.rotation.X)); this.look = pitchMatrix.TransformCoord(this.look); this.up = pitchMatrix.TransformCoord(this.up); this.look.Normalize(); this.up.Normalize(); this.right.Normalize(); this.velocity = this.look * this.speed * elapsed;
  8. I'm trying to implement space control like that found in Starlancer, Freespace, etc. I'm using the mouse to control yaw and pitch with no roll. In Starlancer, no matter what your pitch, left is still left, right is still right, etc. I've got it close by reversing yaw if 90 < pitch < 270. This still leads to the feeling of roll if you yaw while looking close to straight up or down. I'm using matrix rotation by computing the look/right/up vectors, similar to FPS camera controls. Anyone have experience in implementing this type of control? Am I missing something? Thanks!
  9. mitchw

    Shooting in Asteroids

    Are you sure you have a problem? You state that you shoot to the right, and your ship is moving up, which would make the bullet move down and right relative to the ship. This seems right. To verify, as soon as you fire the shot, zero out the ship's velocity and see if the bullet is flying right. As other's have said, you need the ability to output text on the screen. You could then dump the bullet's velocity and hopefully see that it is (x,0)
  10. I agree, since you are going to use FX files for the program portion, then you might as well use it for the whole thing. It is flexible and the interfaces to interact with them via code are already there. You can compile on the file, include other files, etc. I'd take a look at them before developing your own.
  11. mitchw

    MDX9 c# SetPosition problem?

    There is no SetPosition on the latest bits. There is a Position property, so you could do verts[0].Position = new Vector4(...);
  12. mitchw

    C# Keyhooks

    If you're not sure of what the problems with the eventing model of WinForms is, then how do you know it will apply to you? Try it first as it is easy to implement. You may find that it works perfect for you. If you run into problems, *then* you can start to look for alternatives. I will warn you though, you won't get far trying to write a game using GDI+. The performance just isn't there.
  13. You mention the sample source, but did you run the precompiled samples? The C# and C++ ones? What are the results? If you are getting errors with the precompiled ones, then there may be something wrong with your configuration (DirectX install, video drivers, etc).
  14. mitchw

    Doom 3 Heat wave, shock wave effect

    I believe the ATI SDK has a demo of it. Basically it is a single billboard quad that has the shader applied to it. It is a pixel shader that uses a texture to distort the framebuffer.
  15. mitchw

    Doom 3 PS/VS

    Editing the content in /glprogs isn't different than any other media found in the pack files (textures, models, etc). You won't be able to join a pure server with modified pack files.
  • 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!