PDA

View Full Version : [APP][25/05/09]l3v5y CoinToss 0.2 (OpenGL!)


l3v5y
25th May 2009, 07:36 PM
Based in part on my experimenting with OpenGL ES here (http://forum.xda-developers.com/showthread.php?p=3829887#post3829887), I've now written a fairly pointless application that utilises hardware accelerated graphics on devices that support it.

Notes:
Essentially, you get a coin, and you can flip it. If you hit the "enter" button, or hit "stop/centre" it'll flip the coin round to have a flat face on the front.

It can be skinned by replacing heads.bmp, tails.bmp and side.bmp with a power of 2 for the height and width of the image (preferably square).

http://i245.photobucket.com/albums/gg59/l3v5y/l3v5yCoinToss1.jpghttp://i245.photobucket.com/albums/gg59/l3v5y/l3v5yCoinToss2.jpghttp://i245.photobucket.com/albums/gg59/l3v5y/l3v5yCoinToss3.jpg

Requirements:
something that supports OpenGL ES (can be software or hardware rendering) e.g. HTC Touch Diamond
l3v5yExtendedFunctions (http://wiki.xda-developers.com/uploads/ExtendedFunctions.CAB) (handles window creation, the buttons at the bottom of the screen, window scaling etc) - MUST be installed
l3v5yOpenGLES (http://wiki.xda-developers.com/uploads/l3v5yOpenGLES.CAB) (contains worker functions, and bits of GLUT/GLU recompiled) - MUST be installed
about 500kb of storage
about 2mb of RAM

Download:
Attached to this post

Changes:
0.2 removed GLUT|ES dependency

Tested and known to work on:
HTC Touch Diamond
Xperia X1
HTC Touch Pro
HTC Touch HD

l3v5y
25th May 2009, 07:36 PM
I'm having this post... :)

bronx
25th May 2009, 07:57 PM
umm... can we have a version with british 1 pound coin instead of euro?? :P JK. ;) I hope that if fpsece 1.0 is going to be ever released You can try to compile a nice opengl plugin for it. :D

[EDIT]

ok. doesn't work on xperia stock r2a rom. untrusted certificate something sh.. oh well. good work anyway. ;)

l3v5y
25th May 2009, 08:01 PM
umm... can we have a version with british 1 pound coin instead of euro?? :P JK. ;) I hope that if fpsece 1.0 is going to be ever released You can try to compile a nice opengl plugin for it. :D

I couldn't find a nice picture of a pound. You can swap out the images in \Program Files\l3v5yCoinToss for anything you like (check the format of the ones there, and you should get an idea of what the new ones need to be like).

l3v5y
25th May 2009, 09:49 PM
umm... can we have a version with british 1 pound coin instead of euro?? :P JK. ;) I hope that if fpsece 1.0 is going to be ever released You can try to compile a nice opengl plugin for it. :D

[EDIT]

ok. doesn't work on xperia stock r2a rom. untrusted certificate something sh.. oh well. good work anyway. ;)

Have you relaxed the security settings on your device? (I'm guessing not...)

Have you installed the extra things (l3v5yExtendedFunctions and l3v5yOpenGLES)?

TheChampJT
25th May 2009, 10:19 PM
Sweet! Had something similar on my Storm, but now I've got the Touch Pro :D! Always great when you don't have a coin.

l3v5y
25th May 2009, 10:23 PM
Just realised I'd accidentantly linked it to GLUT|ES, without using any of the functions it provides, so it wouldn't work without glutes.dll, but didn't need it...

That's (hopefully) fixed in 0.2, which is up now...

bronx
25th May 2009, 10:28 PM
umm... nope? :P

I belive that security options are well relaxed on my device, whatever it means ;) , but to double check can You tell me what shall I look at?

also got those two cabs and will try them straight away.

thanks for answering and keep up the good work.

br

bro

[EDIT]

yeah! got it working. niceee... :D

l3v5y
25th May 2009, 10:32 PM
umm... nope? :P

