3.0.0 beta (ZGE on Android)
Moderator: Moderators
One tip for "fast deploy" without USB cable: use dropbox!
If you don't have it yet, you can register at dropbox.com or using my referral <3 http://db.tt/fpKCtPJ (we both get +500MB storage)
Also I've noticed some bug after minimizing app and then maximizing back, I've recorded a small video clip to demonstrate bug and dropbox deploy
Suddenly all textures and colors get too dark ...
http://www.youtube.com/watch?v=VLHydO_DJ0w
(low performance because of the recording)
Some of the missing basic features:
-mouse/tap click ?
-gyroscope (as Rado1 and jph_wacheski suggested)
-loading text or animation, so that people know app didn't crash
If you don't have it yet, you can register at dropbox.com or using my referral <3 http://db.tt/fpKCtPJ (we both get +500MB storage)
Also I've noticed some bug after minimizing app and then maximizing back, I've recorded a small video clip to demonstrate bug and dropbox deploy
Suddenly all textures and colors get too dark ...
http://www.youtube.com/watch?v=VLHydO_DJ0w
(low performance because of the recording)
Some of the missing basic features:
-mouse/tap click ?
-gyroscope (as Rado1 and jph_wacheski suggested)
-loading text or animation, so that people know app didn't crash
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
Update:
- BitmapBlur, BitmapCombine and other filters work now provided the texture is not bigger than the display. The reason is that in GLES you cannot read back pixels from the texture so you need to render it on screen and read pixels back instead.
- Keyboard input now work in emulator
Latest version: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
I still haven't found why the startup is so slow. It should be possible to fix that, otherwise yes we need a "loading" progress bar
Freepascal for Android is very much in development so I anticipate improved performance later just by recompiling with an updated version.
Minimize/maximize: This is because the GL-context is recreated and ZGE needs to reinit all GPU resources. I will fix that later.
Gyroscope support: Definitely later, but I will first continue making it more compatible with existing stuff of the Windows version before adding platform-specific features.
Sound: Haven't started on that yet but I'm hoping the existing audio engine will work almost unmodified since it is integer based and pretty fast. I just need to add the Android specific stuff to hook it up (threading and link with audio library).
Uploading files: Just like Rado1 describes, I have Android SDK installed and use "adb push zzdc.dat /sdcard/zzdc.dat". Very simple although the Dropbox alternative looks good too.
Rado1: Just a thought, building and linking to your bullet library should be possible on Android too. Maybe consider an Android version of your game?
- BitmapBlur, BitmapCombine and other filters work now provided the texture is not bigger than the display. The reason is that in GLES you cannot read back pixels from the texture so you need to render it on screen and read pixels back instead.
- Keyboard input now work in emulator
Latest version: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
I still haven't found why the startup is so slow. It should be possible to fix that, otherwise yes we need a "loading" progress bar
Freepascal for Android is very much in development so I anticipate improved performance later just by recompiling with an updated version.
Minimize/maximize: This is because the GL-context is recreated and ZGE needs to reinit all GPU resources. I will fix that later.
Gyroscope support: Definitely later, but I will first continue making it more compatible with existing stuff of the Windows version before adding platform-specific features.
Sound: Haven't started on that yet but I'm hoping the existing audio engine will work almost unmodified since it is integer based and pretty fast. I just need to add the Android specific stuff to hook it up (threading and link with audio library).
Uploading files: Just like Rado1 describes, I have Android SDK installed and use "adb push zzdc.dat /sdcard/zzdc.dat". Very simple although the Dropbox alternative looks good too.
Rado1: Just a thought, building and linking to your bullet library should be possible on Android too. Maybe consider an Android version of your game?
Great! I tested it all - works more-or-less fine. Sometimes the computed bitmap (or its fragment) blinks in the upper left corner before the application starts. Keyboard events work fine with real and also with virtual keyboard in emulator, even if reactions are very slow.VilleK wrote:Update:
- BitmapBlur, BitmapCombine and other filters work now provided the texture is not bigger than the display. The reason is that in GLES you cannot read back pixels from the texture so you need to render it on screen and read pixels back instead.
- Keyboard input now work in emulator
I was thinking about it. It is possible to compile an application with embedded Bullet library for Android; if the whole implementation is in C++, for instance. However, I have no clue how to create something like DLL (or any type of shared library) on Android and how ZGE Android application could use it. Any idea how to deal with external libraries in android applications created by ZGE?VilleK wrote:Rado1: Just a thought, building and linking to your bullet library should be possible on Android too. Maybe consider an Android version of your game?
Using Android NDK you can compile C code to a native shared library that can be used by apps. The files are added into the APK file so ZGE productions that have custom libraries need specially built APK-files but I can help with that for serious projects. Only thing that needs to be verified is if ExternalLibrary component will work importing functions from libraries inside ZGE scripts the usual way.
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
This is indeed looking very good,. if we can get some physics on here too it will be incredible. I am happy you anticipate the sound engine working, as this will make some little music toys easy to make, as well as proper games with noises.
I notice that the editor does not remember where it saved the zzdc.dat file the previous time, well it does actually, but the window does not update to reflect this. and thanks guys the dropbox setup is working great!
Have we figured out how to use taps and such for controls? I actually like this control set-up for this simple shooter,. I will do some more work on this little test game,. There was a bitmap that generated so I tried saving it and importing it,. this seemed to give immediate loading on the tablet,. for a while then it started long loading again,. anyway attached is a farther worked version. cool thing is you can play it any orientation sideways or upside down,. in fact it is better as you can see the ship and use your finger to line up shots.
I notice that the editor does not remember where it saved the zzdc.dat file the previous time, well it does actually, but the window does not update to reflect this. and thanks guys the dropbox setup is working great!
Have we figured out how to use taps and such for controls? I actually like this control set-up for this simple shooter,. I will do some more work on this little test game,. There was a bitmap that generated so I tried saving it and importing it,. this seemed to give immediate loading on the tablet,. for a while then it started long loading again,. anyway attached is a farther worked version. cool thing is you can play it any orientation sideways or upside down,. in fact it is better as you can see the ship and use your finger to line up shots.
- Attachments
-
- duckInvaders.zip
- zzdc.dat file in a compressed folder.
- (19.75 KiB) Downloaded 1446 times
iterationGAMES.com
Good news, turned out that the long startup delays had nothing to do with initialization or procedural content. Instead it was a couple of bugs in my own code for timings that sometimes overflowed causing the frame limiter to work incorrectly waiting for arbitrary time before rendering first frame.
New release:
- Massively reduced startup times . Procedural content is no problem.
- Recompiled with hardware float support which means it requires ARM CPU with VFPv2 hardware floats but I'm guessing/hoping all Android 2.2 devices have this anyway so it won't be a problem.
Latest version: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
The faster float support is noticeable in projects with lots of ZGE scripting like in BallZ or in Particle Toy screensaver (see attached) which now runs in much better frame rates.
New release:
- Massively reduced startup times . Procedural content is no problem.
- Recompiled with hardware float support which means it requires ARM CPU with VFPv2 hardware floats but I'm guessing/hoping all Android 2.2 devices have this anyway so it won't be a problem.
Latest version: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
The faster float support is noticeable in projects with lots of ZGE scripting like in BallZ or in Particle Toy screensaver (see attached) which now runs in much better frame rates.
- Attachments
-
- zzdc.dat
- dat file for Particles
- (15.85 KiB) Downloaded 1348 times
-
- zgeandroid_particles.jpg (47.73 KiB) Viewed 30147 times
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Ok, this is getting good. see attached binary file.
added some 3d camera tilt,. and now using a bitmap for particles.
when the player is destroyed and splotions for 5 seconds or so,. then all the saucers are destroyed, and a new wave spawned,. however due to some quick building, a few too many many splotions are spawned,. the table I am testing with slows, but not in a bad way,. so curious what other devices do at that point??
just this little bit of control is cool,. so more would be better! finger up/down is needed,. also I think the OS has some nifty gesture capture sht that would be useful if we can access it,. .
added some 3d camera tilt,. and now using a bitmap for particles.
when the player is destroyed and splotions for 5 seconds or so,. then all the saucers are destroyed, and a new wave spawned,. however due to some quick building, a few too many many splotions are spawned,. the table I am testing with slows, but not in a bad way,. so curious what other devices do at that point??
just this little bit of control is cool,. so more would be better! finger up/down is needed,. also I think the OS has some nifty gesture capture sht that would be useful if we can access it,. .
- Attachments
-
- zzdc_of_SaucerInvation.zip
- i see some potential here,.
- (4.53 KiB) Downloaded 1404 times
iterationGAMES.com
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
ok, some more cleaning up and adding stuff to this,. re-posted for your testing. FPS is now lower left,. i am getting ~35 when the wave is full,. and slowly it creeps back to 60 as you clear the wave,. does not affect game play though, so seems good. I am curious what results other devices get??
I notice when I use the back button instead of the quit button, to leave the app and then return to it, the screen is all white and the objects can only be seen as masks to what should be displayed,. I can take a pic if needed.
anyway, other than that, this is working so very well now. Also, Sony just pushed Ice Cream Sandwich (4.0.3) as a standard update,. so this is what I am using now. I just went into developer settings and turned on the "show touches" overlay, and that is very neat to see,. It captures a lot and seems to have a fine res. there is a CPU monitor that is interesting too. Is it at all possible to use ZExternalLibrary to get info from the OS?
I will make this a free game if you want,. I can finish it and we can test-case it in the app store.
I notice when I use the back button instead of the quit button, to leave the app and then return to it, the screen is all white and the objects can only be seen as masks to what should be displayed,. I can take a pic if needed.
anyway, other than that, this is working so very well now. Also, Sony just pushed Ice Cream Sandwich (4.0.3) as a standard update,. so this is what I am using now. I just went into developer settings and turned on the "show touches" overlay, and that is very neat to see,. It captures a lot and seems to have a fine res. there is a CPU monitor that is interesting too. Is it at all possible to use ZExternalLibrary to get info from the OS?
I will make this a free game if you want,. I can finish it and we can test-case it in the app store.
- Attachments
-
- zzdc_of_SaucerATTK_018.zip
- zzdc.dat better still.
- (5.9 KiB) Downloaded 1412 times
iterationGAMES.com
This is great, good job jph!
On Galaxy Note i get 55 - 58 fps, and I get frame drop to 40-50 when all enemies respawn (after I die), but Note is a beast with 1.4 GHz dual core + nice GPU + I got ICS since 3 days ago which also boosts phone performance alot.
In the last version you posted few daya ago I got major fps drop (Im guessing it drops down to 15-20) when all enemies explode, so I'm guessing weaker phones wouldn't be able to handle that work...
Anyway, I'm glad everything works so nice and smooth on Android, also I think that limiting fps to 30-40 would be a good battery saver? Now we have to think about that too I know many people are raging on some games because it drains battery much faster then it should (for example Zynga poker for android is crap, it heats my phone like I'm doing some 3D rendering on it)
On Galaxy Note i get 55 - 58 fps, and I get frame drop to 40-50 when all enemies respawn (after I die), but Note is a beast with 1.4 GHz dual core + nice GPU + I got ICS since 3 days ago which also boosts phone performance alot.
In the last version you posted few daya ago I got major fps drop (Im guessing it drops down to 15-20) when all enemies explode, so I'm guessing weaker phones wouldn't be able to handle that work...
Anyway, I'm glad everything works so nice and smooth on Android, also I think that limiting fps to 30-40 would be a good battery saver? Now we have to think about that too I know many people are raging on some games because it drains battery much faster then it should (for example Zynga poker for android is crap, it heats my phone like I'm doing some 3D rendering on it)
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
Looking good Jph. I wish I could work faster on this but have so much other stuff going on, all you guys posting in this thread motivates me to find the time. I get around 55 fps initially which drops to ~30 after a few seconds. The back-button problem is because the OpenGL surface gets recreated and the same problem turshija reported earlier.
I've been trying to add sound. It turns out that for 2.2 devices realtime audio support is rather poor because you get high latency. There is better API available for 2.3 upwards but that would limit the potential audience I and don't even have a 2.3 device to test on (but will have to buy new phone soon because the touch screen has broken on my current HTC). Perhaps I can find a way to reduce latency or maybe I can runtime detect if 2.3 API is available and use better version otherwise fall back to 2.2 API.
In this version audio works but I get terrible latency, over half a second. So not for realtime music games . In case this version crashes the old version is here.
Note that I currently use full quality 44khz 16bit stereo audio, just like in desktop ZGE. Maybe that will have to be reduced on mobile devices but I did not notice any slowdown on the projects I tried so far.
I found a version of Jphs lockon2-project and the title screen runs fine together with audio and everything. Did not try to play the game because have no keyboard to my test device so could not "press space to start". But it cool that it works, Jph you could rerelease your back-catalog of games for Android. I'll help you set it up when we have come further. Market-ready APK-files will probably need a little bit of hands on from me (they need encryption etc. that can't be easily automated).
Also this version should not use as much CPU because it calls usleep-function which should improve battery consumption.
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
I've been trying to add sound. It turns out that for 2.2 devices realtime audio support is rather poor because you get high latency. There is better API available for 2.3 upwards but that would limit the potential audience I and don't even have a 2.3 device to test on (but will have to buy new phone soon because the touch screen has broken on my current HTC). Perhaps I can find a way to reduce latency or maybe I can runtime detect if 2.3 API is available and use better version otherwise fall back to 2.2 API.
In this version audio works but I get terrible latency, over half a second. So not for realtime music games . In case this version crashes the old version is here.
Note that I currently use full quality 44khz 16bit stereo audio, just like in desktop ZGE. Maybe that will have to be reduced on mobile devices but I did not notice any slowdown on the projects I tried so far.
I found a version of Jphs lockon2-project and the title screen runs fine together with audio and everything. Did not try to play the game because have no keyboard to my test device so could not "press space to start". But it cool that it works, Jph you could rerelease your back-catalog of games for Android. I'll help you set it up when we have come further. Market-ready APK-files will probably need a little bit of hands on from me (they need encryption etc. that can't be easily automated).
Also this version should not use as much CPU because it calls usleep-function which should improve battery consumption.
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
- Attachments
-
- a jph classic gets a new home
- androidlockon.jpg (17.05 KiB) Viewed 30068 times
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Very nice It works great here, (tablet running 4.0.3), I seem to get very low latency,. or none at all. I uploaded a video to youtube so you can see/hear it [ http://youtu.be/LjzE146JFwE ]. Perhaps 2.1 is just too far back? I noticed that some music apps require "Android 2.3 or higher" see; http://www.mikrosonic.com/rd3hd
Anyway, I tried a few different sound techniques that I use on PC games, and all seems to be working correctly. I think there may be one bug that I did notice; I had added; Sound5.Pan=CurrentModel.Position.x*.01; and this causes a crash on the device but not on the pc. (not hugely important I just commented it out and works fine)
The 44Khz sound seems fine,. all the sound in here (w/ two delays running) seems to have no noticeable impact on performance. I have noticed that using Alpha/One blending vs Alpha/OneMinusSourceAlpha made a noticeable difference when used on lots of particles. I will keep testing things that may improve speed,. and let you know if I notice any interesting things.
It is great to support as many of the older devices as possible, however I am mainly interested to put things on the newer tablets, (bigger screen/finer control/etc), so if device legacy support is possible then cool, but right now it is working great on tablets!
Yes, I will see how many games I can port over,. although I find the touch screen is more suited to very different games from what I would make for a PC. I do have many unfinished experiments, that can easily be adapted to gesture/tap controls, so perhaps I will do some new but simple things based off those. It is very cool to be able to create games for this hardware, and quite easy with this setup.
I will do a bit more on this, and then we can test out your process for finalizing it for the store,. perhaps you should monetize the engine at this point by taking a cut of android sales?? Could fund a new tablet for you,. anyway, once again, thanks for your efforts Ville. You roc!
Anyway, I tried a few different sound techniques that I use on PC games, and all seems to be working correctly. I think there may be one bug that I did notice; I had added; Sound5.Pan=CurrentModel.Position.x*.01; and this causes a crash on the device but not on the pc. (not hugely important I just commented it out and works fine)
The 44Khz sound seems fine,. all the sound in here (w/ two delays running) seems to have no noticeable impact on performance. I have noticed that using Alpha/One blending vs Alpha/OneMinusSourceAlpha made a noticeable difference when used on lots of particles. I will keep testing things that may improve speed,. and let you know if I notice any interesting things.
It is great to support as many of the older devices as possible, however I am mainly interested to put things on the newer tablets, (bigger screen/finer control/etc), so if device legacy support is possible then cool, but right now it is working great on tablets!
Yes, I will see how many games I can port over,. although I find the touch screen is more suited to very different games from what I would make for a PC. I do have many unfinished experiments, that can easily be adapted to gesture/tap controls, so perhaps I will do some new but simple things based off those. It is very cool to be able to create games for this hardware, and quite easy with this setup.
I will do a bit more on this, and then we can test out your process for finalizing it for the store,. perhaps you should monetize the engine at this point by taking a cut of android sales?? Could fund a new tablet for you,. anyway, once again, thanks for your efforts Ville. You roc!
- Attachments
-
- zzdc_of SaucerInvasion_021.zip
- latest and greatest. now with sounds!
- (6.88 KiB) Downloaded 1423 times
-
- saucerInvasion_021.zip
- and an .exe to compare,.
- (45.85 KiB) Downloaded 1456 times
iterationGAMES.com
http://opensignalmaps.com/reports/fragmentation.php?
Interesting page explaining Android's biggest problem - fragmentation!
You can see chart from April 2012 where you can see that there are roughly around 20.5% Android 2.2 users, 6.6% Android 2.1 which is still a lot, and you can't really cut off older android support (below 2.3) since even though some of the phones are great, they don't get any official updates because of manufacturers (my old HTC Desire is still a great phone with 1GHz CPU, but still on 2.2 Android) or phone carriers (which don't want to allow new ROMs to be pushed "over the air" as an update before adding their bloatware, and then official update sometimes has few months delay) ...
Interesting page explaining Android's biggest problem - fragmentation!
You can see chart from April 2012 where you can see that there are roughly around 20.5% Android 2.2 users, 6.6% Android 2.1 which is still a lot, and you can't really cut off older android support (below 2.3) since even though some of the phones are great, they don't get any official updates because of manufacturers (my old HTC Desire is still a great phone with 1GHz CPU, but still on 2.2 Android) or phone carriers (which don't want to allow new ROMs to be pushed "over the air" as an update before adding their bloatware, and then official update sometimes has few months delay) ...
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
Very nice that the latency is not very noticeable on your device. Probably a combination of better hardware and Android 4.
I noticed that the Android code is more vulnerable to floating point errors so the problem with assigning Pan can probably be fixed if you force the range to be between 0 and 1. Maybe something like "Sound5.Pan=clamp(abs(CurrentModel.Position.x)*.01,0,1)" will do the trick.
turshija: Interesting link, yes seems like the 2.2 user base is very large so it would be best to keep those as potential users for ZGE games. And annoying that Android OS version is rarely updated for existing phones. Not a single update to my older HTC.
Two important updates:
- Fixed the problem of updating GPU resources when the OpenGL surface is recreating. So you can now return to the app and the graphics will be intact.
- Added detection of tap on screen. This is handled like a mouse click so you can use KeyPress component with "{" in Keys property to detect this. Now Triple-E project works because I can finally click the start button
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
I noticed that the Android code is more vulnerable to floating point errors so the problem with assigning Pan can probably be fixed if you force the range to be between 0 and 1. Maybe something like "Sound5.Pan=clamp(abs(CurrentModel.Position.x)*.01,0,1)" will do the trick.
turshija: Interesting link, yes seems like the 2.2 user base is very large so it would be best to keep those as potential users for ZGE games. And annoying that Android OS version is rarely updated for existing phones. Not a single update to my older HTC.
Two important updates:
- Fixed the problem of updating GPU resources when the OpenGL surface is recreating. So you can now return to the app and the graphics will be intact.
- Added detection of tap on screen. This is handled like a mouse click so you can use KeyPress component with "{" in Keys property to detect this. Now Triple-E project works because I can finally click the start button
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
yup that graphic glitch is gone here too, nice. Keeps getting better, tap is cool, however sorta uneven for me,. sometimes it triggers and some times not, not sure the metric used to call a tap,. problem is probably just my fingers sliding around too much, workable though. (i have that problem with all the tablets software too)
Would it be good to also have a touch true/false (or up/down) type info,. then we can do slide-direction and such, from a little buffer. Anyway, not sure how much control you plan to add,. seems to be a lot available here; http://developer.android.com/reference/ ... sture.html
I thought that about the pan, I'll give that clamp a try. Attached are a couple little tests,. I will do some simpler games for the older hardware too,. that should be fun also.
Would it be good to also have a touch true/false (or up/down) type info,. then we can do slide-direction and such, from a little buffer. Anyway, not sure how much control you plan to add,. seems to be a lot available here; http://developer.android.com/reference/ ... sture.html
I thought that about the pan, I'll give that clamp a try. Attached are a couple little tests,. I will do some simpler games for the older hardware too,. that should be fun also.
- Attachments
-
- tapDrag.zip
- a render and a tap test,.
- (2.88 KiB) Downloaded 1332 times
iterationGAMES.com
Two days ago I finally obtained my first Android device - Orange San Francisco II. Nothing special, but it's much better than emulator. I tried several experiments which resulted in my first, simple Android game called Eater.
Here are my ideas for further improvements:
- Tapping on screen (KeyPress with "{" in Keys) is very unreliable. Usually, I must tap many times to really catch the event. Makes me angry when I need to test my application quickly.
- Usage of BitmapExpression produces defects; several times I observed :strange patterns" in different bitmaps. This problem is probably related to the defects of floating point arithmetic.
- Unpleasant inference of sounds and application delay appear if the Music component is used. My suspicion is that Android devices (at least mine) cannot play more than one sound at once; maybe cannot play more than one sound in one channel. For this reason I created my own "music machine" based on data placed in arrays. In Eater I use a simplified version which can play just one sound at the time.
Here are my ideas for further improvements:
- Tapping on screen (KeyPress with "{" in Keys) is very unreliable. Usually, I must tap many times to really catch the event. Makes me angry when I need to test my application quickly.
- Usage of BitmapExpression produces defects; several times I observed :strange patterns" in different bitmaps. This problem is probably related to the defects of floating point arithmetic.
- Unpleasant inference of sounds and application delay appear if the Music component is used. My suspicion is that Android devices (at least mine) cannot play more than one sound at once; maybe cannot play more than one sound in one channel. For this reason I created my own "music machine" based on data placed in arrays. In Eater I use a simplified version which can play just one sound at the time.
- Attachments
-
- screenshot of Eater v0.1
- scr.png (156.45 KiB) Viewed 29916 times
-
- zzdc_of_Eater_01.zip
- zzdc of Eater v0.1
- (19.71 KiB) Downloaded 1415 times