Beta release 4.0b

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

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

Beta release 4.0b

Post by VilleK »

The 3.1b thread was created so long ago now that I decided it was time to start a new thread: 4.0b!

Update:

- Property editors (scripts, shaders and float sliders) can be detached. This means you can have multiple script editors opened at the same time. Finally you can have the ZLibrary source visible at the same time you edit a ZExpression. Just hit the "Detach" button to detach an editor.
- Shaders are now compiled when you hit "Compile" button. Previously they were just saved and you would not get any error message until you went to preview. This improves shader development productivity.
- Fixed problem with globally declared variables of component types (reported by Rado1). Now you can declare the component reference types (Bitmap, Sound, Material etc) as globals (in ZLibrary) and they can be uses as you expect. Also arrays like Bitmap[] are allowed.

See screenshot below where I edit fragment and vertex shader at the same time, while also having a float slider for the App.CameraPosition property, all while the preview is running.

Please test and let me know what you think.

Download here: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Attachments
detached property editors in action
detached property editors in action
zge4b.png (240.06 KiB) Viewed 33818 times
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

Hi Ville, nice improvements. Do not you think about snapping detached editors to a border of screen and maybe also some (grid) snapping of detached windows to each other?
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

The current content assistant (Ctrl+Space) offers incorrect properties for variables of type Bitmap, Sound, Material etc. The offered properties belong to Variable component, not to Bitmap, Sound, Material etc. Try e.g. "Bitmap bmp;" in ZLibrary and then Ctrl+Space on "bmp." in ZExpression. However, if you use correct properties, "bmp.Width = 30;", everything works fine in expressions.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

The preview of certain meshes is broken. It works well for the most part but sometimes the meshes are completely distorted or missing parts. For example this (the forum doesn't allow me to post code here):

http://hastebin.com/uvopihisoy.xml

...renders as one cyan and one white mesh (there should be two of each) (the white mesh is also misplaced downwards on Y). This for example renders as 2 triangles (once the preview shows it looks empty, so rotate the mesh preview camera to see it), it should look like a 3d tip of an arrow:

http://hastebin.com/etusuhuxif.xml

Ingame they all render correctly.
Last edited by rrTea on Thu Jan 28, 2016 3:37 am, edited 1 time in total.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

Except for the main "Windows" theme, all other themes use an old-style requester (from previous Windows) when opening files that also happen to have some broken parts, for example the button for switching between various file display modes is broken (the menu is shown in garbled characters). (It should look like this: http://i.imgur.com/bXvC6Mm.jpg)
Attachments
The tooltips are also broken, didn't manage to catch it on screenshot. (Using "Light" theme.)
The tooltips are also broken, didn't manage to catch it on screenshot. (Using "Light" theme.)
剪贴板图片 (5).png (15.2 KiB) Viewed 33737 times
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

[quote="rrTea"]...renders as one cyan and one white mesh (there should be two of each) (the white mesh is also misplaced downwards on Y).[/quote]
The 1st example is rendered correctly. There are actually four rectangles, but they overlap. Just switch to the wireframe mode.

However, the 2nd example shows that MeshTransfor.Rotate works incorrectly - this is a bug of ZGE.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

So, also MeshTransform.Position is incorrect. Ville, could you please have a look at the implementation of MeshTransform?
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Beta release 4.0b

Post by VilleK »

The meshtransform problem is fixed now, please download again.

About styles, I attached carbon-style as a zip. This is the latest version from Embarcadero. Please check if it makes a difference.
Attachments
Carbon.zip
(53.02 KiB) Downloaded 590 times
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

I assume I should just copy it to the ZGE's "Styles" directory? In that case, ZGE refuses to start... Windows style works as always so I'll stick with that. Anyway, I tested both meshes from the previous post and they both render correctly in the preview now. I'll try the BitmapZoomRotate + BitmapRect tomorrow.
Attachments
剪贴板图片 (8).jpg
剪贴板图片 (8).jpg (6.1 KiB) Viewed 33686 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Beta release 4.0b

Post by VilleK »

I just realized that File cannot read directly into a string array, so I added support for that. Now you can write code like this:

Code: Select all

string[] lines;  //Declare array

@FileAction( File : @File(FileName : "test.txt", TargetArray:lines) );  //Read from text file into array

for(int i=0; i<lines.SizeDim1-1; i++) //And just print out the lines
  trace(lines[i]);
Update here: http://www.zgameeditor.org/files/ZGameEditor_beta.zip

@rrTea: I attached another style in case there is something special with Carbon. Please try it.
Attachments
Glossy.zip
(62.85 KiB) Downloaded 590 times
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 4.0b

Post by Imerion »

Cool! Congrats on a new numbered release! :)

I will help test once I continue working on my ZGE projects.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

A small improvement: if a Code editor is active and you create a new project (e.g. by Ctrl+N), the Code editor is still opened. Then, any change and "Compile" button press leads to access violation error. Similarly, when editing an uncompiled expression and a new project is created, access violation occurs. Creating a new project should make the Code editor disappear.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

There's something wrong with the Music component: trying to "Play Music" sounds as if a few ten melodies have been triggered in the same moment, I'm attaching a video where it can be heard. Here is also the sound component I used for the video:

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Sound Length="0.2" Osc1Waveform="3" UseOsc2="1" Osc2Waveform="1" Osc2Volume="0.17" HardSync="1" UseFilter="1" FilterCutoff="0.7692" FilterQ="0.6094" Mod0Active="1" Mod0Destination="11" Mod0Amount="1" Mod1Active="1" Mod1Amount="0.48" Mod2Active="1" Mod2Source="1" Mod2Destination="3" Mod2Amount="0.41" Mod3Active="1" Mod3Source="2" Mod3Destination="2" Mod3Amount="0.49" Env0Active="1" Env0DecayTime="1.86" Env0ReleaseTime="4.04" Env1Active="1" Env1AttackTime="0.22" Env1ReleaseTime="0.48" Lfo0Active="1" Lfo0Style="2" Lfo0Speed="0.05" PatternString="a skf s"/>

(Sorry I didn't format it as "Code" but I can't turn BBCode on for this thread, looks like a forum a bug?)

Another problem is that any changes in the "Sound / Editor: Sound tab / Pattern Sequence" are completely ignored, the only way to change it somewhat directly is to type the text somewhere else first (Notepad for example) and copy it from there (Ctrl + V).
Attachments
Capture-122.avi
(949.6 KiB) Downloaded 633 times
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

Various text fields can fail to show updates (can be pretty confusing - I thought I just somehow erased everything I just typed in). For example:
1. Add a new ZExpression to the Project Tree.
2. Add some content to it, like "//Hi!" or whatever.
3. Hit "Alt + o" or click "Compile".
4. Now click on the "Properties / Expression" field (the one under Name, Comment...).
5. The whole ZExpression will be shown as empty (but it actually contains "//Hi!"... maybe).

In the attached video I show the glitch in action with an AnimatorSimple.
Attachments
Capture-099.avi
The changes are actually registered... but it's confusing because it looks like they aren't.
(779.35 KiB) Downloaded 657 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Beta release 4.0b

Post by VilleK »

Hi,

Can you post a midi-file that demonstrates the problem? I just tried here and it sounds like it should.

About the propertyvalues not updating, that seems to be a side-effect of the new detachable property editors. Though the problem is only cosmetic.

Sequence field editing seems to be blocked because the asdf.. keys are used to trigger notes. Should be fixed.
Post Reply