Hi, i love panda3d i think is the right way to make a real engine and not a graphical library with “game” in it’s name.
---- skippable
rationale:
I really want to make 2D Games because of (lots of) reasons.
And i would love to be able to use Panda3d. For now i’m using libGDX for work. which in fact uses 3d environ just like panda3d. So i started building my own implementation of a 2d library on panda3d.
so far i got some interesing stuff (spritesheets and tilemap vimeo.com/59118155 ) but i have lots of problems trying to understand how panda3d work and choosing the apropiate and most efficient methods.
I have many doubts that i couldn’t solve just by using Google, and instead of flooding the irc channel i thought maybe it was better to just start a thread here, to be able to share the code [ jerobarraco@bitbucket.org/jerobarraco/panda2d ]. Also so the answers can help other people just like some old answers helped me.
So i hope someone can help me, and it doesn’t bother anyone that i ask many questions.
[color=green][Solved] 1) Why pixel2d uses -Z coords?
already readed about is a matter of taste and that texture coords are the same. But i really want to know the reason behind that desition.
- Is there any good way i could make +Z coords (just like a 2d pixel screen)
Having also +V texture coords. Mostly for doing Texture offsets.
For now i just faked that by doing :
base.cam2d.setZ(2)
[color=green][Solved by rdb] 3) How can i set up the camera so that it moves on pixel coords? Or how can i create a new one with that effect?
-
Is ok to generate a card with
(-0.5, 0.5, -0.5, 0.5) with no UVs ?
Then set the node scale to (w, h)
and finally set the texOffset to (dx, -(h+dy))
it works, but i don’t like much the transformation on the texOfset. -
I made a simple tilemap renderer. Does someone has an example on how to use OccluderNode, i’m not sure if i’m using it right ( bitbucket.org/jerobarraco/panda … ault#cl-47 ) or if its working.
I’m grouping and flatten my tiles ( bitbucket.org/jerobarraco/panda … ault#cl-25 ) i don’t know if that’s enough. -
The tilemap works pretty well (with Tiled )
but when i move the camera, sometimes, a line shows between the tiles (because they’re different geometries) puu.sh/20psH
Can this be fixed? How?
Thanks