3.0.0 beta (ZGE on Android)

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

The trick with .so file works fine. I tested it on BASS with a music file pretending to be a library.
VilleK wrote:About BASS, it can open files from memory too. So we should provide a feature in ZGE scripting so that a reference to a File components embedded content can be passed.
Do I understand it correctly? There will be a File component allowing to embed the content of a file in ZGE, similarly to Music or Bitmap?
VilleK wrote:The File API in ZGE will be available soon. I will make it so that the default path will be in the applications data folder so that the ZGE Applications won't have to worry about setting paths.
I'm looking forward to it. It would be fine if also file creation and writing is supported. Will it be possible to "wrap" some files to application, eg., level files? Or the only way would be to use the aforementioned File component with embedded content?
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Update today with some hopefully useful additions:

- Android File components implemented. They currently read/write relative to the application private DataPath which means they can be used to read/write settings files but not for included assets (yet). Note: this is not tested at all, let me know of any problems.
- Android ExtLibrary relative to LibraryPath. This means you can set the module name of an ZExternalLibrary to "./libbass.so" and ZGE will automatically prefix it with the private lib path.
- ExtLibrary BeforeInitExp property. This expressions runs before the ZExternalLibrary loads so you can set ModuleName here based on the ANDROID constant. See the OpenGL component in the library for an example:

Code: Select all

if(ANDROID)
  this.ModuleName="libGLESv1_CM.so";
- Conditional op optimize when argument is constant.
- Android logcat filtered to show ZGE output only. This means you use the "Android: Run" menu item in ZGE you only get the log from ZGE and not screenfulls of other messages.
- trace() function outputs to Android log. So you can add your own debug messages in scripting and see them in the log output.

Download:

http://www.zgameeditor.org/files/ZGameEditor_beta.zip

(Rado1: to use these updates in your custom apk build chain you need to unpack android\ZGEAndroid-debug.apk to get the latest libzgeandroid.so. And you also need to get the latest java file here.)
There will be a File component allowing to embed the content of a file in ZGE, similarly to Music or Bitmap?
There is already support for embedding a file, see File.FileEmbedded property. However there is not yet any way of passing this data to external libraries.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

I'm getting "Stack not empty on script completion" error for ZExternalLibrary.BeforeInitExp if not empty. I would like to write something like:

Code: Select all

if(ANDROID)
  this.ModuleName = "./libbass.so";
else
  this.ModuleName = "bass";
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

That works here when I try with OpenGL like this:

Code: Select all

if(ANDROID)
  this.ModuleName="libGLESv1_CM.so";
else
  this.ModuleName = "opengl32";
Note that you should not really need the "else" though if the original value of the property is for Win32.

If you get "Stack not empty on script completion" on a zgeproj that you can send to me I would like to fix it.

[edit] I think I've found the problem, hold for an update.
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Updated for the problem with BeforeInitExp: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

VilleK wrote:Updated for the problem with BeforeInitExp: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
It's working now, thanks. Do I need to update also java files?
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Rado1 wrote:It's working now, thanks. Do I need to update also java files?
No they are not changed by this fix.
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Another update to the APK: http://www.zgameeditor.org/files/ZGEAndroid-debug.apk

- WebOpen component works when IsBrowser=true. This means you can open a webbrowser from inside your apps.
- File component works with asset files (read-only). The name of the filename must begin with "/assets/". When building from Java, put an "asset" folder in the project root with your files.

Attached project demos these features + also testing read/write to settings file. No graphics, just writes result to the log.

Rado1: Check Google code for latest version of Zge.java.
Attachments
AndroidAssetTest.zgeproj
demo project for new features
(1.9 KiB) Downloaded 473 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

The development is really humming along,. nice new features added often. Unfortunately, I am in the middle of a move currently,. so I will not be able to do much for a few days. I shall return with a vengeance when I am able to. I have a couple little projects started, and loads of ideas,. mainly working on developing control setups for the touch screen, and thinking about what I want to play on such a device. I will know better when I get a nexus 7 as I am currently still borrowing that tablet to work on stuff.

