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.
Fast rendering Question
Moderator: Moderators
Fast rendering Question
- Attachments
-
- prb4.zgeproj
- navigation in cubic virtual world with mesh floor, fire and one box only
- (4.66 KiB) Downloaded 453 times
Re: Fast rendering Question
Hello,
K
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: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.
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: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?
I'm afraid not. The RenderParticles component is for 2D particles only ( at the moment ).milen_zge wrote:But I want to ask - is it possible to set this Particles jet direction out of the X,Y plane?
K
Re: Fast rendering Question
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!
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!