Difference between revisions of "F20: Son of a Gun"

From Embedded Systems Learning Academy
Jump to: navigation, search
()
(Implementation)
Line 233: Line 233:
 
=== Implementation ===
 
=== Implementation ===
 
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.
 
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.
 +
 +
1. The game involves use of two sensors: 2-axis joystick and onboard accelerometer.
 +
2. The interfacing of 2 axis joystick is fairly easy. 2 ADC and the job is done. For accelerometer too, getting values over I2C is relatively easy task.
 +
3. Challenge lies in using the Zigbee, with low latency. Serial was initially used, however, was later abandoned ans SPI was used for lower latency.
 +
4. Tracking the object onscreen is challenging as game involves shooting of objects. 3 virtual planes are maintained other than the RGB planes, which maintains the grey scale image of objects. Eg: Friend objects are drawn in friend plane, enemy in enemy plane and life objects in life plane. An intersection of these planes gives the overlap if it exists. Once the intersection is available, the nearest position of the enemy/plane is extracted from the structure and requisite action is taken henceforth.
 +
5. Objects move on the screen on a pseudo random pattern. The variability of the movement is dependent upon the gave level.
 +
6. Once the life becomes over, the game reaches an end.
  
 
== Testing & Technical Challenges ==
 
== Testing & Technical Challenges ==

Revision as of 00:58, 12 December 2020

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Son of a Gun

Abstract

Son Of A Gun is a shooting game inspired by the evergreen classics Duck Hunt and Virtua Cop 2. There will be enemy and friend objects on the LED matrix. The player will use a gun(having IR/color sensor or gyroscope) to aim and shoot the objects on the LED matrix. Killing the friend object will lead to 'Game Over'.


Block Diagram of Game Son Of a Gun

Objectives & Introduction

Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.

Team Members & Responsibilities

  • Tejas Pidkalwar
  • Tirth Pandya
  • Nimit Patel

Schedule

Week# Date Task Actual Status
1

09/23 - 09/29

  • Review previous projects
  • Brainstorm on games and proposals
  • Frame the project proposals
  • 09/24
  • 09/25
  • 09/27
  • Completed
  • Completed
  • Completed
2

09/30 - 10/06

  • Components search and analysis
  • Discuss probable gameplays and challenges
  • 10/03
  • 10/04
  • Completed
  • Completed
3

10/07 - 10/13

  • Set up git repository
  • Set up JIRA for project management
  • 10/18
  • 10/10
  • Completed
  • Completed
4

10/14 - 10/20

  • Set up a wikipage
  • Prepare initial wiki schedule
  • Order finalized components
  • Study data-sheets of the components
  • Create a high-level block diagram of the project
  • 10/15
  • 10/19
  • 10/18
  • 10/20
  • 10/23
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
5-7

10/21 - 11/10

  • Distribute major roles among team members
  • Test the acquired parts and components
  • Develop basic drivers for LED matrix
  • Develop basic driver for Joystick
  • Develop basic driver for Accelerometer
  • Finalize gameplay objects - v1.0
  • 11/1
  • 11/5
  • 11/19
  • 11/8
  • 11/9
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • In Prgress
8

11/11 - 11/17

  • Receive the new LED matrix (Sparkfun)
  • Finalize on wireless medium (Bluetooth vs Zigbee), Document the comparison
  • Document finalized wireless communication(Zigbee)
  • 11/17
  • 11/12
  • 11/15
  • Completed
  • Completed
  • Completed
9

11/18 - 11/24

  • Develop alphanumeric shapes and move shapes
  • Implement Zigbee driver (transmitter and receiver) and test same
  • Develop MP3 decoder driver and test same
  • Design algorithm to move object in foreground while maintaining background image
  • Move object on LED matrix using Joystick and accelerometer
  • Integrate zigbee interface for Joystick and gun controller communication
  • 11/20
  • 11/23
  • 11/23
  • 11/22
  • Completed
  • Completed
  • In Progress
  • Completed
  • Completed
  • In Progress
10

11/25 - 12/1

  • Design and order PCB
  • Create gameplay object for LED matrix
  • Create algorithm to detect cotroller’s pointer overlapping on object and take actions accordingly
  • Implement randomize function to move obstacle object randomly
  • Create background picture for gameplay
  • Design scoring mechanism for the gameplay

Incomplete

11

12/2- 12/8

  • Design different levels of game
  • Implement a scoring mechanism
  • Implement the code for different levels
  • Design aesthetics for console and controllers
  • Design power supply mechanism for each module of game
  • Integrate and test all the functionalities for gameplay[v3.0]
  • Design casing for the power supply and other modules

Incomplete

12

12/9 - 12/16

  • Build aesthetics for the game
  • Start final testing of the game and logging errors
  • Fix all the errors
  • Revise the document to cover all aspects of design and process

Incomplete

Parts List & Cost

Give a simple list of the cost of your project broken down by components. Do not write long stories here.

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

1. The game involves use of two sensors: 2-axis joystick and onboard accelerometer. 2. The interfacing of 2 axis joystick is fairly easy. 2 ADC and the job is done. For accelerometer too, getting values over I2C is relatively easy task. 3. Challenge lies in using the Zigbee, with low latency. Serial was initially used, however, was later abandoned ans SPI was used for lower latency. 4. Tracking the object onscreen is challenging as game involves shooting of objects. 3 virtual planes are maintained other than the RGB planes, which maintains the grey scale image of objects. Eg: Friend objects are drawn in friend plane, enemy in enemy plane and life objects in life plane. An intersection of these planes gives the overlap if it exists. Once the intersection is available, the nearest position of the enemy/plane is extracted from the structure and requisite action is taken henceforth. 5. Objects move on the screen on a pseudo random pattern. The variability of the movement is dependent upon the gave level. 6. Once the life becomes over, the game reaches an end.

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

<Bug/issue name>

1. All the objects onscreen are tracked by using a structure file, which has co-ordinates of all the object, their status, shape and other relevant information. When we call the draw function, the LED worked flawlessly for some time, after which the board would restart. This was because structure would access out of bound value, which resulted in the board to restart.\n 2. The object collision algorithm worked only if the object resided on column 32 and above on a 64 x 64 LED panel. On careful observation, it was noticed that the back end function which implemented the collision detection, used bit shifting of uint64 variables. The bits 32 through 63 all had value 0. The bit shifting part was broken down into two 32 bit shift variable and then these two variable were &-ed together. Though, the comptroller processes all unit64 variable manipulation, the bit shifting one was a surprise and required intricate debugging to get the root cause of the API responding weirdly in an otherwise logical implementation of high level logic.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.