Search found 1883 matches

by Kjell
Mon May 23, 2022 7:37 am
Forum: Tips'n'Tricks
Topic: QOI
Replies: 3
Views: 18925

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: 18925

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: 5708

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: 7167

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: 11433

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: 29855

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: 84967

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...
by Kjell
Thu Feb 24, 2022 11:43 am
Forum: General discussion
Topic: Writing and Reading
Replies: 4
Views: 11422

Re: Writing and Reading

Hi Zakk, I am trying a very simple exercise of placing a numerical figure in a txt file, say 10. Then I just need to get this file read and the number be displayed on screen. Since there's no way to write a string to a file i'd recommend using a byte array instead ( and do the string conversion your...
by Kjell
Fri Feb 18, 2022 5:21 pm
Forum: General discussion
Topic: How to use the ZGE-Light component?
Replies: 6
Views: 7465

Re: How to use the ZGE-Light component?

Hi Andreas, Sorry that I experiment with it .. probably with to few understanding .. but why in this project gets the Light Color overwritten by the Scene-Material Color? It doesn't. When you for example change SceneMaterial.Color from white into yellow the scene ( box & floor ) appears yellow b...
by Kjell
Fri Feb 18, 2022 12:11 pm
Forum: General discussion
Topic: How to use the ZGE-Light component?
Replies: 6
Views: 7465

Re: How to use the ZGE-Light component?

Hi Andreas, So lights by itself are invisible objects and the in the example attached nodes can be used to visualize them. Yea, i just added the "nodes" so it's easier to understand what's going on. Can a spot-light effect like in a theatre with a sharp radial illumnination on an object be...
by Kjell
Wed Feb 16, 2022 3:10 pm
Forum: General discussion
Topic: How to use the ZGE-Light component?
Replies: 6
Views: 7465

Re: How to use the ZGE-Light component?

Hi Andreas, Can someone demonstrate the usage? Here's a simple demonstration of a white cube being lit by 3 differently colored point lights ( red, green and blue ). <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor applicat...
by Kjell
Sun Feb 13, 2022 7:09 pm
Forum: General discussion
Topic: Optimizing texture swaps
Replies: 2
Views: 6207

Re: Optimizing texture swaps

Hi Ats, I was wondering if it is worth keeping track of the current material in order to avoid @UseMaterial if it hasn't changed. No need for that. When you call UseMaterial it automatically checks whether the material is already active or not .. you can see the code for this here . What helps in te...
by Kjell
Sat Feb 12, 2022 2:02 pm
Forum: General discussion
Topic: Logic for a single Model with different Bitmap?
Replies: 6
Views: 7241

Re: Logic for a single Model with different Bitmap?

Hi Ats, I didn't understand that creating the temporary model would spawn it right away, all while creating its physics and collisions before setting its position, resulting in weird bugs from time to time. It's important to be aware of the order in which things get executed yes. Here's a simple exa...
by Kjell
Fri Feb 11, 2022 4:25 pm
Forum: General discussion
Topic: Logic for a single Model with different Bitmap?
Replies: 6
Views: 7241

Re: Logic for a single Model with different Bitmap?

Hi Ats, One last thing, you are using an Array for DummyColor instead of a Vector3. Is it better, or faster? I don't think it makes a big difference, here's the same thing using a vec3 instead of a array: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App&q...
by Kjell
Fri Feb 11, 2022 2:56 pm
Forum: General discussion
Topic: Logic for a single Model with different Bitmap?
Replies: 6
Views: 7241

Re: Logic for a single Model with different Bitmap?

Hi Ats, Is this possible to do? Yup, i recommend doing it like this: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0.7529 0.7529 0.7529 1" FileVersion="2"> <OnLoaded> <ZE...