I belive that security options are well relaxed on my device, whatever it means ;) , but to double check can You tell me what shall I look at?

also got those two cabs and will try them straight away.

thanks for answering and keep up the good work.

br

bro
Do you get warnings about unsigned ... when installing cabs?

The two cabs are a requirement for this to work at all, as is a libgles_cm.dll file in \Windows

bronx
25th May 2009, 10:41 PM
never had any warnings and all I did was just to install those two cabs, after that it simply works and works very well. :) the other thing is, that this app is quite pointless indeed. ;)

anyway, good to see that some talented brains are learning to utilise opengl in our chips.

thanks

shadowmike
25th May 2009, 10:47 PM
Works great on the x1. very nice. thank you.

never had any warnings and all I did was just to install those two cabs, after that it simply works and works very well. :) the other thing is, that this app is quite pointless indeed. ;)

anyway, good to see that some talented brains are learning to utilise opengl in our chips.

thanks

so is the zippo app for the iphone but its still cool :D

l3v5y
25th May 2009, 10:48 PM
never had any warnings and all I did was just to install those two cabs, after that it simply works and works very well. :) the other thing is, that this app is quite pointless indeed. ;)

anyway, good to see that some talented brains are learning to utilise opengl in our chips.

thanks
Sorry for having to install 3 cabs, it just lets me separate things so that bits like the button controls can be updated without affecting all the applications that utilise it (I have loads of half finished things that I'm gradually working through).

Also, for anyone that's interested, I've managed to get almost all of GLU|ES 1.3 running on the OpenGLES on our Diamonds... And I've also created a wrapper for setting up OpenGL at runtime which makes it much simpler to create an openGL application that works... I'll be releasing the code once I've cleaned it up, and optimised it...

bronx
25th May 2009, 11:00 PM
as I said before - I really hope that all this research will help to write proper opengl plugin for fpsece. that would be the sweetest thing on the planet to have accelerated psx emulator on ppc.

moesfeld
26th May 2009, 11:22 AM
Works pretty good on my KS20 only there seems to be some problem with the button overlays they are only shown when i move my finger over them and they are flickering

l3v5y
26th May 2009, 11:57 AM
Works pretty good on my KS20 only there seems to be some problem with the button overlays they are only shown when i move my finger over them and they are flickering

Any change you can get a screenshot?

moesfeld
26th May 2009, 02:00 PM
Here you go.

On the screenshot you canīt see the flickering. But I noticed that the flickering occurs on all overlays (s2u2, volume control, startmenu, etc...)
It looks like opengl es redered stuff tries to stay on top. (This happens allso on your ogles test app)

thedaniel
26th May 2009, 03:41 PM
I love those days when I can add a new link to a pointless app in my start menu :)

Love this. Thank you! :)

thedaniel
26th May 2009, 03:59 PM
I love those days when I can add a new link to a pointless app in my start menu :)

Love this. Thank you! :)


Edit: Look! :D My first double post! :D Sorry'bout that.

l3v5y
26th May 2009, 06:26 PM
Here you go.

On the screenshot you canīt see the flickering. But I noticed that the flickering occurs on all overlays (s2u2, volume control, startmenu, etc...)
It looks like opengl es redered stuff tries to stay on top. (This happens allso on your ogles test app)

I think that's something to do with your device... Is anyone else having this kind of issue?

moesfeld
26th May 2009, 06:55 PM
I think that's something to do with your device... Is anyone else having this kind of issue?

Do you know any way to test the OpenGL functions supported on my device?
LG messed up BIG time on the drivers on KS20.

bbonzz
26th May 2009, 08:24 PM
Tested and known to work on:
HTC Touch Diamond
Xperia X1
HTC Touch Pro

And working perfectly on Blackstone as well

jlccarv
27th May 2009, 02:02 PM
an error pops saying that its not a valid windows mobile application

l3v5y
27th May 2009, 04:06 PM
an error pops saying that its not a valid windows mobile application

