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 »

In (some of) my recent projects I observed that running applications in ZGE Preview gives better FPS than running its compiled version (usually in fullscreen). Is there some particular reason for this? E.g. something related to multithreading...(?)
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Hi Radovan,

There shouldn't be much difference. In any case it should be faster in compiled applications. How much does it differ in your case? I don't think threading is involved because that only is used with BitmapExpression, MeshExpression and Thread components.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

VilleK wrote:There shouldn't be much difference. In any case it should be faster in compiled applications. How much does it differ in your case?
The difference is not huge, for instance, ZgeBullet demo gives 65 fps in ZGE and 59 fps in exe. But this difference surprised me anyway...
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

That sounds like in your exe the framerate style is set to use the monitors refresh rate (60). And in the designer tool it just tries to update as often as possible.

If you want to see the real max frame rate of your project you can try setting it to Free. Most apps should run with fps of several hundred on a modern PC.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

That's it! Now I have about 600-700 fps. Thanks!
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

BitmapZoomRotate glitches

Post by rrTea »

When using the BitmapRotateZoom component, weird things happen. For example a bitmap can be rendered correctly in the Preview window but glitches once launched. Other effects include rendering of the bitmap outside of the mesh, failing to cover the entire mesh etc. I'm attaching a screenshot of one such case.

Here is the code that shows it:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0.1412 0.5765 0.651 1" FrameRateStyle="2" FixedFrameRate="60" NoSound="1" FileVersion="2">
  <OnRender>
    <UseMaterial Material="mat_interfaceArrow"/>
    <RenderSprite/>
  </OnRender>
  <Content>
    <Bitmap Name="bmp_Arrow" Width="16" Height="16">
      <Producers>
        <BitmapRect Color="1 1 1 1" Size="-1 -1 0.5 0.5"/>
        <BitmapRect Color="0 0 0 1" Size="-1 -1 0 0"/>
        <BitmapZoomRotate Rotation="-0.625"/>
        <BitmapRect Color="0 0 0 1" Size="-1 -1 -0.7 1"/>
        <BitmapExpression>
          <Expression>
<![CDATA[//X,Y : current coordinate (0..1)
//Pixel : current color (rgb)
//Sample expression: Pixel.R=abs(sin(X*16));

Pixel.A = (Pixel.R+Pixel.G+Pixel.B)/3f;]]>
          </Expression>
        </BitmapExpression>
      </Producers>
    </Bitmap>
    <Material Name="mat_interfaceArrow" Shading="1" Blend="3">
      <Textures>
        <MaterialTexture Texture="bmp_Arrow" TextureWrapMode="2" TexCoords="1"/>
      </Textures>
    </Material>
  </Content>
</ZApplication>
Attachments
In the launched version there's an addition of white color on the left side.
In the launched version there's an addition of white color on the left side.
012.jpg (52.75 KiB) Viewed 25689 times
Last edited by rrTea on Mon Jul 13, 2015 11:13 pm, edited 1 time in total.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

BitmapRectangle sometimes just fails to load correctly and even renders a gradient instead of pure color.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

ZoomRotate and Rect was two of the very first components I implemented for ZGE, back in 2006. So it is probably time to rewrite them to make them work better :). Having vacation now, but will fix it when I'm back.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

In one of the states of my project, the OnStart contains a SpawnModel component. Whenever I try to move this component up or down, I get a

ZArrayList bad index

error and can't move it. I don't see anything special about it:

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<SpawnModel Model="mod_StarNight"/>
oh and ... Have a nice vacation :)
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

BitmapPixels behaves unexpectedly when the texture is small, for example if it is 16*16, I'd expect that BitmapPixels / NOPoints set to 256 would make it mostly filled, but it stays rather empty. Same with 32*32...

Edit: A workaround is to use BitmapExpression: http://pastebin.com/ATDDKRN8
but still, it should work with BitmapPixels too...
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

BitmapRect also doesn't respect the Alpha value of the color, so if I just want to have a simple bitmap with a rectangular opening or slightly transparent part in the middle this can't be done with BitmapRectangle.
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

Sometimes a component just refuses to update its automatically generated name addition in the Project Tree. For example note that his Animator works on "matTex_Glitter.TextureY", but in the Project Tree it claims it works on something else.

Once something like this happens, no matter how many times I change the target variable, it never gets updated. The only way to solve it is a restart or save+reload the project.

Admittedly nothing too horrible but it's likely to cause unnecessary confusion when working...

Edit:
File component also has the same problem, after importing a new file the Project tree entry doesn't get updated with new data.
Attachments
01.png
01.png (23.19 KiB) Viewed 25512 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Beta release 3.1b

Post by VilleK »

Small update:
- Added info to DefineCollision treenode as suggested here: viewtopic.php?f=6&t=1213
- Fix for problem with moving a treenode to the last position in a branch of the project tree, reported here: viewtopic.php?p=7759#p7759

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 3.1b

Post by Imerion »

Thanks for the latest fixes! Will try the fullscreen-switch soon as well!

Just noticed a small thing I thought I'd mention. When loading my current project into the latest beta all bitmaps set to 64 pixels wide or high got turned into 16 pixels. Not a big problem, I just switched them back. But perhaps it could be a problem.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Beta release 3.1b

Post by VilleK »

Imerion wrote:When loading my current project into the latest beta all bitmaps set to 64 pixels wide or high got turned into 16 pixels. Not a big problem, I just switched them back.
That was something Kjell noticed as well, it should have been fixed.
In your zgeproj-files, the line with "<ZApplication" in it (second line) should have "FileVersion="2"" in it, otherwise something still is wrong.
Post Reply