My favorites | Sign in
glp
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
inputClasses  
Input variants implemented by classes
Phase-Requirements
Updated Feb 25, 2009 by weltenschmid

Introduction

Some basic input styles. Implement the wished class, configure it if necessary, and get full input interaction.

Details

Consist of following classes:

  • 3rd Person Shooter - Keys action & mouse look
  • Real time strategy - Keys move cam and mouse is for gameplay interaction
  • Arcade style - Keys move char
  • Diablo style - Keys actions/inventory and mouse takes the gameplay/scrolling

Code Files

cinput.h - base class ci3rd.h cirts.h ciarcade.h cirpg.h

Code design concerns

General questions

Menu and GUI Interaction belongs to the base class (if really needed there)

Variation 1 : Data exchange

Models to interact with should be attachble to the input object, events handled by callbacks. That would raise dependencies from the game object classes and but would handle all input centralized in the input derivates. On the other hand, the object could simply store state variables, which represents the latest input, so the game can react on these values given by the input. Here you have the freedom to react on input whereever, whenever, however depending on the interface. At cost of a clear overview, where what happens.

Powered by Google Project Hosting