What device do you have, and have you installed the cabs listed under "required"?

l3v5y
27th May 2009, 04:06 PM
And working perfectly on Blackstone as well

Cool. I'll add that to the first post.

p-de-geus
27th May 2009, 10:07 PM
It works on my Tytn2 with HTC stock rom.

The only thing is that i dont see the 2 buttons on the bottom.

xeirwn
28th May 2009, 07:34 PM
Tried this on my O2 XDA Flame (with NVidia Goforce 5500 GPU).

I get: "OpenGL ES init error : egInitialize. " :mad:

It seems this is the problem with my phone's (older) gpu drivers.
Also get this with some other opengles apps posted in xda-developers.

Please fix ! I can test.

l3v5y
28th May 2009, 07:35 PM
Tried this on my O2 XDA Flame (with NVidia Goforce 5500 GPU).

I get: "OpenGL ES init error : egInitialize. " :mad:

It seems this is the problem with my phone's (older) gpu drivers.
Also get this with some other opengles apps posted in xda-developers.

Please fix ! I can test.

Does your device have a libgles_cm.dll in \Windows?

smuppy
28th May 2009, 07:38 PM
an error pops saying that its not a valid windows mobile application
Have the same problem on Athena 7500, wm6.1 michy rom. Hm, maybe I should try this on an Athena 7510 with stock rom...

l3v5y
28th May 2009, 07:40 PM
Have the same problem on Athena 7500, wm6.1 michy rom. Hm, maybe I should try this on an Athena 7510 with stock rom...

Does the ROM you're running have OpenGL ES drivers? (libgles_cm.dll)

smuppy
28th May 2009, 09:39 PM
Does the ROM you're running have OpenGL ES drivers? (libgles_cm.dll)

Oops, stock rom on athena 7510 doesnt have that installed :-)
That might explain a few things...
Downloadable somewhere? Ill search here for it.

l3v5y
28th May 2009, 09:54 PM
Oops, stock rom on athena 7510 doesnt have that installed :-)
That might explain a few things...
Downloadable somewhere? Ill search here for it.

I have no idea. It's generally fairly device specific... But there's always a software rendering alternative.

uniqueboy
28th May 2009, 10:32 PM
Nice and thankyou very much. Has any one swapped out the coin images yet? Care to post your graphics? And l3v5y, how about if people do post up their images you could add in a menu option to select the image file, maybe just dump them in the install folder. No problems for me on my diamond, very smooth but I would like it to auto centre when the coin stops spinning.:)

l3v5y
28th May 2009, 10:35 PM
Nice and thankyou very much. Has any one swapped out the coin images yet? Care to post your graphics? And l3v5y, how about if people do post up their images you could add in a menu option to select the image file, maybe just dump them in the install folder. No problems for me on my diamond, very smooth but I would like it to auto centre when the coin stops spinning.:)

The "Stop/Centre" button should centre the coin. I should be able to add an option to centre it when it stops automatically though.

If people can upload some images, I'd happily work on a configuration method.

uniqueboy
28th May 2009, 11:47 PM
Heres a couple for you to look at l3v5y, I can photoshop them to whatever you want, if you want, just let me know.:)

l3v5y
29th May 2009, 12:09 AM
Heres a couple for you to look at l3v5y, I can photoshop them to whatever you want, if you want, just let me know.:)

Thanks for those. I'll edit them tomorrow (I need sleep now... :S).

xeirwn
29th May 2009, 04:51 PM
Does your device have a libgles_cm.dll in \Windows?

Yes.
Perhaps you might want to try some other demos that work on my device?

