Search found 1876 matches

by Kjell
Mon Jul 25, 2022 10:10 am
Forum: General discussion
Topic: Question about Rotation and RotationVelocity
Replies: 5
Views: 7643

Re: Question about Rotation and RotationVelocity

Hi Ats, Why RotationVelocity isn't making the model rotating on its own Y axis? This is because the default rotation axis order of a model is XYZ. For what you want to do you'd either need YXZ or YZX. Unfortunately you can't select the order of euler angles in ZGE, so the easiest solution is to orie...
by Kjell
Sun Jul 24, 2022 12:51 pm
Forum: Bug reports
Topic: Access violation error when selecting a mesh
Replies: 2
Views: 5622

Re: Access violation error when cselecting a mesh

Hi Ats, I have a bug in my project, and it crashes ZGE without warning if I click the Model/ModelState/Definitions/Mesh in the left column. The problem comes from the MeshExpression that has access to a variable in the definitions of the Model. This issue is a little annoying yes. It's caused by the...
by Kjell
Thu Jul 21, 2022 2:21 pm
Forum: General discussion
Topic: [solved] Burnt colors on Android
Replies: 4
Views: 6180

Re: Burnt colors on Android

Hi Ats, I'm starting to get somewhere after doing this: vec3 LPosition = normalize(vec3(lightPosition[0][0], lightPosition[0][1], lightPosition[0][2])); I'd recommend normalizing your vector in a ZExpression before using it in your shader, that way you only do it once instead of for every pixel. <?x...
by Kjell
Thu Jul 21, 2022 11:29 am
Forum: General discussion
Topic: [solved] Burnt colors on Android
Replies: 4
Views: 6180

Re: Burnt colors on Android

Hi Ats, It's better, but the result still isn't the same on PC and Android. It's way more contrasted on Android for the ships, and the planets keeps burning, and I really don't know why... Make sure to normalize the light vector before doing any calculations with it ( instead of clamping the result ...
by Kjell
Mon Jun 20, 2022 7:34 pm
Forum: General discussion
Topic: Help with aiming from one vec3 to another
Replies: 3
Views: 5960

Re: Help with aiming from one vec3 to another

Hi Ats, I get why there is no roll, but I don't see where the negative atan2 yaw is coming from It depends on which axis of your line / model you want to point at the target. The calculations are just simple pythagorean theorem in 2D .. how to apply the results in 3D ( rotation ) is down to your set...
by Kjell
Mon Jun 20, 2022 1:09 pm
Forum: General discussion
Topic: Help with aiming from one vec3 to another
Replies: 3
Views: 5960

Re: Help with aiming from one vec3 to another

Hi Ats, Where do I mess up? It depends a little on your specific situation and the type of result you're after ... but let's say you want a floor-mounted turret to track a target then you only need pitch & yaw. Here's a example: <?xml version="1.0" encoding="iso-8859-1" ?> <Z...
by Kjell
Sun Jun 12, 2022 9:34 pm
Forum: General discussion
Topic: Velocity problem with "childrens"
Replies: 2
Views: 5513

Re: Velocity problem with "childrens"

Hi Ats, My problem is that with this little formula, the smoke velocity should regain the explosion velocity and continue it's way out of the screen with the little dot, but instead, it slows down to zero, and I don't understand why It's because when you spawn a clone that contains a array in its De...
by Kjell
Wed Jun 08, 2022 10:31 am
Forum: General discussion
Topic: Cubemap?
Replies: 2
Views: 6157

Re: Cubemap?

Hej Ville, Someone on FL Studio forums asked how to use a cubemap in ZGE. I remember seeing this but when I search the ZGE forums I only find mentions of it but no project. Can't seem to find it either :P Maybe Kjell happen to have an example lying around? Depends a little on what this person means ...
by Kjell
Mon May 23, 2022 7:37 am
Forum: Tips'n'Tricks
Topic: QOI
Replies: 3
Views: 18246

Re: QOI

Hej Ville, What kind of compression ratio do you get for the included images? It varies from situation to situation, but in this case the original PNG images were 59228 bytes total, while the QOI images are only 36970 bytes. Due to the limited color palette & large number of masked pixels most o...
by Kjell
Sun May 22, 2022 9:01 pm
Forum: Tips'n'Tricks
Topic: QOI
Replies: 3
Views: 18246

QOI

8) Attached is a QOI decoder including a simple demo that loads a external QOI image containing a single frame of the selected fighter into a texture. Obviously this makes more sense when the images you're loading are a lot bigger than in this example, but the approach would remain the exact same. h...
by Kjell
Tue Apr 12, 2022 4:30 pm
Forum: General discussion
Topic: Another simple question about basic trigonomety
Replies: 2
Views: 5537

Re: Another simple question about basic trigonomety

Hi jinxtengu, I wanted to create a model that has 8 directions of animation depending on it's movements, so the most obvious comparison to what I want to implement would be the ghosts from a game like the arcade version of gauntlet. I understand the reference, but do keep in mind that Gauntlet doesn...
by Kjell
Wed Mar 16, 2022 6:59 pm
Forum: General discussion
Topic: Irregular sprite overlapping area
Replies: 4
Views: 6969

Re: Irregular sprite overlapping area

Hi rrTea, Is this possible to do in ZGE without using OpenGL calls? Sure. The only thing that is a little cumbersome is the fact that you can't access image data directly, so you need to copy the alpha channel of your image / spritesheet to a array ( using a BitmapExpression ) .. and if you want to ...
by Kjell
Sat Mar 05, 2022 2:35 pm
Forum: Bug reports
Topic: AudioMixer resets when loading the project
Replies: 9
Views: 11102

Re: AudioMixer resets when loading the project

Hi Ats, I'm using Chanel 2 and 3, but when I save the project, leave ZGE, and come back to it later, extra channels 2 and 3 are deactivated. Strange .. i just tried this to double-check and it works just fine for me. I can't set all manually at the start of the game either Also weird .. i initially ...
by Kjell
Fri Mar 04, 2022 12:49 pm
Forum: General discussion
Topic: Exporting images from ZGE
Replies: 17
Views: 29201

Re: Exporting images from ZGE

Hi Ats, Maybe it can be optimized, as I didn't know any another way to store the magical sentence as bytes at the end of the file. You could do something like this: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor applicati...
by Kjell
Sun Feb 27, 2022 10:47 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 82448

Re: Questions about ES2/GL3 shaders

Hi Ats, I tried to send the Y position of the model to the shader, using gl_Position.y -= modelPosition[0][1] , but it's not working. That doesn't work because you're transforming screen-space coordinates. You need to transform the vertices before applying the view & projection matrices. Is it p...