Beta release 3.1b

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

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

Beta release 3.1b

Postby VilleK » Fri Feb 15, 2013 12:19 pm

Time to start another beta phase.

News:

1. Renamed components
DefineVariable -> Variable
DefineConstant -> Constant
DefineArray -> Array

This makes the naming consistent with other components (i.e. Mesh, Bitmap, Sound etc.). Existing projects will open without errors but when they are saved the xml will contain the new names so they will no longer open in older versions of ZGE.

2. Arrays as parameters to functions. For example:

Code: Select all

//Add item to end of array
void addItem(int item, int[] ar) {
  ar.SizeDim1++;
  ar[ ar.SizeDim1-1 ] = item;
}

This function can be called like this:

Code: Select all

addItem(42, MyArray);

where MyArray is a Array component with type=int and dimensions=1.

3. Local arrays

A function can declare local arrays. Examples:

Code: Select all

int x[];  //Declare a one-dimensional int array
int xx[ , ];  //Declare a two-dimensional int array
int xx[ , , ];  //Declare a three-dimensional int array

x.SizeDim1=10; //Set array to hold 10 items

The arrays are automatically created on entry and freed on exit of the function.

As usual I've barely tested this so please report any errors or strange issues, thanks!

Download here:

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

User avatar
Kjell
Posts: 1648
Joined: Sat Feb 23, 2008 11:15 pm

Re: Beta release 3.1b

Postby Kjell » Fri Feb 15, 2013 12:50 pm

Yay!

VilleK wrote:Renamed components

Super-happy about this .. the old names always bothered me :)

VilleK wrote:As usual I've barely tested this so please report any errors or strange issues, thanks!

Will do!

K

User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Postby jonaspm » Sat Feb 16, 2013 6:16 am

Nice! thank you VilleK!

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

Postby VilleK » Mon Feb 18, 2013 9:46 am

Another update:

The local arrays can now have specified default size:

Code: Select all

float[4,4] m;  //A 4x4 array
string[10] lines;  //Holds 10 items


I've also added a new built-in function:

getModels(items, category)

This can be used for looping through models at runtime and do things like custom collision detection etc.

Example:

Code: Select all

//Get all model instances of category zero
model[] models;
getModels(models,0) 
//Loop through the list
for(int i=0; i<models.SizeDim1; i++) {
  model m = models[i];
  //do something
}


Jph: I see you are working on visualizer effects, let me know if you want me to rebuild the vizualizer beta with the latest ZGE beta functionality too.

Download here:

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

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

Postby jph_wacheski » Wed Feb 20, 2013 3:19 pm

Yes, JM asked for some new stuff,. I would like to get some of the great new scripting and the gl lighting features working in the visualizer as well,.

getModels() is something that makes AI, and many things I suppose, much easier,. these are all great additions by the way!

I have some little Android projects nearing release,. . ;)
iterationGAMES.com

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

Postby VilleK » Thu Feb 21, 2013 12:58 pm

ZgeViz beta is updated too with these latest beta scripting enhancements: http://www.zgameeditor.org/files/ZGameE ... r_Beta.zip
I saw the SQUCR video, looking cool :)

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

Postby jph_wacheski » Thu Feb 21, 2013 2:47 pm

Nice, however I tried this one, and it will not open in FL studio, I get a "QuickFontCache.DLL not found!" err.
iterationGAMES.com

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

Postby VilleK » Thu Feb 21, 2013 4:10 pm

jph_wacheski wrote:Nice, however I tried this one, and it will not open in FL studio, I get a "QuickFontCache.DLL not found!" err.

Ah I forgot, you need to install FL Studio 10.9 beta.

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

Postby VilleK » Tue Mar 05, 2013 10:47 am

Update:
- Added Rado1's sensor library to the library menu.
- Fixed problem with back button not working when EscapeToQuit is set (the problem was that the previous beta included an old java-file).

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

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

Postby VilleK » Mon Mar 18, 2013 9:54 am

Update:
- Android: when a external library is loaded, ZGE tries to call the "JNI_OnLoad" function if it exists. This should allow external libraries to call Java-functions.
- Android: AndroidManifest.xml is not replaced if no values (title, orientation etc) have changed when using "Android: Build APK". This is to allow making custom changes to the manifest file.
- Android: Additionally a "m.bat" file is created in project directory to simplify rebuilding the apk outside ZGE.

