Beta release 3.1b

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 »

Hi Ville,

I like the latest update. I tested vec3 and vec2 datatypes and everything seem to work, except of one issue I observed up to now:

Code: Select all

// equality of two vectors
int equal(vec3 a, vec3 b){
  return a[0] == b[0] && a[1] == b[1] && a[2] == b[2];
}
This function works fine if vectors are created with vector3 function. But throws access violation exception when tried to pass vec3 values from an array (exactly from 2D array). In general, vector values from arrays cannot be passed as function parameters.

Would it be possible to implement tests ==, != on mat4, vec2, vec3, vec4 values?
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Update:
- Various bugfixes regarding mat4 and vecX types. Let me know if anything is still not working.
- Fixed bug when loading data into byte arrays
- Updated Sunvox library definition

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

setBinaryProp?

Post by StevenM »

Ville, the setBinaryProp example doesn't work for me. I'm using Pov-Ray as a render engine for zge by running a command line with a function call.

I can't figure out how to render directly to the zge window - but I'm hoping to figure out a way to import pov ray rendered images.
Attachments
loadjpeg_demo.zip
(226.85 KiB) Downloaded 492 times
setBinaryProp_error.JPG
setBinaryProp_error.JPG (17.32 KiB) Viewed 15455 times
Last edited by StevenM on Fri Apr 26, 2013 5:54 pm, edited 1 time in total.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi StevenM,

It's a bug in the Beta. Use the 3.0 release version instead.

If you want to render directly to the window you simply need to "find" the hWnd using Win32 calls, then you can do whatever you want ( OpenGL or not ).

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

Post by VilleK »

@StevenM: Beta now updated so that setBinaryProp works again.
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM »

VilleK wrote:@StevenM: Beta now updated so that setBinaryProp works again.
Awesome, Thanks Ville!
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Ville, it seems (I'm not sure) that recent fixes corrupted usage of File.FileEmbedded property. This is probably the cause for the bug reported by airpas in this post.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Rado1 wrote:Ville, it seems (I'm not sure) that recent fixes corrupted usage of File.FileEmbedded property. This is probably the cause for the bug reported by airpas in this post.
Fixed. Please download beta and try again.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Thanks Ville! The fix is working.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Experimenting some more with the scripting language.

Previously we added the script base component invocation syntax which allowed things like this:

Code: Select all

@SpawnModel(Model : TitleScreenModel); 
You could use command components in scripting without having to add them to the project tree.

Now I've taken this further to allow the syntax for values in expressions as well.

A couple of examples:

Code: Select all

//Play a sound
Sound snd;
snd = @Sound();  //Create and define a new sound
@PlaySound(Sound : snd, NoteNr : 65);  //Play it
Note that this code is completely self-contained. Previously it would have needed a Sound component in the project. It can even be more compact (and hard to read? :) ):

Code: Select all

@PlaySound( Sound : @Sound(Osc1WaveForm : 1) , NoteNr : 60);
Write to a file:

Code: Select all

//Write to file
byte[256] buf;
for(int i=0; i<buf.SizeDim1; i++)
  buf[i]=i;
File f = @File(FileName : "test.txt", Encoding : 1, TargetArray : buf);
@FileAction(File : f, Action : 1);
Or with compact syntax:

Code: Select all

@FileAction(File : @File(FileName : "test.txt", Encoding : 1, TargetArray : buf),
  Action : 1);
Read from file:

Code: Select all

//Read from file
byte[256] buf;
File f = @File(FileName : "test.txt", Encoding : 1, TargetArray : buf);
@FileAction(File : f, Action : 0);
for(int i=0; i<buf.SizeDim1; i++)
  if(i!=buf[i])
    trace("error when reading");
It gives freedom to do more in scripting with components without having to first add them to the project tree. Some prefer component and others want to do everything in scripting so this gives more choice I think.

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:?

I assume these "allocations" are local and are automatically removed when out-of-scope? Or are they persistent and meant to be executed once ( wouldn't make sense, since there's no way to store component handles )?

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

Post by VilleK »

Yes, they are automatically removed just like before with using @PlaySound() etc. The File component has always been quite tricky to use but here it can be condensed to compact and relatively simple syntax that can be quickly copy/pasted into a script. You don't have to use it ;)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej Ville,
VilleK wrote:Yes, they are automatically removed just like before with using @PlaySound() etc.
Alright. First thing to cross my mind was how to use this to create a Bitmap during run-time ( and couldn't figure out how it was supposed to work ), but i guess this feature isn't meant for those kind of things :)

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

Post by jonaspm »

HTC revealed that Android 4.3 is going to support OpenGL ES 3.0

The technology and the market are moving really fast, i didn't expect this to happen in less than a year
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Quick update:
- Android: Mipmaps supported
- 'normalMatrix' passed to shaders (but it does not seems I create it correctly, Kjell please check my committed sources)
- ModPlay sample project works again
Post Reply