• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][updated 25/08/2008 - Ver 0.4] YABGBT - Yet Another Ball Game Based on Tilt

Search This thread

hellgod

Member
Jul 19, 2007
33
2
Hy Guys,

Here is my first dev for the touch Diamond.
It is a kind of juggle ball game using tilt sensor SDK and XFlib.

It is just a test for me, so I don't kown if i will had time to improve it.

Ver 0.4.1 [11/01/2009]:
Added : Suport for Touch HD

Ver 0.4 [25/08/2008]:
Added : Now the backlight is allways on
Added : about screen

Ver 0.3.1 [22/08/2008]:
Added : You can chose if the camera follow the ball or the base
Added : Sound when ball hit the base

Ver 0.3 [21/08/2008]:
Added : Biggest playing aera

Ver 0.2 [10/08/2008]:
Added : Menu to select difficulty level


p.s. the game is also playable with stylus, so it is not reserved to the diamond
 

Attachments

  • cap.png
    cap.png
    18.5 KB · Views: 7,456
  • menu.jpg
    menu.jpg
    20.1 KB · Views: 3,338
Last edited:

Riel

Senior Member
Mar 1, 2006
871
13
40
Born
www.zzapps.nl
Hey, that plays quite allright!

First things to polish up would be a higher ball res, a nice background and another cooler paddle image. Bouncesound ? :p

But gameplay is pretty great already, well done !! Got it bouncing for about 5 minutes and enjoyed it :p
 

surur

Senior Member
Nov 29, 2003
622
2
Video of the game here.
http://wmpoweruser.com/?p=621

Great game.

May I suggest to the developer that he may want to also make the square bigger and smaller based on the height of the ball, and further make the background dynamic, so that it e.g. moves in the opposite direction to the ball, to exploit the paralax effect and give the user a feeling they are actually looking into a 3 dimensional box.

Surur
 

hellgod

Member
Jul 19, 2007
33
2
tanks for the video and the review.
I will think about adding paralax effect in the next weeks !
 

hellgod

Member
Jul 19, 2007
33
2
update 0.3.1 (22/082008)

Now you can chose if the camera will follow the ball or if it will follow the base!

I Need Help :
I hope some Dev will read this,
this game use the Tilt sensor, so the game goes to standby mode after few seconds because we don't touch screen. I don't kown how to prevent the standby mode, so if someone got an idea.....
(i use C language)



edit : the forum got a new section, so i guess my game is not in the right one, so moderator could you move this thread ! thanks
 
Last edited:

ageye

Senior Member
Feb 19, 2007
638
5
Ulm
www.ageye.de
update 0.3.1 (22/082008)

Now you can chose if the camera will follow the ball or if it will follow the base!

I Need Help :
I hope some Dev will read this,
this game use the Tilt sensor, so the game goes to standby mode after few seconds because we don't touch screen. I don't kown how to prevent the standby mode, so if someone got an idea.....
(i use C language)



edit : the forum got a new section, so i guess my game is not in the right one, so moderator could you move this thread ! thanks
this is c# - should work on c, too... found it on msdn and there should be an example for c, too... I just don't find the URL, so google may help (just enter something from below ;-))

public enum CEDevicePowerState
{
D0 = 0, //Full on
D1, //Low on
D2, //Standby
D3, //Sleep
D4, //Off
}

[DllImport("coredll.dll", SetLastError = true)]
static extern IntPtr SetPowerRequirement(string device, CEDevicePowerState ceDevicePowerState, uint deviceFlags, IntPtr systemState, ulong stateFlags);

[DllImport("coredll.dll", SetLastError = true)]
static extern int ReleasePowerRequirement(IntPtr handle);

[DllImport("coredll.dll", SetLastError = true)]
static extern void SystemIdleTimerReset();



on the onload i do following:

IntPtr handle = SetPowerRequirement("BKL1:", CEDevicePowerState.D0, 1, IntPtr.Zero, 0);

to release it, try the 2nd handle...

I use a timer which ticks every 10 seconds and performs this:
SystemIdleTimerReset();

I don't know if it's necessary, but I think so... hope that helps...
 

hellgod

Member
Jul 19, 2007
33
2
Thanks a lot Ageye !! it works !!

for information here is the code :

main.c :
Code:
...
...
#define POWER_DLL       L"coredll.dll"

typedef enum _CEDEVICE_POWER_STATE {
  PwrDeviceUnspecified = -1,
  D0 = 0,
  D1=1,
  D2=2,
  D3=3,
  D4=4,
  PwrDeviceMaximum=5
} CEDEVICE_POWER_STATE, *PCEDEVICE_POWER_STATE;

typedef HANDLE (WINAPI * PFN_SetPowerRequirement)(PVOID,CEDEVICE_POWER_STATE,ULONG,PVOID,ULONG);
PFN_SetPowerRequirement  pfnSetPowerRequirement;

typedef DWORD (WINAPI * PFN_ReleasePowerRequirement)(HANDLE);
PFN_ReleasePowerRequirement  pfnReleasePowerRequirement;


const int POWER_NAME = 0x00000001;
const int POWER_FORCE = 0x00001000;
HMODULE hPowerlib;


...
...
...

int main(void){
...
...
    hPowerlib= LoadLibrary(POWER_DLL);
    pfnSetPowerRequirement = (PFN_SetPowerRequirement)GetProcAddress(hPowerlib, L"SetPowerRequirement");
    pfnReleasePowerRequirement = (PFN_ReleasePowerRequirement)GetProcAddress(hPowerlib, L"ReleasePowerRequirement");

    HANDLE IntPtr = pfnSetPowerRequirement(TEXT("BKL1:"), D0, POWER_NAME | POWER_FORCE,NULL, 0);

...
...
pfnReleasePowerRequirement(IntPtr);
return0;
}
 

skynetent

Member
Sep 29, 2008
9
1
Barcelona
I have a problem with this game.
I copy it in the SD, and I execute it, but it has a problem.

The game doesn't work, and it enables the screen to send a report to microsoft.

I don't understand why it happens this.

Thanks a lot.

(sorry, my english is very bad).
 

hellgod

Member
Jul 19, 2007
33
2
I have a problem with this game.
I copy it in the SD, and I execute it, but it has a problem.

The game doesn't work, and it enables the screen to send a report to microsoft.

I don't understand why it happens this.

Thanks a lot.

(sorry, my english is very bad).

Did you use a touch Diamond ?