- Support for the GLES2/GL3 render model:
App has a new property: "GLBase".
When it is set to "Compatible" (which is default) everything should behave like before.
When it is set to "ES2/GL3" ZGE will use the new render model which conforms with GLES2 and GL3.

The main difference when using the new render model is that everything must be rendered using shaders. So every material must have a shader set before rendering anything. There is no longer any default render behavior and also many existing properties/components such as Light and and Material.SpecularColor etc. are no longer relevant.

So it is more work for the developer. However the benefits are that this allows to use GLSL shaders on Android devices (which was not possible in GLES 1.1). And after the learning curve of using shaders for everything it should allow for much more advanced and flexible visuals.

See attached minimal demo project for more info (just a spinning cube with a shader attached).

This is the first test release, I will need to add more built-in shader variables etc. and there are probably bugs in there too. Please report back any problems or suggestions, thanks!

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Attachments
GLES2Test.zgeproj
GLES2/GL3 demo project
(2.25 KiB) Downloaded 550 times

User avatar
Kjell
Posts: 1648
Joined: Sat Feb 23, 2008 11:15 pm

Postby Kjell » Mon Mar 18, 2013 1:06 pm

Hej Ville,

Great work :) Couple of initial comments:

When previewing a Model / Mesh, the matrices don't get updated .. in other words, the viewport navigation doesn't work anymore.

Even though I'm generally a fan of short ( local ) variable names, I'd recommend following the GLSL naming convention ( without the gl_ prefix ) for build-in variables. So for example, "modelViewProjectionMatrix" instead of "mvp". Keeps things familiar & consistent for GLSL users ... you wouldn't want to name "gl_ProjectionMatrix" just "p" either.

And I'd use the matrix part of the ES 2.0 pipeline for the compatibility pipeline as well. So, instead of relying on glPushMatrix / glRotate ( etc ), use the new pipeline and feed the matrices using glLoadMatrixf*

*In case you're wondering why .. this would finally enable you to do stuff like this ancient request. If you calculate and cache a models' modelMatrix locally when it gets accessed, you can use this matrix for all kinds of calculations, not just for rendering.

+ Wouldn't mind having MaterialTexture renamed to just Texture either 8)

K

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

Postby Rado1 » Mon Mar 18, 2013 2:23 pm

Ville, this is really great improvement!!! I like new features (also because I required some of them :)). Here are some initial bugs I found up to now:

1. It is not possible to open some of the .zgeproj files, even if saved with this new version of ZGE. "ZGameEditor.exe has encountered a problem and needs to close." appears. I have a suspicion that it happens when the project contains ZExternalLibrary pointing to android .so file which cannot be loaded on windows. See, for instance ZGESensor demo files.
2. Alpha is not working in ZApplication's preview when the application is stopped. By pressing Start, the preview is rendered correctly. See the attached file for example.
3. Android applications crash. See the attached project and log file. Also your GLES2Test.zgeproj crashes on ZTE Blade II.

After you fix the point 3. I'm going to test new features on Android. I'm looking forward to it.
Attachments
crashing_example.zip
example of project which crashes on Android
(6.11 KiB) Downloaded 526 times

User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Postby jonaspm » Mon Mar 18, 2013 10:12 pm

thank you VilleK for all your efforts on this software, i trust we all here love it and thanks to you we can work on something we have found cool to do: (program games)

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

Postby VilleK » Tue Mar 19, 2013 10:24 am

Fixed:
- Build Android apk works with GLES2 support (I had only tested with "Android: Run project")
- Opening zgeproj with external lib should not crash
- Alpha and zoom/rotate controls should work in designer

Kjell: Yes mvp is perhaps a bit short, will probably change it :). I just noticed that some shader developers use that name but using official names is better. And your suggestion about matrices makes sense too, I will probably do that later on.

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

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

Postby VilleK » Wed Mar 20, 2013 2:16 pm

Another small update:
- Bugfixes to the designer preview
- RenderText and RenderSprite now works in GLES2 mode

This required two new glsl-variables:

Code: Select all

uniform mat4 textureMatrix;  //Holds the current texture matrix (updated via RenderText or Material.TextureX/Y/Scale properties
uniform vec4 globalColor;  //The current color that is set using RenderSetColor or Material.Color
See example GLES2Demo.zgeproj that is now included in projects

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


Return to “Releases”

Who is online

Users browsing this forum: No registered users and 1 guest