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:

Re: Beta release 4.0b

Post by VilleK »

rrTea: I tried to fix the color problem now. Can you download and try again?
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

It works in a simple test-situation but not when I plug it into my project (same thing that worked in the older build). I'm trying to figure out why, will report back.

Edit: I can't paste the code here so I pasted in the Bugs thread, please take a look:
viewtopic.php?p=8134#p8134
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Beta release 4.0b

Post by Imerion »

@VilleK

That is very odd. A few beta-releases ago text worked, but now every number of 100 or more is displayed with the digits after the first two on top of each other. It only happens in the TextFloatRef though. Any static text seem to display fine. Perhaps that could help pinpoint the problem?

The attached image shows what happens when I try to display an integer with the value 100.
Attachments
example.png
example.png (1.16 KiB) Viewed 25597 times
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

[quote="VilleK"]- 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.[/quote]

Since arrays can now include bitmaps, sounds etc now, wouldn't it make sense that the options from the dropdown menu (Array.Type) reflect this? Otherwise it's really easy (for me at least) to overlook that this feature exists at all. Also it's inconsistent that arrays can just be added in the Project Tree while arrays with bitmaps etc have to be added using ZLibrary.
Last edited by rrTea on Wed May 11, 2016 1:02 am, edited 2 times in total.
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 »

@rrTea: I agree but there is a internal technical reason I have still not done so (making them visible in the dropdown). Hope it can be solved later!

New small feature: declaring ZLibrary members as "private".

Example:

Code: Select all

private int x,y;         //These are marked as "private"
private int f() {     //so they can only be used within this library
  x=1; y=1;
  return x+y;
} 

int g() {  //This is not marked as private so it is public and can be used from rest of project (like before)
  return f() + 42;
}
This makes it possibly to reuse private names in other ZLibraries and also keep things better organized (only the names that are meant to be called from other components need to be public). That all names in ZGE are public is something I'm not 100% happy with so I hope to find a better solution later.

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

Private variables and functions of ZLibrary is a very good step toward encapsulation. I can use it immediately in some of my libraries. Thanks Ville.

For future, there may be some way how to specify also private visibility for variables defined in Model.Definitions or AppState.Definitions scoped to particular model or application state respectively.
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 »

Indeed, it is good for encapsulation. There was a small bug in yesterdays version, with this update the "private" keyword should work better: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Thanks!

Post by rrTea »

Not sure when was it introduced but I'm super happy that 8-bit pngs custom transparent color now works as it should, meaning any palette index can be selected to act as transparent (so we're not limited / forced to use black - and black can be freely used on the image)!
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Re: Beta release 4.0b

Post by rrTea »

When it comes to code highlighting, I think the code editor should treat/render vec2 (and others) the same way "float", "int" etc. are displayed. For example in lines like this:
[code]
int Counter = 0;
vec2 currPos = vector2(CurrentModel.Position.X,CurrentModel.Position.Y);
[/code]
the "int" will be renderd in bold, while "vec2" won't.
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 »

Small update:
- Updated help file from Rado1
- Updated ZgeBullet lib from Rado1
- New "Tools - Find unused components" menu item. Use this to check if your project contains components that are not used (helpful when cleaning up big projects).

http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

Hi Ville, why the "Find unused components" cannot find unused variable if you create project as follows:
1. Create new empty project.
2. Add new variable (Variable1 by default) to OnLoaded or Content section.
3. Run "Find unused components" -> it reports "No unused components found", but it should find the variable

Question: Does it find also unused constants, variables and functions specified in ZLibrary? I hope it omits functions from ZExternalLibrary.
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,

Indeed the feature only looks at Content components (Mesh, Sound, Bitmap) as those are safe to determine that they are completely unused. I should extend it to look at unused variables too.

/V
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 »

Ok, now I've made it detect unused variables too. Beta updated.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

Thanks Ville. Finding unused components is great! If checked several of my projects and found some forgotten parts.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Beta release 4.0b

Post by Rado1 »

Hi Ville, in past, various requests to highlight particular keywords in code editor arose. So here is a summary of all not highlighted keywords of built-in types and commands: byte, vec2/3/4, mat4, xptr, Material, Sound, Shader, Bitmap, Mesh, Camera, Font, Sample, default, ref, and maybe also reinterpret_cast.

It would be nice if code editor can highlight them similarly to int, float, model, etc. I hope it's not a big effort.
Thanks. Rado1.
Post Reply