Beta release 1.9.9b

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:

Post by VilleK »

Beta updated today.

- TexCoord on MeshExpression to create/modify texture coordinates.
- New WebOpen-component to access web-pages. See included project YakYakReader for an example.

I also modified the fbo-examples to use 512x512 size rendertargets instead to make them ati-compatible.

Since there is no string support in ZGE-expressions the web-component use arrays (DefineArray-component) to get url-string and receive html-result. The RenderText-component has a new TextArray-property so that the contents of a array can be displayed.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:)

Fantastic ~ This adds a whole new dimension to ZGE. Online highscores, level sharing, turn-based multiplayer, browser-style mmo's here we go :wink:

+ Due to the TextArray property you can now hack in proportional fonts relatively easily ( get ASCII from Array using CharI and use in lookup-table ).

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

Post by jph_wacheski »

So to post some data we would just use this OpenWeb component and the data to be sent would be in the url in some form of post link using the peramArray? Know any links that explain a way to set something like that up (sql?) or the other formats that can be used?

A highscore table is the first obvious use for this,. but yeah turn based games or user submited levels etc. could be fun,. . nice one.
iterationGAMES.com
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Just a note

When you define private variables with the DefineVariable component in Model.Definitions, for example, the variable shows up globally in the code completion. Don't know if you can actually use the variable, but it's a noob tripper.
:?
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

@ y_offs_et

This is something I had some trouble with in the beginning as well, but it is behaving as it should. There are two rules at play here.

- All Components are always global and can be accessed from anywhere.
- Components in a Model's Definitions are local to each Clone of that Model.

So for example when spawning a bunch of Models, you can set each of their individual energy ( a DefineVariable in the Model's Definitions ) just before spawning, and as soon as a Clone is spawned its energy will start with that value but behave independently from thereon.

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

Post by jph_wacheski »

The one thing that I find most bothersome with the local Variables decleared in the Definitions, is that the editor will not permit me use the same name in different Models. although these Variables are not accessable outside of the local Model. i.e. I would rather use the same name for some local values stand for the same thing accross all Models,. such as 'pow' for unit strength,. so Model apple.pow and orange.pow should be possible, as the local .pow is always Clone based. Currently I have to use things like apple. apple_pow and orange. orange_pow. Just a pet peev
iterationGAMES.com
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Yea,

I have to agree with jph .. being able to define local variables that are static* and are allowed to have "conflicting" names ( by the current rules ) would be convenient.

But in case of the fruit example I usually create a Model called Fruit, put the "Energy" variable in Definitions ( + a "Type" variable ), and create a ModelState for each type of fruit. Then just before spawning I set the "Type" variable to the desired fruit ( 0=Apple, 1=Orange ), and let the Model automatically switch to the correct ModelState in the OnSpawn event.

* Static means that the variable keeps it value between frames.

K
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Thanks, Kjell. As usual, very informative answers.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Beta updated today. Not much new functionality, the main thing is that I've transfered my developer environment to Delphi 2010 and that needed lots of code changes.

The generated exe-files are slightly larger than before but I'm confident I can trim it down again later on.

In case there are fatal problems with this release, here is a link to the previous beta.

- getSystemTime() function returns system time in number of seconds passed since midnight.
- quit() stops the application in the designer too.
- Suppress log-message when using MeshLoad component inside MeshLoop.
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

getSystemTime() doesn't appear to be number of seconds from midnight. Haven't figured out what it is. Nevertheless, it is ticking over and will work for randomizing.
Attachments
X.jpg
X.jpg (51.5 KiB) Viewed 24612 times
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:P

A rare screwup by Ville himself ..

Code: Select all

Result := T.wHour * 24 + T.wMinute * 60 + T.wSecond;
.. should have been ..

Code: Select all

Result := T.wHour * 3600 + T.wMinute * 60 + T.wSecond;
Happens to the best of us :wink:

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

Post by VilleK »

Hehe, oops :)

Thanks for the correction Kjell.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Updated today:
- reduced size of compressed exe-files. Still not quite as small as pre-Delphi 2010 but getting closer.
- icons from yoffset
- fixed getSystemTime-bug

Next I will attempt some basic string-support in expressions. Wish me luck :)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:!:

Please consider a 1/2/4-byte ( you're using UTF-8? ) switch on String Variables for some of the more exotic languages ( or alternatively 4-byte as the standard ).

And perhaps you could re-use some of the underlying dynamic "array" code for some data structures :wink:

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

Post by VilleK »

The beta has been updated today with the first version of string support. See first post for details. There are probably still lots of bugs with strings so use it carefully :). I made it support 8-bit strings for now because it was the easiest and most compact to implement.

If strings work out fine then we can make other simplifications. For instance WebOpen now has a ResultString-property for easier access to the result. I will probably remove the ResultArray-property because I see no more need of it. Also ParamArray can be replaced by just setting the Url-property directly from a script.
Last edited by VilleK on Sun Jan 24, 2010 11:05 pm, edited 2 times in total.
Post Reply