I am down with making a commercial release, and doing a profit split with you,. as I really do appreciate all your efforts developing the tool/engine, and just being an all around great guy. :D
iterationGAMES.com
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Ville, with the latest libzgeandroid.so and Zge.java the application crashes on "java.lang.UnsatisfiedLinkError: Native method not found: org.zgameeditor.Zge.zglSetDataContent". Did you update the Zge.java file in code.google.com's svn to the latest version? The log is attached.
VilleK wrote:Another idea: Now when you guys have made two free ZGE Android apps on the market, how about trying to make the next ones commercial? At least for the $99 price range.
That's an interesting idea and I would like to take part in such an activity, if possible. I also have several ideas for games and several unfinished projects. However, development of a good game takes a lot of resources for creating ideas, artwork, programming, testing, PR, etc. What about to join the power of several developers from this forum, such as you Ville, Jph, Kjell, y offs et, etc. to work on a common project? Or will you rather prefer individual projects?
Attachments
log.zip
error log
(1.83 KiB) Downloaded 464 times
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Rado1, the latest Zge.java is here. If you used the other link it was probably referring to a specific revision.

In my opinion both you and Jph have shown you are both dedicated enough to make polished projects on your own. Having several ongoing smaller projects makes it more probable that at least one gets finished (instead of one major project that fails to deliver). But joining resources could work if there are clear separations of responsibilities.

We all got our own skills such as:
- Rado1, Jph: general game development and creative design
- Kjell: Math and GPU trickery wizard
- yoffset: General support and documentation
- Myself: Engine development

There are always room for additional help such as level design, testing, graphic design, music creating etc. And the ZGE project in general could really use some kind of community manager that helps with this forum, website, youtube, twitter etc + updating the ZGE online documentation that is getting behind and needs a major overhaul.

Jph: Have you tried Osmos? It is a cool game that is weird and pretty enough to could have been one of your designs ;-). It is also commercially successful from what I understand. So evidently there are room for abstract graphics games on the market.
User avatar
VilleK
Site Admin
Posts: 2281
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Update with initial attempt at automated APK-building. Note: it builds apk-files but do not yet assist with signing them, this will be fixed later.

You need Android SDK and Apache Ant installed. The folders needs to be set in ZGE settings.

There are two new menu-items: Build apk debug and Build apk release.

When you select one of them you will get the new Build Android APK settings dialog. This allows you to choose package name and app title.

Then it will call Ant to build the APK-files. If all goes well it will have generated a folder with the same name as the package name. In the bin-folder the apk-file can be found. If you have built debug apk then the run.bat file will install and run the apk file on your device.

To add additional libraries and assets, just copy these to the libs and assets sub-folders. Then rebuild the apk.

Install from here: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Attachments
buildapk.png
buildapk.png (56.29 KiB) Viewed 11271 times
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Ville, this is really great! I tested it on several projects and works fine. Here are some ideas for further improvements:

1. Add Version code and version name settings for building APK, at least for release version.

2. Either allow to specify more icons for application (ldpi, mdpi, hdpi and xhdpi) or at least create their empty predefined folders in the res folder so user can put icons there manually.

3. Somehow automate including of libraries. For instance, library files can be specified in the Build APK dialog.

4. Put all these application-specific settings directly to the ZApplication component or somewhere else in the .zgeproj file. I do not want to specify them each time I reopen the project file and generate APK. Similarly to properties of MSVC project.

5. What about to make the Apache Ant Path optional? I have it in my PATH variable, so execution 'ant debug/release' works from command line directly.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Very nice! I should have some time later today/tomorrow to set all this up and do some testing. Thanks for this update Ville!

I am into doing a team project lets start a thread to discuss it.

Yes, Osmos was one of the games we built into the Hand Eye Society arcade cabinet machine project last year,. a simple mechanic with a pleasant abstract art style, makes it approachable and quite fun. Unfortunately for the actual Nuit Blanche event the donated computer in that machine died as we where setting up the machines and we had to swap it for a laptop last minuet,. Osmos would not run on it :( [ http://handeyesociety.com/torontron/ and http://handeyesociety.com/event/the-arc ... nce-games/ ]

My situation update; moving was a huge ordeal, and getting set up again has taken longer than I would have hoped, but I think I am almost ready to get back to development. (still lots to unpack and sort, but these can wait) The net connection in this new location is wicked fast, however more bandwidth limited,. (went from; DSL 1.5Mbps 300GB cap, to; Cable 14.5Mbps 80Gb cap) everything it seems is a trade-off.
I am now out of the big city (Toronto) in a more rural area, closer to a lake. This is the tomato growing capital of Canada, (should translate well to cannabis when we legalize it) and I love what I have been able to explore of the bike trails through the farm lands, under the huge wind turbines., so many greenhouses!
Anyway, itching to get back to it, just have to set up a few more house things today and I will be back at it.
iterationGAMES.com
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post by jonaspm »

Amazing Ville! :D

i´ll test it when i finish my alpha project (which is less than alpha, LOL)
Post Reply