Beta release 4.0b
Moderator: Moderators
Re: Beta release 4.0b
rrTea: I tried to fix the color problem now. Can you download and try again?
Re: Beta release 4.0b
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
Edit: I can't paste the code here so I pasted in the Bugs thread, please take a look:
viewtopic.php?p=8134#p8134
Re: Beta release 4.0b
@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.
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 (1.16 KiB) Viewed 25875 times
Re: Beta release 4.0b
[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.
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.
Re: Beta release 4.0b
@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:
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
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;
}
http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Re: Beta release 4.0b
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.
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.
Re: Beta release 4.0b
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
Thanks!
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)!
Re: Beta release 4.0b
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.
[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.
Re: Beta release 4.0b
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
- 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
Re: Beta release 4.0b
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.
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.
Re: Beta release 4.0b
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
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
Re: Beta release 4.0b
Ok, now I've made it detect unused variables too. Beta updated.
Re: Beta release 4.0b
Thanks Ville. Finding unused components is great! If checked several of my projects and found some forgotten parts.
Re: Beta release 4.0b
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.
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.