BUG!!! Or something very similar.... :D

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

BUG!!! Or something very similar.... :D

Post by kattle87 »

i've discovered that collision Category and spawn order influence (i think abnormally) trasparence of materials...

you can see a model behind another one which is trasparent ONLY if his collision integer is smaller (EG: if big ball is collision Category 2, small balls are collision Category 1, you will see only the small ball behind the big one, while u won't see the big ball behind "trasparent" small two which are in front...

If Category integer is the same, then Spawn order is taken into consideration...

If i've not been clear enought (and i suspect this) try playing with collision Category and spawn order to understand what i mean...

from http://www.opengl.org/resources/faq/tec ... arency.htm :
"15.050 Do I need to render my primitives from back to front for correct rendering of translucent primitives to occur?"

maybe i can guess the problem... ZGE draws things in some order related to the collision, and the spawn order, am i wrong? :P

If u fix this in next release, i'll post the Breakout clone i'm working on... when it's almost finished :P

...although i can get my game working even if u don't fix this... :P

BTW: i suffer from smoothness drop when i move my mouse in the window of a game created with ZGE... FPS does not get low.... but it seems to not refresh screen properly.... I'll try to understand if it's a problem of mine...

Bye bye!!!
Attachments
mylittelproject.zgeproj
(1.94 KiB) Downloaded 459 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Yep this is a bug alright :)

You are correct in guessing that ZGE draws objects in the order of their categories, and in spawn-order for each category.

In 2d-games this has not been a problem yet but for 3d-games it quickly becomes insufficient.

The correct way is to sort in z-order before rendering. I'll put it on my todo-list as a feature that must be fixed, but I cannot fix this for November 1 release sorry.

One thing that affects transparency is also ZBuffer-property on material. If you turn it off then depth test is disabled and object will be drawn on top of each other. Maybe you can use this somehow?

About mouse-movement affecting smoothness this sounds very strange. I don't do anything special with mouse-movement messages so it should not be a problem. If possible then please try your code on another computer.
Post Reply