2d games

Panda can do it relatively easily; there are simply some convienience functions missing.

For example, to get coordinates in pixel coords, you could use this template. It is the base for my 2d hud stuff, all it does is allow you to use node.setPos(x,0,y) in pixel coordinates from the upper left hand of the screen and control the order in which they are drawn. Collisions would be harder as you would have to code them yourself; but there are ways around that. Also, images all have to be power of two for alot of computers which is slightly annoying.


#node everything is parented to, pixel coords from upper left corner (x,0,y)
pixelNode = NodePath(PandaNode('pixel node'))
pixelNode.reparentTo(render2d)
pixelNode.setPos(-1,0,1)	#the upper left corner
pixelNode.setScale(2.0/base.win.getProperties().getXSize(),1,-2.0/base.win.getProperties().getYSize())	

def SetDrawOrder(node,depth):
	#a lower depth will cause the node to be drawn earlier.
	node.setBin('fixed',depth)

def SetSize(node,width,height):
        #sets the scale in pixels
	node.setScale(width,1,-height)	#has to be negative or else the image will be upside down...

def createBox(texture):
      #creates a sprite which is positioned by the upper left hand corner.  Change the size by using setSize and reparent to pixel node to get a sprite that you can position and scale in pixels.

	#creates a 0-1,0-1 sprite on screen...
	vdata = GeomVertexData('', GeomVertexFormat.getV3t2(), Geom.UHStatic)
	vertex = GeomVertexWriter(vdata, 'vertex')
	uv = GeomVertexWriter(vdata, 'texcoord')
	prim = GeomTriangles(Geom.UHStatic)

	vertex.addData3f(0, 0, 1)
	vertex.addData3f(0, 0, 0)
	vertex.addData3f(1, 0, 0)
	vertex.addData3f(1, 0, 1)
	uv.addData2f(0,0)
	uv.addData2f(0,1)
	uv.addData2f(1,1)
	uv.addData2f(1,0)

	prim.addVertices(3,2,0)
	prim.addVertices(1,0,2)
	prim.closePrimitive()

	geom = Geom(vdata)
	geom.addPrimitive(prim)
	nodepath = NodePath(GeomNode('gnode'))
	nodepath.node().addGeom(geom)
	nodepath.setTransparency(1)
	nodepath.setTexture(loader.loadTexture(texture))

	return nodepath

Short answer: it is possible but you will most likely be fighting the system at one point or another; it is work-aroundable and you can implement whatever you want, but may take longer to get working than pygame or others.