Tag Info

New answers tagged

0

You could model this as a perfectly inelastic collision. That means that the players will keep touching each other after the collision. Suppose you have two players A and B running at each other at the same speed. A is heavier. So when A and B collide A pushes B backwards and keeps touching B. That seems to me realistic enough when we are talking about ...


4

PyGame itself, being a wrapper around SDL, is unable to directly use hardware acceleration. You can, however, use PyGame to create an OpenGL context and then render into that via an OpenGL library like pyglet or PyOpenGL, which will let you then also use GLSL vertex and fragment shaders. This blog post does a good job of explaining the basics of using ...


1

The way I see it is, don't stick the hooks in for something that will give you no benefit. Write your code in the simplest possible manner first, which almost always means "hard-coding" some things like the sprite group snippet you mentioned. If you come across some new change or requirement that would benefit from the factory, then by all means, write it, ...


1

Socket.IO is a protocol, not necessarily completely driven by WebSocket. In fact, Socket.IO even has a Flash fallback in place because of this. You can use just the Socket.IO library and simply communicate with the game accordingly if you're okay with this. Python libraries that implement the protocol do exist, such as this one. However, just keep in mind ...


1

In pygame2exe.py, there's a section which reads: #Extra files to be included in the dist directory #directory #files extra_files = [ #("", ["README.txt"]), ] You should add your content (spritesheet.png, font.ttf) into this array and run pygame2exe again.



Top 50 recent answers are included