2D Shooter

This is a discussion on 2D Shooter within the Game Programming forums, part of the General Programming Boards category; I want to make a full fledged 2d shooter. But I'm confused on where to start, I mean I have ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    141

    2D Shooter

    I want to make a full fledged 2d shooter. But I'm confused on where to start, I mean I have the basics of windows making down, and I've done some directX successfully.

    I was thinking of using DirectInput for keyboard and mouse events. So can anyone help me with this?


    Edit:
    Actually, Im going with Direct3D
    Last edited by bobbelPoP; 08-20-2008 at 01:21 AM.

  2. #2
    Registered User
    Join Date
    May 2007
    Posts
    41
    The DirectX SDK says that DirectInput is deprecated and that Raw Input should be used instead (Raw Input is in the Windows SDK). From Windows 2000 to Vista DirectInput does nothing else than wrapping Raw Input and adding overhead.

    Have a look at this: http://msdn.microsoft.com/en-us/libr...36(VS.85).aspx

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Unfortunately raw input does not fit well with some engine designs. I suppose you could wait on Windows to give you a message and then pump it through but that would seem to me to be slower than just calling Update() on DirectInput. I really don't want to wait for a Windows message to get to my application. I would much rather tell DirectInput when to update inside of my own loop. It really doesn't alter the design of the message loop much to use raw input but it seems to me to be a giant step in the wrong direction.

    The end solution is XAct XInput which I'm not sure is available for C++ just yet.

    Removing DirectInput and DirectSound from Vista is one of the biggest mistakes ever made which hopefully will be corrected.

    On a side note: Moved to game programming.
    Last edited by VirtualAce; 08-20-2008 at 06:22 PM.

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    141
    But what about Direct3D? I mean it looks really good, but can it handle stuff like DirectInput, as in Mouse events, Keyboard, and stuff. And I know in windows, you can just use getasynckeystate for keyboard, and mouse, ;P but I'd like to use D3D if I can.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Well bobbelPop, you can use whatever API you wish to draw to the screen, but your problem sounded more like an issue of problems gaining accurate user input. That has nothing to do with D3D. I know we all love one solution that fits all, but I always start with the basic window messages and see if I am receiving input fast enough, then work my way down from there. Depending on the complexity of your game, you may not need to delve too deep into things such as raw input (though its screwy--yet it is from M$... so what does anyone expect).

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    141
    Quote Originally Posted by master5001 View Post
    Well bobbelPop, you can use whatever API you wish to draw to the screen, but your problem sounded more like an issue of problems gaining accurate user input. That has nothing to do with D3D. I know we all love one solution that fits all, but I always start with the basic window messages and see if I am receiving input fast enough, then work my way down from there. Depending on the complexity of your game, you may not need to delve too deep into things such as raw input (though its screwy--yet it is from M$... so what does anyone expect).

    Thanks.

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Why is raw input screwy?

  8. #8
    Budding Synth Programmer samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Trefforest
    Posts
    368
    The problem I'm having at the moment is dealing with repeat strokes (from when you hold down the key).
    MSVC++ 6.0

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D in directX
    By fighter92 in forum Game Programming
    Replies: 6
    Last Post: 01-25-2009, 10:23 AM
  2. 2D Spaceship shooter online - Need 2 keen programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 05-19-2005, 07:40 AM
  3. 2D Shooter using Windows GDI
    By Jontay in forum Game Programming
    Replies: 2
    Last Post: 12-09-2003, 07:37 PM
  4. 2d shooter
    By Enf in forum Game Programming
    Replies: 4
    Last Post: 04-23-2003, 04:45 AM
  5. Help with 2d OpenGL top-down shooter.
    By TonyP in forum Game Programming
    Replies: 4
    Last Post: 09-11-2002, 11:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21