TargetTracker

버전 1.1.0.0 (4.79 KB) 작성자: James Potter
This is a one-dimensional tracking game. Use a joystick to make the cursor follow the target.
다운로드 수: 730
업데이트 날짜: 2012/7/24

라이선스 보기

As part of my graduate research, I have used manual tracking games (based on the work of previous researchers) to test the control behavior of human operators, and how their behavior changes as the dynamics of the cursor change.

Programming these games in MATLAB is fun. I am posting a simple example game to serve as a reference in case anyone wants to make something similar.

There is a list of settings near the top of the function. Feel free to modify settings and observe their effect on the game. If things get messy, the default settings are given immediately after the NOTES section.

My code demonstrates a few techniques that I have found useful, including:
1) Enforcing a fixed frame rate with a MATLAB timer object
2) Using MATLAB's Control System Toolbox to get a discrete state-space model from a transfer function, and using the model to move the cursor based on joystick input (see "Other requirements" below)
3) Creating a seemingly-random signal from a sum of sine waves with random relative phase
4) Defining a small set of global structs that make it easy to share variables across functions, and make it obvious what kind of information is stored in each variable.

These techniques could be used for designing a variety of games, not just tracking games.

인용 양식

James Potter (2025). TargetTracker (https://www.mathworks.com/matlabcentral/fileexchange/37588-targettracker), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Video games에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Pointed out that joystick mex files are free.

1.0.0.0