PCG in First Person Shooter Games through Player Modeling - Documentation
Live Action First Person Shooter Game
description
Transcript of Live Action First Person Shooter Game
Live Action First Person Shooter Game
Patrick JuddIan Katsuno
Bao Le
Inspiration Inspired by the “Real
Time Color Replacement” Project (2009)
Wanted to combine their invisibility effect with a Duck Hunt style game
http://en.wikipedia.org/wiki/Duck_Hunt http://www.eecg.toronto.edu/~pc/courses/432/2009/projects/colorreplacement.pdf
How our game works Camera captures the game stage and
displays it on a monitor People/objects which enter the stage become
targets User shoots targets on the monitor with a gun
controller When a target is hit, it disappears (invisibility
effect)
Revised Project Goal Two foreseen difficulties
1. Custom HW interface for gun controller2. Tracking multiple targets
Revised project goals1. Use a mouse instead of a gun controller2. Restrict number of supported targets to one
Initial System Block DiagramCamera
Video Decoder
Mouse
Serial Port Driver
RAM-live image
-reference image
MicroBlaze Processor
Target Locator
RAM-Modified image
Target Drawer
Draw B/W Image*
Video Encoder
Monitor
Light gun
Optional
Target Manager
Hit/Miss Analyzer
Analog
Digital
Video_to_ram
Target Locator Compares reference
image to live image A difference in color
indicated a target Encodes targets
location as:(x min, y min) (x max, y max)
Memory
Microblaze
Reference Image Live Image
(x min, y min) (x max, y max)
Target Locator
Reference Image
Live Image
Target Location
PS/2 Mouse FPS requires:
High Precision Quick Response Time
Replaced Light Gun as input.
No ECE532 project has used it!
Mouse Operation Xilinx IP: XPS_Ps2 v1.00a Communicates with Microblaze over PLB SW Initialization: predefined sequence of
byte codes Interrupts on action (move or click) Receives info packets in ISR
Software – Target Manger Tracks movement of target based on
coordinates from the target locator Needs to distinguish an old target from a new
target Compares target location to mouse
coordinates to detect “hits” Remembers if a target has be hit
Target Remover Gets coordinates of box to
remove from microblaze(x min, y min) (x max, y max)
If (pixel is in box)read from reference image
Elseread from live image
Memory
Microblaze
Reference Image Live Image
(x min, y min) (x max, y max)Target
Remover
Output Image
Video Encoder
Design Flow - Hardware Start with simple custom core to read and
write to memory Create verilog testbench and simulate core Compare output waveforms with spec Test core in hardware Incrementally add functionality
Design Flow - Software Wrote algorithms and data structures in Linux Integrated into microblaze code Debugged microblaze software using xps gdb
Problem - Mouse InitializationInitialization: Send and receive a sequence of
byte-codesProblem: Mouse wouldn’t follow script!Debug:
Tried to isolate the problem:Tried mouse on other PCRead Registers using XMD
Solution: Get another mouse!
Problem - Mouse Buffer Overflow
Problem: Buffer overflow interrupt occur
Debug: Decrease sample rate Receive more than one packet in ISR?
Solution: Printf too slow, Remove it!
Problem – Custom Logic Target Locator core worked correctly in
simulation However the core did not function in
hardware Tried a variety of debug methods but could
not isolate the cause of the problem LEDs and switches Chipscope XPS hdl simulator
Problem – Custom Logic Solution:
Use mem_to_ip/ip_to_mem core from “Real Time Color Replacement” Project
Used their FSMs to perform memory reads and writes
Added our own target locator logic Also move target remover functionality to software
Problem - Integration the ps2 core caused erroneous target
detection when it was added to the project possibly due to bus read errors We are currently unable to find a solution
For the demo Two demos too show functionality of parts of
the design before integration, in lieu of the ps2 – detection issue
For the demo
1. Target locator reading the video signal and sending target information to microblaze
Video Decoder
RAM- live image
-reference image
MicroBlaze Processor
Target Locator
Video Encoder
For the demo
2. Mouse to video interface and target remover functionality
Video Decoder
Mouse
Serial Port Driver
RAM
-live image-reference image
MicroBlaze Processor
Video Encoder
Target Manager
Hit or Miss Analyzer
Lessons learned Don’t try to reinvent the wheel
We spend a lot of timing trying to recreate what other group had already done instead of focusing on the “new” aspects of our project
Lessons learned Our approach to hardware debugging was
less than ideal We had
multiple group members debugging independently used different methods
Should have decided on the best method concentrated our efforts
Conclusion Could not produce a fully functioning project However
Learned valuable lessons in project management Were the first group to use a ps2 mouse with their
project Will add this to the ece532 knowledge base