startup question

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
kesmanu24
Posts: 2
Joined: Sat Jul 14, 2012 12:32 pm

startup question

Post by kesmanu24 »

Hi Community! :D

I am new to ZGE and i find myself enjoying it very much.
I have a few questions to get me up and running faster.

1. If i want to create different levels, would each level be a different state or how would i go about loading just the asset necessary to the level.
2. How can i switch camera view after i created the cameras using ZExpression?
3. Where can i learn more about some ZExpression commands?
4. Does ZGE support mesh animation from other softwares?


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

Re: startup question

Post by Kjell »

Hi kesmanu24,
kesmanu24 wrote:If i want to create different levels, would each level be a different state or how would i go about loading just the asset necessary to the level.
Since ZGameEditor produces a single file ( only a executable ) from your project, all assets ( Bitmap / Sample / Mesh ) are always in the memory. The only way around this is to use the File component.
kesmanu24 wrote:How can i switch camera view after i created the cameras using ZExpression?
You cannot create a Camera from a ZExpression. The Camera variable type is only used for being able to reference a existing Camera component.
kesmanu24 wrote:Where can i learn more about some ZExpression commands?
Over here .. although the documentation isn't up-to-date :( Information on recently features can be found here and here.
kesmanu24 wrote:Does ZGE support mesh animation from other softwares?
Unfortunately not. There's only support for importing static meshes ( 3ds files ) build-in the editor.

K
kesmanu24
Posts: 2
Joined: Sat Jul 14, 2012 12:32 pm

Re: startup question

Post by kesmanu24 »

After playing around more in the editor I still can`t seem to get how the file component works. I am interested in loading image files and 3ds models using a different and not to be loaded in with the .exe

Could you explain more about the file compoente.....
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi kasmanu24,

One of the reasons ZGameEditor produces relatively small executables is because it doesn't contain any decoders for formats such as PNG / 3ds etc. When you import a file using the editor, it is converted into engine-native data. This means that when you want to load a .3ds file during run-time, you need to decode the data yourself. Additionally, the "interfaces" for Bitmap / Mesh generation aren't geared towards pumping in raw data, so that's a little cumbersome as well ( unless you use OpenGL directly ).

This doesn't mean that it isn't possible though, attached is a simple example that loads a external mesh ( custom format instead of .3ds ) into a Mesh component.

@Ville - How come imported data is stored in zlib compressed format in a zgeproj file, but RAW in the executable? Wouldn't it make more sense to have it the other way around? That way loading / saving zgeproj files will be faster, and executables ( potentially ) smaller. Not sure how big the zlib decoder is though ..

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

Post by VilleK »

ZGE was initially completely targeted towards procedural content. So the recommended way is using procedural techniques such as the MeshLoop component to generate meshes instead of using imported files. With a bit of effort you can create lots of very cool abstract shapes. But maybe we should have some more decoders in the runtime, that is something to think about.

Zgeproj-files use compression because since they are text-based they would become huge if the content was uncompressed. In the exe the content is uncompressed but layed out in a way to be compression-friendly for exe-compressors. Upx and similar tools works best if it can compress the whole file. Total compression would be less if some of the content was already compressed. The exception is the jpg-encoded bitmaps that ZGE uses for bitmaps (because Upx cannot use lossy compression so by using it in ZGE is a win for better total compression).
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Also about the File-component: It is unintuitive to use because it was designed at a time very early in ZGE history when scripting support was very limited and there wasn't even a string-datatype. We should redesign it at some point to make it more intuitive.

Having said that, ZGE probably never will be as easy to use as some of the other game developer tools simply because it has been designed with different goals from the beginning. And also because it is 100% free tool so no budget to let a developer work on user-friendliness issues.

To enjoy ZGE you should probably have a bit of interest in procedural techniques and appreciate the small independent binaries that are generated. But now and then we try to widen the audience by making it a more general development tool.
Post Reply