Page 1 of 1

Fast rendering Question

Posted: Thu Dec 13, 2012 10:59 am
by milen_zge
Hello,

I am completely new in this excellent software - ZGameEditor.
My first "big" project is to make "navigation system" - camera represents the gamer, and he moves in the virtual world (in my case - cube with size of 20 points and center - the center of the coordinate system) by 6 buttons:

the 4 arrows and PgUp & PgDn for "levitation".

The problem is that the rendering is "slow", i.e. I want to say that when I moves in the world, the screen picture makes some... jumps.

My hardware is pretty good, but I do not know many things:

- is my idea for camera movement is good and the code, that I use, isn't very theoretical (use naive math)?

- I do not know where the key-objects work better - in OnRender or in OnUpdate - it seems that works in the two cases, but... which is right way?

At the end - another theme - I try to make "Fire" effect (I was working with GLScene) and I use Particles object. It seem that my idea is not good and I will learn about the bitmaps... But I want to ask - is it possible to set this Particles jet direction out of the X,Y plane?

Preliminary Thanks and I apologize for my bad English.

Re: Fast rendering Question

Posted: Thu Dec 13, 2012 7:11 pm
by Kjell
Hello,
milen_zge wrote:The problem is that the rendering is "slow", i.e. I want to say that when I moves in the world, the screen picture makes some... jumps.
The primary cause is that you've set RepeatDelay values on your KeyPress components. If you want the keys to be checked each frame, set the RepeatDelay value to "0".
milen_zge wrote:I do not know where the key-objects work better - in OnRender or in OnUpdate - it seems that works in the two cases, but... which is right way?
In your case OnUpdate is the correct event. Any camera values ( such as position / rotation ) are passed to the GPU right after OnUpdate & just before OnRender. So any changes you make to the camera in OnRender won't be visible until the next frame.
milen_zge wrote:But I want to ask - is it possible to set this Particles jet direction out of the X,Y plane?
I'm afraid not. The RenderParticles component is for 2D particles only ( at the moment ).

K

Re: Fast rendering Question

Posted: Fri Dec 14, 2012 7:58 am
by milen_zge
Thank you, for reply!


I used RepeatDelay for the buttons, thinking to set the player movement speed, but when I set this values to 0, the movements are OK.


Now I continue my learning of this awesome software!