Code Monkey home page Code Monkey logo

throwthebirds's Introduction

Throw The Birds

This project is a demonstrartion of the usage of Kinect Camera in controlling game mechanics.

Requirements

  • Kinect SDK
  • Unity 2018
  • kinect with MS-SDK Asset (Downloadable from Unity Asset Store)
  • Windows Operating System

Kinnect SDK is only availabe for Windows OS. This project is tested in Unity 2018, conflicts in previous versions may occur

How it works

The asset gives us a set of enums, each pointing to the corresponding body part of the player in front of the Kinect Camera. The code below is part of the script found in /Assets/Kinect/KinectScripts/KinectWrapper.cs.

public enum NuiSkeletonPositionIndex : int
    {
        HipCenter = 0,
        Spine = 1,
        ShoulderCenter = 2,
        Head = 3,
        ShoulderLeft = 4,
        ElbowLeft = 5,
        WristLeft = 6,
        HandLeft = 7,
        ShoulderRight = 8,
        ElbowRight = 9,
        WristRight = 10,
        HandRight = 11,
        HipLeft = 12,
        KneeLeft = 13,
        AnkleLeft = 14,
        FootLeft = 15,
        HipRight = 16,
        KneeRight = 17,
        AnkleRight = 18,
        FootRight = 19,
        Count = 20
    }

In this project, we needed two anchor points for implementing the action of throwing a bird. One for the head of the slingshot, and another for simulating the hand stretching the rubber band to it. As for these anchors, we used the head and the left hand of the player; Head being the head of the slingshot, and HandLeft as the controller used for aiming the birds, and setting the throw power. We also used HandRight as the trigger for shooting the birds; when it enters a specific area in the right half of the game screen, the shoot command is sent.

Below is a demonstration of the result.

Important Note: This game portrays characters and environments of the game Angry Birds Star Wars by Rovio, with some changes in controllers. This project is only used for educational purposes, it is not, and will not be used in any other way. Sprites of the game were are low quality assets found on the internet, used only to facilitate the developmnent process.

throwthebirds's People

Contributors

galiold avatar soroush00000 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

throwthebirds's Issues

To Dos

Should take care of these

  • Smooth throwing guide line
  • Gravity field sprite
  • Glowing trail
  • Dynamic background
  • AI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.