Author |
Message |
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri May 27, 2011 8:16 pm Post subject:
Holodeck Phaser Practice Subject description: ChucK Style |
|
|
Here is another fun application that I wrote for anyone who has a Gyration Air Mouse Elite or similar 3D pointing device. It mimics the holodeck phaser practice program as shown on Star Trek Next Generation.
When you start the program you hear a tone. Once the mouse moves even a tiny bit the tone changes and the game is active. The first target is at (Theta, Phi) = (0, 0), or in other words you are already pointing straight at it, so press mouse button 2 (the wheel) for a free point. You hear a short burst of noise indicating target destruction followed by a quick little beep indicating a score of 1, and the console window also indicates your score.
Immediately after that you hear a different tone as the target has moved to some other location. Hold the mouse at arm's length and rotate it horizontally (Theta) and vertically (Phi), listening to the tone change as you move. The tone reaches a high pitch when you are on-target, then press the button 2 again for another score.
Continue shooting to your heart's content or until the game messes up, which happens. I need to examine the limit conditionals for Theta and Phi (especially Phi) to fix this. For the time being the target locations are restricted to a square cone in front of you. Later when it works better I will put the targets anywhere in a sphere around you.
Also planned for future work (soon) are increasing skill levels in which the target gets smaller, begins to move, gets faster, and sounds different. Maybe I'll add some recorded samples of myself saying things to guide your aim. There is nothing on the screen to watch and there is no stereo imaging, just the change in pitch to guide you. Also the pitch is a function of angular distance, or arc, and does not have Theta and Phi distinctions.
I wrote this game to create an exercise routine that I would personally enjoy. I'm working on GOoCh-ing my way to better physical condition (GOoCh = Get Out of Chair). Anything that gets my fat butt out of this chair is a good thing, and this game has the potential to be really fun. Enjoy!
Les
Description: |
version 1, a bit crude but works OK |
|
Download (listen) |
Filename: |
shooter1.ck |
Filesize: |
5 KB |
Downloaded: |
364 Time(s) |
_________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Jun 03, 2011 3:23 am Post subject:
|
|
|
Well, I see that version 1 has 10 downloads at this time, so at least a few people have an interest in the program. Early this morning I got up and had a little phaser practice, refining the program along the way. This version has a lot of playability changes that make it more interesting.
Now the target size reduces with score. Target is still fixed in location, but gets smaller. This means that higher score targets have a higher pitch when properly aimed, a happy coincidence of the way it is coded.
Also if you miss, you lose a point and of course you still gain a point for a hit. This means that when you get to your actual level of skill you will tend to stay within a point or two of that skill level. My skill level is about 5, varying from 4 to 6 so I'll call it 5. So that's the score to crush!
Another change is that you fire by moving the mouse wheel one increment, either up or down. I did this because I found that as I play, the mouse behaves both as game input and as an actual mouse. This causes a problem as the middle mouse button does things like launch applications unexpectedly on my Mac's operating system - not good at all. So I made a middle mouse rotation do the firing job. If anyone has trouble with that just let me know and I will fix it.
Also I'm not sure if I mentioned it before, and it's worth repeating: pressing the left mouse button (button 0) resets the origin of phaserTheta and phaserPhi. This is really handy sometimes if you're playing while sitting in a chair.
Oh, and another change is that the target now can appear anywhere around you. The phaser's Theta and Phi are both constrained to a value of -pi to pi, which is a bit funny as the target distance only works for Phi from -pi/2 to pi/2. In other words the wraparound bug is better but still not completely fixed for phi. The bug is gone for Theta though, or never was I think. I'm not quite sure how to fully fix this, but you can always press the left mouse button if you get lost and there's no time constraint to the game so relax. No pressure, no worries!
Actually ChucK's mouse routine seems to be a bit limited in that it cannot access the three programmable buttons (presumably numbered above 2 as 3, 4, and 5). ChucK also cannot access the three-axis accelerometer which is not a problem for this game but would be really nice for other purposes. Hopefully a future version of ChucK will have these features, but it's OK we can do a lot with things the way they are.
Happy target hunting!
Les
Description: |
|
Download (listen) |
Filename: |
shooter3.ck |
Filesize: |
5.72 KB |
Downloaded: |
398 Time(s) |
_________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Jun 03, 2011 4:36 am Post subject:
|
|
|
Correction: with version 3 my high score is 4.
Les _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
|