3.0.0 beta (ZGE on Android)
Moderator: Moderators
3.0.0 beta (ZGE on Android)
I'm experimenting on porting the ZGE engine to Android OS. Recent advances in FreePascal has made this possible and other Pascal based engines such as ZenGL has successfully been ported, I learned a lot from studying the sources of that project.
I'm targeting OpenGL ES 1.0 at the moment which means shaders cannot be used but since it is similar to the GL fixed pipeline that ZGE uses it makes it easiest to port.
Here are some blurry images of the current state of the engine running on a Samsung Galaxy S Android 2.2 device:
ZPong: running smooth and mouse movement is simulated using gestures. Problem with the texture on the ball because automatic generated texture coordinates are not supported on GLES.
FpsDemo: smooth frame rate. The colors are not correct.
BallZ by Rado1: I removed the BitmapBlur components because I haven't made it compatible yet (in GL ES it is not possible to get the bytes of an already uploaded texture, a feature which several bitmap components is relying on) but looks nice apart from small artifacts possibly from reduced precision in depth buffer. Also frame rate is quite low, 15 or so.
CleanseCube: Particle engine is not correctly ported yet, frame rate is 50 until particles appear.
Other issues:
- No audio yet
- No built-in font support
- Noticeable startup times of some projects (~10 seconds), probably from generating textures from expressions that is instant on PC but slow on mobile platform
Let me know if you want to try this yourself and I can upload a binary and some instructions on how to use it.
I'm targeting OpenGL ES 1.0 at the moment which means shaders cannot be used but since it is similar to the GL fixed pipeline that ZGE uses it makes it easiest to port.
Here are some blurry images of the current state of the engine running on a Samsung Galaxy S Android 2.2 device:
ZPong: running smooth and mouse movement is simulated using gestures. Problem with the texture on the ball because automatic generated texture coordinates are not supported on GLES.
FpsDemo: smooth frame rate. The colors are not correct.
BallZ by Rado1: I removed the BitmapBlur components because I haven't made it compatible yet (in GL ES it is not possible to get the bytes of an already uploaded texture, a feature which several bitmap components is relying on) but looks nice apart from small artifacts possibly from reduced precision in depth buffer. Also frame rate is quite low, 15 or so.
CleanseCube: Particle engine is not correctly ported yet, frame rate is 50 until particles appear.
Other issues:
- No audio yet
- No built-in font support
- Noticeable startup times of some projects (~10 seconds), probably from generating textures from expressions that is instant on PC but slow on mobile platform
Let me know if you want to try this yourself and I can upload a binary and some instructions on how to use it.
Last edited by VilleK on Mon Feb 11, 2013 10:21 am, edited 2 times in total.
Here are instructions how to test the work-in-progress build of ZGE for Android:
Download and install this app on your Android (2.2 or higher) device: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
If you haven't installed an non-market apk file before you need to Google for instructions.
The app looks for an data file on root folder on the sd-card (/sdcard/zzdc.dat). Download this file and save it to the sd-card. When you run this app it should look something like this. It is a little invaders game by Jph Wacheski.
To run your own ZGE-projects you need the new ZGE-beta. It features a new menu option, File - Save binary as. Use this to create zzdc.dat files and transfer them to your device. Start with a project that is known to work such as ZPong that is included in the download under projects folder.
Note: sometimes the app starts instantly and sometimes it takes 10-30 seconds, I haven't figured out why. Also you sometimes need to close it properly (using task manager or task killer) between using different zzdc.dat files.
Let me know how it works, or not works
Download and install this app on your Android (2.2 or higher) device: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
If you haven't installed an non-market apk file before you need to Google for instructions.
The app looks for an data file on root folder on the sd-card (/sdcard/zzdc.dat). Download this file and save it to the sd-card. When you run this app it should look something like this. It is a little invaders game by Jph Wacheski.
To run your own ZGE-projects you need the new ZGE-beta. It features a new menu option, File - Save binary as. Use this to create zzdc.dat files and transfer them to your device. Start with a project that is known to work such as ZPong that is included in the download under projects folder.
Note: sometimes the app starts instantly and sometimes it takes 10-30 seconds, I haven't figured out why. Also you sometimes need to close it properly (using task manager or task killer) between using different zzdc.dat files.
Let me know how it works, or not works
Whoa, as soon as I saw a tweet with "Android" and "ZGE" in same sentence, I immediately rushed to see whats going on !
Hey guys, long time, no see
Sorry for being offline for a long time, but I switched to web development and couldn't find time for game development since I'm bad at making things look pretty, only good at making thinks work
Looking forward to new android improvements, maybe single APK packaging instead of apk + dat, and one day maybe TCP or UDP connections will make ZGE something many people will use
Will look at this a little bit closer tonight
Hey guys, long time, no see
Sorry for being offline for a long time, but I switched to web development and couldn't find time for game development since I'm bad at making things look pretty, only good at making thinks work
Looking forward to new android improvements, maybe single APK packaging instead of apk + dat, and one day maybe TCP or UDP connections will make ZGE something many people will use
Will look at this a little bit closer tonight
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
Ville,
supporting Android is really cool and one of the musts for further dissemination of ZGE.
For those of you who do not have android device, you can emulate it:
1. Download and unzip Android SDK (http://developer.android.com/sdk).
2. Run SDK Manager and install one of the SDK Platform, eg., the latest Android 4.0.3.
3. Run AVD Manager and create a new AVD (I tried both Android 4.0.3 and Google APIs Level 15 with SD size 512MB).
4. Start the created AVD ... and wait for long time, wait, wait,...
5. After the intro page appears, run the adb command from the platform-tools directory:
6. Go to the emulator, find ZGE Android application, and run.
This is very simple - I was able to create my first application in 10 minutes from downloading SDK Platform. The only problem I found is that this emulator is very slow on my machine.
One comment: apk + dat is maybe more convenient for debugging and testing (copying a dat file is much faster than installing a new application each time - this is valid at least for the emulator). One apk should be the case of real deployment of final applications to users.
supporting Android is really cool and one of the musts for further dissemination of ZGE.
For those of you who do not have android device, you can emulate it:
1. Download and unzip Android SDK (http://developer.android.com/sdk).
2. Run SDK Manager and install one of the SDK Platform, eg., the latest Android 4.0.3.
3. Run AVD Manager and create a new AVD (I tried both Android 4.0.3 and Google APIs Level 15 with SD size 512MB).
4. Start the created AVD ... and wait for long time, wait, wait,...
5. After the intro page appears, run the adb command from the platform-tools directory:
Code: Select all
adb install ZGEAndroid-debug.apk
adb push zzdc.dat /sdcard/zzdc.dat
This is very simple - I was able to create my first application in 10 minutes from downloading SDK Platform. The only problem I found is that this emulator is very slow on my machine.
One comment: apk + dat is maybe more convenient for debugging and testing (copying a dat file is much faster than installing a new application each time - this is valid at least for the emulator). One apk should be the case of real deployment of final applications to users.
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
looks very cool, however the only android device I have access to is a Sony S tablet, and this has only an internal storage. (there is an SD slot but it only works for file transfers currently)
Perhaps if the data is integrated into the .apk it would work on devices with differing storage setups,. or perhaps the installed app can open a file select to choose the data file to use. (like Love does on the CAANOO) this would be great for debugging but the integrated solution will be better for distribution.
Anyway, I will try a bit more latter, perhaps I can find some workaround, but we are having the first sunny day in a while here, and I need to get out on the bike trail., more in a bit.
Perhaps if the data is integrated into the .apk it would work on devices with differing storage setups,. or perhaps the installed app can open a file select to choose the data file to use. (like Love does on the CAANOO) this would be great for debugging but the integrated solution will be better for distribution.
Anyway, I will try a bit more latter, perhaps I can find some workaround, but we are having the first sunny day in a while here, and I need to get out on the bike trail., more in a bit.
iterationGAMES.com
Jph: I thought all Android devices used sd-cards for user created files. Where does it store data then, like pictures taken with the camera?
Anyway, this was just to get something going quickly, definitely later we could add something like a file selector and also some kind of packager to help make a apk for each app.
Rado1: Good work getting the emulator going, I used that at first too but the real device is much quicker to user. RenderBeams is one of the components that needs to be adjusted just like Kjell commented.
turshija: Hi
Anyway, this was just to get something going quickly, definitely later we could add something like a file selector and also some kind of packager to help make a apk for each app.
Rado1: Good work getting the emulator going, I used that at first too but the real device is much quicker to user. RenderBeams is one of the components that needs to be adjusted just like Kjell commented.
turshija: Hi
My Galaxy Note has two storages (internal 16GB and external SD card), and ZGE loaded .dat file from internal by defaultVilleK wrote:Jph: I thought all Android devices used sd-cards for user created files. Where does it store data then, like pictures taken with the camera?
Usually tablets have large internal storage (integrated SD) which they use like normal external SD, but they have additional folder inside internal storage which external storage mount ...
For example:
my internal storage is mounted in /mnt/sdcard/
and internal storage: /mnt/sdcard/external_sd/
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Small update:
- getExternalStorageDirectory() is used to get the path to zzdc.dat. This should work on all Android devices, SD-card or not.
- RenderBeams now works
- RenderParticles now renders correctly
- minor bug fixes
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
- getExternalStorageDirectory() is used to get the path to zzdc.dat. This should work on all Android devices, SD-card or not.
- RenderBeams now works
- RenderParticles now renders correctly
- minor bug fixes
http://www.zgameeditor.org/files/ZGEAndroid-debug.apk
Bug: among other already mentioned things, I also observed that BitmapCombine component is not working.
Question: is the KeyPress component working now? It is not on Android emulator. In general, it would be possible to open a virtual keyboard and to catch events from it in ZGE Android application. Also catching events from built-in device's keys would be nice.
Feature request: having an access to sensors (eg., gravity sensor) would be great; for instance, providing a simple interface to the android.hardware.Sensor.getOrientation() method can be a good starting point.
Question: is the KeyPress component working now? It is not on Android emulator. In general, it would be possible to open a virtual keyboard and to catch events from it in ZGE Android application. Also catching events from built-in device's keys would be nice.
Feature request: having an access to sensors (eg., gravity sensor) would be great; for instance, providing a simple interface to the android.hardware.Sensor.getOrientation() method can be a good starting point.
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Rado1 - perhaps if the hand devices are so slow at generating bitmaps,. it is better to just include these as final bitmap data anyway. save them on pc and re-import them into the project,. just a thought.
Thanks Ville, that new ver. works great on the Sony S. I just dropped the .dat file on the root of the internal storage. it told me I was over-installing when I updated the .apk as well.
It would be nice, if I could push updates to the zzdc.dat file form the pc for quick testing,. I will look for a way to do that,. .
I will set up the new beta and start working on some demos/test,. like Rado1 said the input implementations are paramount,. gyro sensor would be great for that invaders game, to make it more handheldy.
What do you have in mind for sound? Will we be able to have the same sound system, or something more simple?
Thanks Ville, that new ver. works great on the Sony S. I just dropped the .dat file on the root of the internal storage. it told me I was over-installing when I updated the .apk as well.
It would be nice, if I could push updates to the zzdc.dat file form the pc for quick testing,. I will look for a way to do that,. .
I will set up the new beta and start working on some demos/test,. like Rado1 said the input implementations are paramount,. gyro sensor would be great for that invaders game, to make it more handheldy.
What do you have in mind for sound? Will we be able to have the same sound system, or something more simple?
iterationGAMES.com