Introduction: WIRELESS GAMING CONSOLE USING HUMAN GESTURES

About: Electronics and Automation Engineer, Game designer, Artist! EMAIL: amaraxr@gmail.com

watch this video ! this is a 2d game in this project we are going to build 2D game and Hardware to control game wirelessly using gestures.

Step 1: To Build Hardware and Software

Gesture based Game controller and Game design Guide....(both Hardware and software !!)

Step 2: Introduction

Now a days virtual environment is considered as a means of efficient human interaction. This is defined by the diversified field of application. The range of applications include phobia therapy, military simulation, medical training etc.., The progressive advancements in the field of electronics have led to a still more widening of the spectrum of human computer interaction. The user interface approach of using keyboard, mouse, pen are not catching up to the race. The use of hand gestures as a input method providing human computer interaction. This will be useful in controlling gaming applications using hand gesture

Step 3: Block Diagram

Step 4: Circuit Diagram

Note :Xbee tx & RX is connected to 10 & 11 of arduino ....sorry for the mistake

Step 5: Components Used !!

Arduino uno at Tx-#1
Arduino Leonardo at Rx-#1
Bump switches-#4
xbee s2 -#2
Adxl335

Step 6: Coding ..@ Arduino Leonardo

#include
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {

Serial.begin(9600);

while (! Serial) {
Keyboard.begin();mySerial. begin(9600);
}
}

void loop() {
// use serial input to control the mouse:
if (mySerial. available ()){

int inChar = mySerial. read ();

switch ( inChar) {
case '1':

Keyboard.press('m'); delay(100);
Keyboard.release('m');

break;
case '2':

Keyboard.press(KEY_LEFT_ARROW);Keyboard.press('s');delay(300); Keyboard.release(KEY_LEFT_ARROW);Keyboard.release('S');
break;
case '3':

Keyboard.press(KEY_RIGHT_ARROW);Keyboard.press('s');delay(300); Keyboard.release(KEY_RIGHT_ARROW);Keyboard.release('S');
break;
case '4':

Keyboard.press('s'); delay(500); Keyboard.release('S');
break;
case '5':

Keyboard.press(KEY_RIGHT_ARROW); delay(500); Keyboard.release(KEY_RIGHT_ARROW);
break;
case '6':

Keyboard.press(KEY_LEFT_ARROW); delay(500);Keyboard.release(KEY_LEFT_ARROW);
break;
}
}
}

Step 7: Coding ..@ Arduino Uno


const int buttonPin = 6; int buttonState = 0;
const int buttonPin1 = 3; int buttonState1 = 0;
const int buttonPin2 = 4; int buttonState2 = 0;
const int buttonPin3 = 5; int buttonState3 = 0;
const int groundpin = 18; // analog input pin 4 -- ground
const int powerpin = 19; // analog input pin 5 -- voltage
const int xpin = A3; // x-axis of the accelerometer
const int ypin = A2; // y-axis
const int zpin = A1; // z-axis (only on 3-axis models ADXL335)
void setup()
{
pinMode(13,OUTPUT); pinMode(buttonPin, INPUT);
Serial.begin(9600); pinMode(groundpin, OUTPUT);
pinMode(powerpin, OUTPUT);
digitalWrite(groundpin, LOW);
digitalWrite(powerpin, HIGH);

}
void loop()
{
buttonState = digitalRead(buttonPin);
buttonState1 = digitalRead(buttonPin1);
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);
if( analogRead(ypin)>400){ // can use any direction
Serial.println('5');
delay(500);
}
if( analogRead(ypin)<300){
Serial.println('6');
delay(500);
}
if (buttonState == HIGH) {
Serial.println('1');
delay(500);
}

if (buttonState1 == HIGH) {
Serial.println('2');
delay(500);
}
if (buttonState2 == HIGH) {
Serial.println('3');
delay(500);
}
if (buttonState3 == HIGH) {
Serial.println('4');
delay(500);

}

}

Step 8: 2D Game Design !!

Software needed -Game editor

Game Editor is a 2D game authoring package. It supports multi platform development toiPhone, iPad, Mac OS X, Windows (95-Windows 7), Linux, Windows-basedSmartphones, GP2X, Pocket PCs, andHandheld PCs. Compatibility with these platforms is mentioned on Game Discovery,[1]a popular site for game developers, among other software like 3D Gamemaker, Darkbasic, and Game Maker.

Game Editor was created by Makslane Rodrigues, who has been developing it since 2002. The current version is 1.4.0. It is still considered to be a work in progress.


Download Game editor :

http://game-editor.com/Main_Page

http://game-editor.com/Download
Interface

The interface itself is relatively basic and is the same for Mac OS X, Linux and Windows. Navigating the editor map (where the level is designed and executed) involves panning. The interface is composed of a main menu at the top, which shows the current position on the map, and icons indicating the mode(s) the user is in. The interface is window based. Each action and event has its own window, along with several settings windows.

Actor concept

The objects in Game Editor are known as actors. Notably, this doesn’t mean every actor has to be a character. You can add multiple graphics and animations to an actor from supported formats.

Events

The Game Editor engine is event driven. For something to happen in your game, Game Editor handles events you create using the interaction of actors, and other game elements, the mouse and the keyboard. In Game Editor, you can customize to a very high extent what actions happen on an event.

Level creation

Game Editor provides two ways for dividing the levels of the game. One is creating separate files for each level, and then linking them with 1 or 2 functions. But if the levels are small anyway, and you don’t want to separate them so much, then you can put all levels into one file, and surround the levels with activation regions which defines the surrounded part of the file loaded in and out of the memory together.

Non-actor objects

Game Editor also allows you to create Paths, and activation events. Paths are marked as nodes in Game Editor interface, and can specify a route the actor will move on. The speed of the path can also be modified, and the path can be made up of Bezier curves and linear lines too.

Conclusions

I think this is a great software for anyone that want to try the hard work of game creator.
On the official site there is also a “game” area where you can download and see some games published by people and a demo area that can show you what you can do with this software.
The only bad thing of this software…is that it was not ready years ago..when i had more free time, more ideas and love for games 



Step 9: Screenshot of Game Which I Designed

SDMIT is my Engineering college ! this is my final year project :)

Step 10: Xbee Pairing !!

Pairing 2 Xbee is very difficult for the beginners !!
Software used XCTU or Putty these are terminal software !!

I will give a YouTube link you can follow it ,


http://m.youtube.com/watch?v=Boy5asltEJw

https://learn.sparkfun.com/tutorials/exploring-xbees-and-xctu

Step 11: 2D Game Design Tutorial Videos !!

http://youtu.be/0CHFNwRty0U?list=PLzOle7kjjhul85u7fBz-Jft70ql1boyXO






if you have any questions feel free to ask !!

amaraxr@gmail.com

www.xolcano.com

thank you !!

Sensors Contest 2016

Participated in the
Sensors Contest 2016