Beta release 3.1b

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Beta release 3.1b

Post by Kjell »

Hi Imerion,
Imerion wrote:This last release screwed up all text rendering in my game.
Could you post the / a RenderCharExpression of RenderText components that don't work properly anymore?

K
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: How did it break your code? Now CharI starts at zero and increases one for each letter, including CR+LF (linebreaks). It should not have to break any existing code except if you were dependent on that linebreaks was not counted.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 3.1b

Post by Imerion »

Sorry for not including more information. It might be due to something else, but what happens is that now all text have spaces between each character.
The RenderCharExpression looks like this :

if(CharI)CharX += FontMap[ord(subStr(Text, CharI-1, 1))]*(1f/FontData[2])-1f;

Kjell wrote this, if I remember right. :)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Beta release 3.1b

Post by Kjell »

Hi Imerion,
Imerion wrote:It might be due to something else, but what happens is that now all text have spaces between each character.
That's very strange .. the snippet you posted is exactly why the fix was requested in the first place, since previously "subStr(Text, CharI-1, 1)" wouldn't have worked correctly with multi-line strings. Perhaps you could copy-paste the components that are involved into a blank project and share that so we can have a look?

+ Ville - Seems like there's something ( else ) wrong still. When you for example have the following text ...

Code: Select all

Hello
World
.. and use "if(CharI == 4)CharX++;" it actually moves "W" ( and all subsequent characters ), while you'd expect that move is omitted since it's on the next line. On the other hand using "CharI == 6" instead doesn't do anything, while that should(?) give the result that "CharI == 4" currently gives.

K
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 3.1b

Post by Imerion »

Here's an example, I copied the pieces from my game. This should write "12345" but here it displays all scrambled, with the letters on top of each other. See if you can replicate it.
Attachments
TextBug.zgeproj
(1.21 KiB) Downloaded 688 times
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Beta release 3.1b

Post by Kjell »

Hi Imerion,
Imerion wrote:Here's an example, I copied the pieces from my game.
Looks like your forgot to copy your font Bitmap? The RenderCharExpression and FontData / FontMap arrays indicate that you're using a font exported from CBFG, but you're using the built-in font in your example. Obviously the FontData / FontMap values don't match up for the built-in font.

In any case, attached is a quick example that works in the latest Beta*. As you can see the expression is slightly different now ( no more if-statement and "CharI-1" needed ).

*But as mentioned there's still something weird going on with the spacing of the first character of a line.

K
Attachments
Segoe.zgeproj
(18.69 KiB) Downloaded 603 times
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 3.1b

Post by Imerion »

I'm so scatterbrained, missing the font bitmap. However, your new code makes things look as they should again!

Thanks for always helping me out! Now I can continue with the game. :D
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 3.1b

Post by rrTea »

[quote="Kjell"]+ Ville - Seems like there's something ( else ) wrong still.[/quote]

I'm also having some unexpected behaviour (if a character is first in line changing its CharX is ignored, similar (/ same?) like in Kjell's example etc)...

Is CharI now 1-based? In my project everything starts working mostly fine if I substitute CharI with CharI+1...
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 »

There was a bug that caused CharI to be zero for the first two characters. Now I've updated it so it should be properly zero-based. If it doesn't work fine now we'd better revert to the original version.
http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 3.1b

Post by rrTea »

Just to confirm it works well here!
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 with changes requested by Rado1 with his ongoing project to update the help documentation:

- Webopen: removed redundant paramarray and resultarray properties (use url and resultstring properties instead).
- RenderTarget: added Filter property.
- Application: made ClearScreenMode a dropdown (and value is saved in project).
- ModelState: moved Definitions property first in list.
- Variable: StringValue property is now shown in property editor.

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