bbonzz
29th May 2009, 07:00 PM
Some other coins (strange thing: transforming them to bitmap, 256x256px, app doesn't work: works only with your euro: are there other specs for images?)

Cannot upload here, as usual. So here's the LINK (http://www.megaupload.com/?d=DGUWB4RX)

l3v5y
29th May 2009, 07:09 PM
Some other coins (strange thing: transforming them to bitmap, 256x256px, app doesn't work: works only with your euro: are there other specs for images?)

Cannot upload here, as usual. So here's the LINK (http://www.megaupload.com/?d=DGUWB4RX)

Not that I know of... :S

I'll have a look at the resource loader (it's one I hacked apart from something I did for a desktop OpenGL thing a while ago) and see if there's anything odd...

xeirwn
30th May 2009, 02:16 PM
Well... I tried this on my Samsung Omnia

It works (quite smoothly) using the dlls from 'Sensory Overload' game.

bbonzz
30th May 2009, 06:44 PM
Found the problem: coins must be a power of 2 in width and height, and also image MUST be 96dpi (97 if you work in photoshop).

So here are my coins, ready to use: DOWNLOAD (http://www.megaupload.com/?d=SG795DKP)

l3v5y
30th May 2009, 07:37 PM
Found the problem: coins must be a power of 2 in width and height, and also image MUST be 96dpi (97 if you work in photoshop).

So here are my coins, ready to use: DOWNLOAD (http://www.megaupload.com/?d=SG795DKP)

Oh right... Do you mind if I integrate the coins into an updated cab?

bbonzz
30th May 2009, 11:43 PM
Oh right... Do you mind if I integrate the coins into an updated cab?

would be beautiful. And if you want, i can do more of them

bbonzz
31st May 2009, 12:32 PM
Some other ready to use coins: DOWNLOAD (http://www.megaupload.com/?d=LZO41X37)

bbonzz
31st May 2009, 05:31 PM
but wait: i'll shortly upload the new images with improved side.bmp

d0ugie
31st May 2009, 07:34 PM
I really like your app. I'm the type of guy who would actually use something like this to make important decisions and Guesser is too comprehensive. :)

Well done l3v5y, you too bbonzz. Hope you two don't mind but I took the three cabs and the two coin pack zips, banged out a quick readme and put that into a single zip (the coin zips unzipped and merged into a subdir) which can be grabbed from here:

blownfuze.org/files/l3v5yCoinTossv0.2plusextrasandcoinsbybbonzz.zip (http://blownfuze.org/files/l3v5yCoinTossv0.2plusextrasandcoinsbybbonzz.zip)

That's on my faster mirror so do what you want with it. Now all you gotta do is make a crazy upgrade with a coin changing interface and cab that up to chill the Cab Please! people out.

Doug

bbonzz
31st May 2009, 08:03 PM
As promised, here is the complete coin collection with improved side.bmp. To see what i mean, see the screenshot

DOWNLOAD (http://www.megaupload.com/?d=W0UTCT99)

d0ugie: good work, but now you have to redo with these new coins :)

d0ugie
31st May 2009, 09:48 PM
d0ugie: good work, but now you have to redo with these new coins :)

Woah tough to keep up but I updated the zip with the new coins and one more time here's the link:

blownfuze.org/files/l3v5yCoinTossv0.2plusextrasandcoinsbybbonzz.zip (http://blownfuze.org/files/l3v5yCoinTossv0.2plusextrasandcoinsbybbonzz.zip)


Doug

echo-man
5th February 2010, 04:58 PM
I want to start by thanking you for great app... But, I have a minor problem with it. I can't get the "heads.bmp" to appear, if I swap names so "tails.bmp" become "heads.bmp" and vice verse, I get the head image loaded from "tales.bmp".
I tried with different coin skins, installed in phone memory and sd card, but no success.
I know that it's a while ago you made this program, but I hope you are still interested of it. I have installed "ExtendedFunctions" and "l3v5yOpenGLES". My phone is HTC HD2 wm6.5
I would appreciate if some one can help me.

lewellyn
16th May 2010, 12:34 PM
Woah tough to keep up but I updated the zip with the new coins and one more time here's the link:

[ link was here. i'm still too new to quote it :P ]

Doug

Does anyone have a mirror of this? It never made it into the first post and that link is now dead. :(