3.0.0 beta (ZGE on Android)

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

Post Reply
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

3.0.0 beta (ZGE on Android)

Post by VilleK »

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.
Image

FpsDemo: smooth frame rate. The colors are not correct.
Image

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.
Image

CleanseCube: Particle engine is not correctly ported yet, frame rate is 50 until particles appear.
Image

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.
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

I've been waiting for some reason to jump on the Android bus. This is compelling.
"great expectations"
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

Post by airpas »

this is definitely one of the best ZGE news , but could you show some videos
we'd like to see it in action :D

keep up the good work
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

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 :)
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

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 :D

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.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

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:

Code: Select all

adb install ZGEAndroid-debug.apk
adb push zzdc.dat /sdcard/zzdc.dat
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.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Hi Ville,

are RenderBeams working on your device? I do not see them in the Android emulator.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi Rado,

The RenderBeams component doesn't work on Android ( at the moment ) since it ( still ) uses immediate mode OpenGL calls.

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

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.
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

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 :)
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

VilleK 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?
My Galaxy Note has two storages (internal 16GB and external SD card), and ZGE loaded .dat file from internal by default :)
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.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

yeah, I have to borrow that table to use it, so I have not gotten very deep into it,. yet. I was just looking with the sony file transfer app,. that has limited info. I will try again tomorrow.
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

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
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

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.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

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?
iterationGAMES.com
Post Reply