Gaming

  Home arrow Gaming arrow Page 7 - Improving Input with Joysticks
Watch our Tech Videos 
Dev Hardware Forums 
Computer Cases  
Computer Processors  
Computer Systems  
Digital Cameras  
Flat Panels  
Gaming  
Hardware Guides  
Hardware News  
Input Devices  
Memory  
Mobile Devices  
Motherboards  
Networking Hardware  
Opinions  
PC Cooling  
PC Speakers  
Peripherals  
Power Supply Units  
Software  
Sound Cards  
Storage Devices  
Tech Interviews  
User Experiences  
Video Cards  
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
GAMING

Improving Input with Joysticks
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 14
    2004-09-27

    Table of Contents:
  • Improving Input with Joysticks
  • Calibrating Joysticks
  • Tracking Joystick Movements
  • Revamping the Game Engine for Joysticks
  • Developing the Joystick Code
  • Building the UFO 2 Example
  • Testing the Finished Product

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     

    SEARCH DEV HARDWARE

    Improving Input with Joysticks - Testing the Finished Product


    (Page 7 of 7 )

    If you haven't done so already, I encourage you to plug in your joystick and take the UFO 2 program for a test spin. You'll hopefully find that the joystick controls for the program have a surprisingly good feel, considering that the joystick handling code in the program is relatively simple. Try pressing the two primary buttons on the joystick to get a feel for the thrust and hyperspace features of the program. Figure 7.7 shows the flying saucer as it appears with the flaming thrust beneath it.

    morrison

    Figure 7.7 -- The flying saucer in the UFO 2 example shows off its new thrusting capabilities.


    Tip - If the flying saucer immediately starts moving without you touching the joystick, it's a pretty good sign that your joystick needs to be calibrated. Revisit the earlier section "Calibrating Joysticks," to find out how to calibrate your joystick and eliminate this problem.


    Granted, you might have a valid concern as to why the flying saucer visually thrusts but doesn't seem to have any additional lift when you press the thrust button. This is something I challenge you to solve as an exercise on your own; just kick up the vertical speed of the saucer a bit when the thrust button is pressed. You might also have noticed that hyperspace is quite sensitive. In fact, the hyperspace feature reveals how fast the game engine's joystick processing actually is.

    Summary

    Although joysticks don't quite share the widespread acceptance on PCs that keyboards and mouse devices do, they are the quintessential user input device for games. There aren't too many serious gamers who don't have a joystick or game pad. However, you don't have to be serious about games to enjoy the benefits of playing games with a joystick. For this reason and more, it's a good idea to try and support joysticks in games for which it makes sense to use a joystick for input. This chapter gave you the nuts and bolts of Windows joystick handling and even showed you how to build it into the ever-evolving game engine. You also saw how easy it is to add joystick support to an existing program.

    Mark your calendar because Chapter 8, "Example Game: Light Cycles," represents a significant milestone in your game programming career—you develop your first complete action game. Even though the Brainiac game in the previous chapter was technically your first game, moving into the action realm is a huge step forward.

    Field Trip

    I realize that the people at your local computer store might be starting to get suspicious of your repeated trips, but a wealth of knowledge for learning about games can be found there. More specifically, I'd like you return yet again for a joystick reconnaissance mission. In case you haven't noticed, joystick technology has come a long way in recent years. As an aspiring game programming guru, it's important for you to have a solid base of knowledge about what's available in the way of modern joysticks. As you study the different joysticks on the shelves, pay particular attention to the number of buttons and their arrangement. If you already have a game in your mind that you're working on, see if you can figure out how to best make use of the joystick hardware available. Don't forget that it's possible to use only a few joystick buttons for basic game operations and then reserve additional buttons for more advanced features. Game players like to have options, and by intimately understanding the game controller marketplace, you'll be better prepared to provide them with those options.

    SamsThis chapter is from Beginning Game Programming, by Michael Morrison (Sams, ISBN: 0672326590). Check it out at your favorite bookstore today.

    Buy this book now.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.
    blog comments powered by Disqus

    GAMING ARTICLES

    - An Ugly Side to Gaming`s Boy`s Club
    - Wii U Offers Secretly Cool Features
    - OUYA Raises Millions for Open Console Game P...
    - OUYA Kickstarter Project: Bring Back Great G...
    - WWE 13 Video Game: First Look
    - Game Review: Max Payne 3
    - The Top MUD Games
    - Game Review: Tiger Woods PGA Tour 13
    - Game Review:MLB 12 The Show
    - Game Review: Twisted Metal
    - The Top PS Vita Games
    - PlayStation Vita Review
    - Game Review: Star Wars The Old Republic
    - Game Review: WWE 12
    - Video Game Review: X-Men Destiny

    Developer Shed Affiliates

     




    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
    KEITHLEE2zdeconfigurator/configs/INFUSIONSOFT_OVERLAY.phpzdeconfigurator/configs/ OFFLOADING INFUSIONSOFTLOADING INFUSIONSOFT 1debug:overlay status: OFF
    overlay not displayed overlay cookie defined: TI_CAMPAIGN_1012_D OVERLAY COOKIE set:
    status off