@jdbc Yep, just like that. Also i need to put all of the tiles and every objects (every enemy, bullets, particles, and char) in one main mesh, so all of the tiles would not overlap each other, and objects in the center of 3D.
@hgy29 I don't think you need to include option to disable depth testing. The case is like what @SinisterSoft said, and can be seen in the example that i post.
I think i already found the answer. It seems that the order of addChild matter in this case. Object behind really need to be behind in the child hierarchy. Kind of hard to maintain (with new objects created in game like bullet and particle), so i think i prefer to shape some of them.
@tkhnoman What is needed is a command for force a z sort on children of children at a specific point - it will need a max pass parameter so you can make sure it won't take too long.
sprite:sortChildren([maxpass]) (with max pass being limited to the number of children.)
I've done the routine in my repo, but for some reason the command isn't available at the Lua level - no idea why as I'm not used to the gideros source code yet.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
As the windows version runs on my very old PC with a onboard graphics chip, I noticed there are some texturing errors on the horse. Load the object file into blender and compare yourself. In Gideros it has a huge white spot on the lower right side of the neck. And smaller ones on other places.
@tkhnoman, the issue I have with transparency is more an issue with translucency in fact. I think I can deal with pure transparency it the shader to prevent updating depth buffer if alpha is 0. But when alpha is >0 then we have a problem since we need to output a half transparent pixel which will be blended with what is already on the screen. In that latter case, the background must be drawn before. I'll take a look at pure transparency problem for the next release.
@MikeHart, in the horse exemple, we only render textures, no light map nor normals/bumps map which are available in original .obj. This would require much more work on gideros/shaders to enable those so I decided to leave them out for now. This may be why the object doesn't look the same in every details...
One thing to note if submitting to the Amazon Kindle store - open gl2 does not work on the 1st generation kindle fire - you have to turn it off manually when submitting because Amazon don't appear to know this when they scan the manifest file and will fail your game on submission.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@hgy29 Thanks for the explanation. I do feel like it's confusing to do that from the start, because i rarely see that on other 3D things. lol.
Probably it's better to have things like sorter for this thing. After tried it, it quite simple, whenever Z changed for an object, i just need to compare with Z of nearest children, until it found where it fits, and then insert.
Things like Mesh's rotation would also matter in this translucency things, and that would break away that sorter, and now sorting require much more calculation... So it's totally depend on how the coder would use it, i think. Probably better to have some explanation on the doc/somewhere. \:D/
I've just submitted a patch for Z coordinate retrieval (copy/paste issue...), and for dealing with pure transparency. In that case pixels with alpha=0 will be discarded, i.e. neither drawn are affecting the Z buffer. @tkhnoman, A setClip method was actually introduced in this release too, in the form Sprite:setClip(x,y,w,h), which performs a rectangular clipping. Setting clipW or clipH to -1 disable it.
clipping and masking is a much awaited benefit of opengl es 2 (perhaps more essential then 3d), so if these are now possible then please do it (and document it). thanks for this stuff
There is a glitch if you swipe in the Android controls then suspend the task then restart it - a black bar where the Android virtual swiped in buttons where.
To get rid of it change the getWindow().getDecoreView() bit of the activity to have these extra flags:
I've updated my update pdf that I made with the new info.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@hgy29 , i tried setClip and works nicely (so far i tested it only in win player), hope that it goes public and work-ready soon, it simplifies a lot of things. is setMask also around the corner?
@keszegh, nice to see it helps the way its done. I had mainly UI things in mind with a setClip like that. I made provision for a future setMask by configuring OpenGL stencil buffers: my idea would be to allow the use of a sprite as a mask to another sprite. But I'll wait til GL2 move is really acted (I mean, no more bug related to it) before going on.
BTW, I encourage everyone to try the new version with every devices one can have so as to validate it. @ar2rsawseen is preparing a new version very soon with the latest bug fixes.
Comments
Also i need to put all of the tiles and every objects (every enemy, bullets, particles, and char) in one main mesh, so all of the tiles would not overlap each other, and objects in the center of 3D.
@hgy29 I don't think you need to include option to disable depth testing.
The case is like what @SinisterSoft said, and can be seen in the example that i post.
I think i already found the answer. It seems that the order of addChild matter in this case. Object behind really need to be behind in the child hierarchy.
Kind of hard to maintain (with new objects created in game like bullet and particle), so i think i prefer to shape some of them.
@ar2rsawseen Well, not for now :P
Likes: jdbc
sprite:sortChildren([maxpass]) (with max pass being limited to the number of children.)
I've done the routine in my repo, but for some reason the command isn't available at the Lua level - no idea why as I'm not used to the gideros source code yet.
https://deluxepixel.com
@MikeHart, in the horse exemple, we only render textures, no light map nor normals/bumps map which are available in original .obj. This would require much more work on gideros/shaders to enable those so I decided to leave them out for now. This may be why the object doesn't look the same in every details...
Likes: SinisterSoft
Likes: SinisterSoft
The explanation here is far better than what I could do :P
https://deluxepixel.com
< uses-feature android:glEsVersion="0x00020000" android:required="true" / >
I've updated my utility.
https://deluxepixel.com
@hgy29 Thanks for the explanation. I do feel like it's confusing to do that from the start, because i rarely see that on other 3D things. lol.
Probably it's better to have things like sorter for this thing.
After tried it, it quite simple, whenever Z changed for an object, i just need to compare with Z of nearest children, until it found where it fits, and then insert.
Things like Mesh's rotation would also matter in this translucency things, and that would break away that sorter, and now sorting require much more calculation...
So it's totally depend on how the coder would use it, i think.
Probably better to have some explanation on the doc/somewhere. \:D/
Heck yeaaaa~ )
Edit: Also posted issue on github regarding getPosition and getZ :P
Likes: SinisterSoft
@tkhnoman, A setClip method was actually introduced in this release too, in the form Sprite:setClip(x,y,w,h), which performs a rectangular clipping. Setting clipW or clipH to -1 disable it.
Likes: SinisterSoft, pie
Fragmenter - animated loop machine and IKONOMIKON - the memory game
To get rid of it change the getWindow().getDecoreView() bit of the activity to have these extra flags:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
I've updated my update pdf that I made with the new info.
https://deluxepixel.com
Likes: MikeHart, gemboy100
is setMask also around the corner?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
BTW, I encourage everyone to try the new version with every devices one can have so as to validate it. @ar2rsawseen is preparing a new version very soon with the latest bug fixes.
Likes: SinisterSoft, keszegh