Beta release 2.0.1b

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:

Beta release 2.0.1b

Post by VilleK »

Updates:

- New Camera component as discussed here.
- Fix for parsing switch-statements as discussed here. Previously if you made a function-call in a switch statement ("switch(f(42)) ...") then this function could be called multiple times depending on the number of case-statements. Now it will only be evaluated once per switch, just like in other languages.

Download here:

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Small update today:

- Dsound initialization changed (possible fix for this problem: viewtopic.php?p=4558#4558)
- Detect when ini-file cannot be created (such as when installing zge in a read-only folder).
- Stopped code editor completion window growing on each activation.
- Support for shader float-arrays uniform variables. There is a new property ValueArrayRef on ShaderVariable for this. Only works with arrays of float type. This allows you to send in a whole array of values to the shader without having to transfer it to a bitmap first. Note that many GPUs seem to only support arrays less than 64kb in size.
Last edited by VilleK on Mon Aug 08, 2011 7:58 pm, edited 1 time in total.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej Ville,
VilleK wrote:Support for shader float-arrays uniform variables.
Hell yes + nice work on the bug-fixes :)

Hope you had a good vacation ~

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

Post by VilleK »

Kjell wrote:Hope you had a good vacation ~
Yes thanks, hope everyone else have had a chance for some time off too. Among other things I was visiting the northern parts of Sweden where it looks like this: http://www.storasjofallet.se/Stora_Sjof ... ppland.jpg
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Some more info on how to use the glsl-arrays:

Declare the array in your glsl-source (VertexShaderSource property on Shader component), something like this:

"uniform float testArray[10];"

Then in the UniformVariables list on the Shader add a ShaderVariable component and set VariableName property to "testArray". Also set "ValueArrayRef" (will probably rename this to just ValueArray) to a DefineArray component.

If you do this correctly then the values in your DefineArray in the zge-project will automatically be available to your shader.

Note that glsl-arrays support the length() function to get the size of they array, so you can type things like:

"x=testArray[ int(time) % testArray.length() ];"

Note: You have to make sure that your DefineArray and the shader array is declared with the same length, and that the type is float.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

8)

Pro-tip: Just because GLSL doesn't support multi-dimensional arrays, doesn't mean you can't use them. For example, when you have a 2D Array with dimension sizes of 8-3, simply use "uniform float array[24]". Saves the effort of rolling your values into a 1D array on the CPU side ~

@Ville: Lush!

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

Post by jph_wacheski »

I have found a couple small issues with the latest beta,. (not sure if these are related to my move to win7?)

- ctrl + arrows to move components up and down the tree is behaving strangely,. the highlighted component will move one or two spaces then the selection will change (the arrows on the gui work fine though)

- Find and Replace in the Expression editor are not working,.
iterationGAMES.com
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

@jph

Both are Windows 7 related problems and not limited to this specific release. Good that somebody reported it though, I had already forgotten about it :P

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

Post by VilleK »

I know there has been problems with search&replace before but now when I try it is working every time. So what happens, does it not replace anything at all, and does normal search work for you (ctrl+f)?

Ctrl + arrows produce an access violation here (win 7 64 bit), so I can debug that problem.

The new Delphi XE2 is around the corner so when it is released I will see if there are any new features that can be useful for ZGE. It promises 64 bit compiler + new fancy UI component package (called FireMonkey) among other things.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

The Ctrl + arrows problem should be fixed now, at least it works here. Beta updated.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Thanks Ville,. apparently I use that Ctr-Arrow component move thing quite a lot,.

I think I was wrong about the find replace functions,. they are working. I had been trying to replace with the cursor bellow the text,. it only works in a forward from the cursor way,. (perhaps replace could get those forward/back boxes like the find function) my mistake.
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

I've moved the ZGE codebase to the brand new Delphi XE2 release. This is so that we may later take advantage of impressive new Delphi features such as 64-bit support and FireMonkey cross-platform GUI.

Beta updated now but there are no new features yet, just recompiled with minimal changes to make it work in XE2. Please try it anyway and see if anything is missing or not working. Binaries are slightly larger as usual when there is a new Delphi release but importantly a compressed empty project in ZGE is still only 27kb.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Cool,. I'll give it a test,. any chance of adding a setting to flip the interface colors to a light text on dark backgrounds look? (like those FireMonkey examples)
iterationGAMES.com
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Seems to work nicely,. or far.

One issue I notice with this ver. and the last,. (may be win7 again) if I run the game from the editor,. and then press Print Screen on my keyboard,. I end up with a buffer of the editor not the game? Just checked and if I run an .exe of a game and try I get a shot of the desktop,. Any ideas how I can get screen shots back?
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Printscreen works fine here. Maybe you can try "SnippingTool.exe" that comes with the OS instead? It lets you select an area of the screen to capture to clipboard and then you can save it various formats.

Yes, I plan to try out the new VCL skinning feature and see if we can do something with that.
Post Reply