Search found 1876 matches

by Kjell
Thu Feb 24, 2022 11:43 am
Forum: General discussion
Topic: Writing and Reading
Replies: 4
Views: 11196

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

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

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

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

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

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

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

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...
by Kjell
Tue Feb 08, 2022 5:31 pm
Forum: Bug reports
Topic: Timer.CurrentRelativeTime behavior
Replies: 2
Views: 5815

Re: Timer.CurrentRelativeTime behavior

Hi Ats, Is it a bug? Or is it normal? It's not a bug. A timer will only run as long as the node that contains it is active. Here's a similar example to yours except that you have to hold the "S" key on your keyboard to keep the timer active. Hopefully that will clear things up for you. <?x...
by Kjell
Mon Feb 07, 2022 12:46 pm
Forum: Extensions
Topic: Deploy DLL
Replies: 10
Views: 33257

Re: Deploy DLL or use DLL's on current Windows 10 64 bit?

Hej Ville,
VilleK wrote: Mon Feb 07, 2022 12:18 pmDoes anyone know where we can find a 64-bit bass DLL?
Check the x64 folder :wink:

http://www.un4seen.com/download.php?bass24

K
by Kjell
Fri Feb 04, 2022 4:25 pm
Forum: General discussion
Topic: Variable length?
Replies: 2
Views: 5544

Re: Variable length?

Hi Ats, Is there a simple way to get the length of a string var? Sure, just use length() string myString = "Hello"; int myStringLength = length(myString); And what about the length of an int? Same thing, just convert your int to a string first before using length() int myInt = 12345; int m...
by Kjell
Thu Dec 30, 2021 8:16 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 272365

Re: 3D Physics with ZgeBullet

Hi zakkwylde, Have been trying to make sense of quarternions and how we can code this in ZGE but no, i am still stumped. Quaternions are pretty unintuitive yes. However, once you get familiar with them they're not that difficult to use & don't require a ton of code either. Below is a very basic ...
by Kjell
Thu Dec 23, 2021 2:27 pm
Forum: General discussion
Topic: Intro (a sequence of images Gif style) options?
Replies: 7
Views: 12245

Re: Intro (a sequence of images Gif style) options?

Hi jinxtengu, There's no easy way to play a video without a DLL. On Windows there's the AVIFile interface .. but you can't use that from ZGE ( you'd need to write a wrapper ). And MCI commands don't really play nicely with a OpenGL application, it's possible to make it work but it's not exactly clea...
by Kjell
Fri Dec 17, 2021 4:54 pm
Forum: General discussion
Topic: A few questions relating to Y rotation
Replies: 5
Views: 7565

Re: A few questions relating to Y rotation

Hi guys, The default camera axis in ZGE have not changed since version 1.0 as far as I can remember so not sure what is going on in your case. This doesn't have anything to do with the camera, it's because the axis rotation order for models got fixed / reversed in 2010. It used to be ZYX but was cha...
by Kjell
Mon Nov 01, 2021 2:49 pm
Forum: Your projects
Topic: OMEGANAUT
Replies: 96
Views: 162393

Re: OMEGANAUT

Hi Ats, This is actually very easy to solve .. the only thing you need to do is to clear the depth buffer after rendering your planet. Here's your example with one OpenGL call added to the last ZExpression in PlanetModel.OnRender :wink: <?xml version="1.0" encoding="iso-8859-1" ?...