View Full Version : [APP][13/04/09] GravityPong - GSensor Pong 0.4
l3v5y
12th April 2009, 05:19 PM
Another little game from me today.
This uses the same basic framework as BallPhysics, but applies it in a different way.
It's pong, where your paddle is controlled by tilting the device.
http://forum.xda-developers.com/attachment.php?attachmentid=175522&stc=1&d=1239549500
The controls:
Up/Down change the balls speed.
Left/Right change the CPU paddle speed
Centre pauses
The text:
In the bottom left is the time in milliseconds since the last restart
In the bottom right is the current score
Should work on Diamond, Raphael, Blackstone, Rhodium and Topaz.
It's written in C++/win32, so no nothing apart from the exe is needed.
Configuration:
HKCU\Software\l3v5y\GravityPong
FixedVelocity=
if < 0, velocity is variable, if > 0, FixedVelocity is the difference between the CPU speed and your paddle speed
Changelog
0.4 - uses trig to calculate the initial ball speed so the ball travels at one speed regardless of angle, some little performance tweaks
0.3 - adds configuration of speed, and exit if mouse is within top 40 pixels of screen.
0.2 - Fixes sensor polling, and possible odd background
0.1 - Initial release
johanromijn
12th April 2009, 05:36 PM
Nice!!!
I will try it right now!
[EDIT] The idea is nice, but controlling the paddle isn't working very well for me (it's almost not responding to my movements at all), and after 5 sec. it will be in a loop.
Joe_PDA
12th April 2009, 06:08 PM
I loaded this game onto my Touch Pro. Here is what happened:
1. Worked for about 15 seconds. Then my paddle would not respond to any movement. I tried back and forth, up and down, side to side, hard and soft shaking.
2. Shut down and tried a soft reset. Started game again and all I got was a colorful static screen but could still see the paddle moving with its white tail in the fore ground. Did I describe that well enough to understand?
This game seems like it could be really cool but seems to have some issues.
Any ideas?
l3v5y
12th April 2009, 06:39 PM
I loaded this game onto my Touch Pro. Here is what happened:
1. Worked for about 15 seconds. Then my paddle would not respond to any movement. I tried back and forth, up and down, side to side, hard and soft shaking.
2. Shut down and tried a soft reset. Started game again and all I got was a colorful static screen but could still see the paddle moving with its white tail in the fore ground. Did I describe that well enough to understand?
This game seems like it could be really cool but seems to have some issues.
Any ideas?
Okay.
I think I've found the cause of both of those.
1. I was polling the sensor too often causing it to try and check again before it had finished the previous check.
2. I haven't noticed this, but filling the background with a black fill should sort it.
Can you try the attached and see if it works?
Thanks
l3v5y
12th April 2009, 06:45 PM
A question for potential users of this:
Anyone interested in the possibility of bluetooth based multiplayer?
As in, you pair with another HTC sensor enabled device and can control one paddle while the paired device controls the other?
I ask as I've just found some sample code in the WM6 SDK for "BthChat", that could provide the data transfer framework...
johanromijn
12th April 2009, 06:55 PM
Tnx, works better now.
Still it's hard to get the paddle "stable", but it works.
l3v5y
12th April 2009, 06:57 PM
Tnx, works better now.
Still it's hard to get the paddle "stable", but it works.
Would you prefer the sensitivity to be lower?
I could probably make it configurable, but I'd need a settings app/screen to do so. If wanted, I'll do it...
johanromijn
12th April 2009, 07:01 PM
Would you prefer the sensitivity to be lower?
I could probably make it configurable, but I'd need a settings app/screen to do so. If wanted, I'll do it...
Maybe it would be better that if you tilt your device to the left it will move to the left at a static speed. (not moving very fast if you tilt it more)
Now it's bouncing from all left to all right, it's hard to control.
I hope you get what I mean. Maybe it's just me who can't play this game :-)
Joe_PDA
12th April 2009, 07:05 PM
Thanks for the lightening fast update. This is much better now. Really cool. Your are on to something really good here. A few comments:
1. I agree it is a bit hard to control. configurable would be the way to go.
2. Can you make the scoreboard a bit larger?
3. Maybe a pause button and exit button?
4. Bluetooth multiplayer would be a cool feature.
Based on your lightening fast work, can we expect the new version in the next 20 minutes?
just kidding ;). I have a short attention span.
l3v5y
12th April 2009, 07:09 PM
Thanks for the lightening fast update. This is much better now. Really cool. Your are on to something really good here. A few comments:
1. I agree it is a bit hard to control. configurable would be the way to go.
2. Can you make the scoreboard a bit larger?
3. Maybe a pause button and exit button?
4. Bluetooth multiplayer would be a cool feature.
Based on your lightening fast work, can we expect the new version in the next 20 minutes?
just kidding ;). I have a short attention span.
Those updates were about 5 lines of code :D
1. Configurable is about 10 lines of code (it'll be registry based, I might make a config app later)
2. Scoreboard font size is one number, so that's easy.
3. Centre button on DPAD (or return on a keyboard) will pause it, although the timer in the bottom left may continue to run
4. That may take longer as I need to find a device I can test it on (I only have on Diamond, and my Prophet doesn't do gsensors..)
Joe_PDA
12th April 2009, 07:21 PM
Good news, awaiting update. On this post have you gotten rid of the older version so people only download the best one? Keep up the good work. You seem to be good at writing apps for the G-sensor. Are you working on any other games/programs?
I would like to see the following:
1. A good Magic 8 Ball. What I've found out there doesn't seem to work well on the Touch Pro G-Sensor.
2. A configurable Spinner. Something like the Spin the Bottle app but one that lets us put in backgrounds, like numbers 1-6 or words like ("drink one shot") etc.
3. A good configurable dice roller.
Thanks for your hard work.
l3v5y
12th April 2009, 07:32 PM
Maybe it would be better that if you tilt your device to the left it will move to the left at a static speed. (not moving very fast if you tilt it more)
Now it's bouncing from all left to all right, it's hard to control.
I hope you get what I mean. Maybe it's just me who can't play this game :-)
I get what you mean.
In the update I'm just uploading the speed is fixed at one above the CPU speed, but you can change it to variable in the registry
HKCU\Software\l3v5y\GravityPong
FixedVelocity=
if < 0, velocity is variable, if > 0, FixedVelocity is the difference between the CPU speed and your paddle speed
l3v5y
13th April 2009, 12:37 PM
0.4 is now released.
Some performance tweaks, and a change to the ball velocity.
Nilee
13th October 2009, 06:38 PM
At mines it doesn't work
Then it says unable to load Sensor DLL or something like that im using samsung omnia i900 and i downloaded microsoft frame thing plz help
daJudge2010
13th October 2009, 10:59 PM
such poor quality games for the Diamond . as the iPhone has great games with brilliant graphics and gameplay. and we pretend PONG is fun.
Brav0
14th October 2009, 04:12 AM
such poor quality games for the Diamond . as the iPhone has great games with brilliant graphics and gameplay. and we pretend PONG is fun.
ummm...then go buy and iphone.
great game btw.
ps. pong IS fun
hulinm
29th December 2009, 08:02 AM
>>>>>>>>>>>>>>>>>>>>>>>>>>
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.