Beta release 1.9.4b

All topics about ZGameEditor goes here.

Moderator: Moderators

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

Beta release 1.9.4b

Post by VilleK »

This version is released as 1.9.4

---------------

Hi,

Here is beta version 1.9.4b (updated Nov 7)

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

NOTE: Linux and Mac runtime builds not included. You cannot use the binaries from the previous version, it won't work.

NOTE: If you use this version you should be aware that the features may not fully work and that they can be changed or even removed in a later release.

Features:

- File-component now can write to files. Try updated FpsDemo for an example. Press "1" to save player position to file, "2" to restore from file.
- RenderNet can now set vertex colors
- Fixed timing-bug with midi-import
- Removed sleep-call in screensaver runtime
- Fixed bug with user defined functions with parameters in expressions
- Fixed bug with array out of range error

Please report any problems, thanks!

Example of using vertex colors, a simple plasma effect. Copy and paste into a ZGameEditor-tree:

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Model Name="Model1">
  <OnRender>
    <RenderNet XCount="8" YCount="8" VertexColors="255">
      <RenderVertexExpression>
<![CDATA[//Update each vertex.
//Vertex : current vertex
//TexCoord : current texture coordinate
//Color : current vertex color

float t1,t2;

t1=noise3(this.vertex.x,this.vertex.y,app.time);
t2=noise3(this.vertex.x*1.2,this.vertex.y*1.3,app.time*0.5);

this.Color.R=t1*1.5;
this.Color.B=t2*1.5;]]>
      </RenderVertexExpression>
    </RenderNet>
  </OnRender>
</Model>
Last edited by VilleK on Wed Nov 19, 2008 1:43 pm, edited 4 times in total.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

woowho, file writing will be fun! I will have a look at how you have it set up in the demo,.
I just tried the vertex colors test you have here,. and it has some sort of bug,. try changing the net countX/Y and it pops errs in a loop,. "invalid pointer" at least when update time is checked in the preview! I hope it is an easy fix as I have been experimenting with Nets and finding them fun and versitile,.
I was wondering if they would be good for a dynamic trail on a moving object,. however I have not figured how to place the individual vertecies where I want,. . the idea is to save a list of previous positions in an arrray,. hummmm. I will try to figure a way to do this,. or perhaps a new component that does it automatic could be added,. just set the width, fade, and length,. . like a render beams. ;)

peace
iterationGAMES.com
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jph,

If you just want a simple trail, store the position of your model in the appending row of a Array, when you've reached the last slot, start at 0 again. Just use the index to determine the right key to use for your RenderNet ( for example ). When you're aiming for something like a cape, ribbon, hair and such .. you need some more slots to store information on individual control points.

Attached is the simplest implementation possible :)

K
Attachments
Trail.zip
(39.39 KiB) Downloaded 465 times
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Fixed problem with changing XCount and YCount on RenderNet, zip-file is updated with new version.

Another good use of arrays, Kjell! I really wasn't sure if the arrays would be useful but you've shown several cool ideas already.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

thanks kjell that looks good,.
I do have the array stuff working, it is similar to what I have used in GM,. however, I am looking for the drawing part to the trail effect,. I have not figured a way to simply draw lines/mesh between two points,. is there a GL_line we can access,. could be usefull for lots of stuff, . or a way to draw a mesh between two x,y,z points,. . I actually thought that was what render beams was, first time I tried it i was suprised. Some engins, like HL and such, have a built in effect that lets you draw an effect beam between two entities,. should be able to do so using the net,. once again the math confuses my tinny simian brain,. :( any more hints ?
Attachments
array_trail__001.zgeproj
test file w/ array trail ,. . need drawing code.
(2.96 KiB) Downloaded 469 times
iterationGAMES.com
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hey jph,

It's quite easy actually, use either MeshExpression ( in combination with RefreshContent ) or RenderNet and generate a useful iteration index per pass. For example, when you have a Array with 32 rows, you could use a RenderNet with a XCount of 31, and a calculation like "Index = round(this.Vertex.X*32+32/2);". Then it's just a matter of fetching the appropriate data .. for instance "this.Vertex.X = Array[Index,0];".

By the way, this method shouldn't work actually :P Array indices are integers, and we're using floats here. But this is one "bug" that I rather not see fixed until dynamic integer access is supported.

Hopefully this clears things up.

K
Flip
Posts: 4
Joined: Fri Oct 17, 2008 12:32 pm

Post by Flip »

File-component now can write to files
Yes! This program gets better and better faster and faster. :) Thanks for your hard work.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

not sure if it is meant to be this way, but currently I can not use an array with the FileMoveData component ?

see the attached first attempt at a "level editor" for a super simple 2d game,. . it saves nicely,. but my math to rebuild the layout is not right yet,. I am just posting it for you to see the way I am getting around the no array issue,. I simply use an intermediary variable,. but why can't we just use the array directly ?
Once we are able to address individual instances,. it will be much simpler to just iterate throught the instances and write their positons and pertinent values,. in-game editors will be a boon to the zge!
Attachments
Level_Edit_001.zgeproj
still broken but getting there,.
(4.06 KiB) Downloaded 465 times
iterationGAMES.com
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jph,

The "Property" property of FileMoveData can only refer to variables / properties :) It's no Expression field, so the content won't get compiled, it just links to the property that corresponds to the name you fill in.

The current approach is probably best though, in many other cases it's sufficient .. and when dealing with Arrays, using a intermediate variable isn't that much different from using "Array[Index] = this.Data;", which is what I guess you'd be using if it was a Expression property instead.

K
Post Reply