A cross-platform windowing and multimedia library for Python using OpenGL.

learn more… | top users | synonyms

3
votes
1answer
245 views

How do I efficiently render the tiles of a tile map?

I've been working on a game, and I've been using Python with Pyglet to create it. I had an issue on how I could do effective tile based rendering. I tried cocos2d, however the API is very efficient ...
1
vote
1answer
111 views

Pyglet: How to use second screen's vsync

does anybody know if it's possible to use the vsync of the second monitor instead of the first one with pyglet? I have 2 monitors, one running at 60Hz and the other at 120Hz. I want to be able to ...
3
votes
1answer
130 views

Pyglet: text.Label().draw to FBO?

I just started OpenGL (PyopenGl) & Pyglet 3 weeks ago, and decided to read the Red Book. So sorry if my question shows my lack of comprehension... My question is: Is it possible to display/write ...
2
votes
1answer
115 views

How to draw image in memory manually in pyglet?

In pyglet, I want to create an image buffer in memory, then set the bytes manually, then draw it. I tried making a 3x3 red square like this in my draw() function: imageData = ...
3
votes
1answer
119 views

How to make a map surface object

I'm making a 2d tile based game. In pygame I could create a map like this: screen = pygame.display(resolution) map = pygame.Surface(width, height) for tile in all_tiles: map.blit(tile) ...
5
votes
1answer
173 views

How to flip coordinate system in Pyglet?

Is there any way I can flip the coordinate system in Pyglet vertically so that y = 0 is at the top of the screen and a higher y value is closer to the bottom? It is really confusing trying to use ...
1
vote
1answer
503 views

example of texture mapping in pyglet

Using pyglet, I am trying to create a UVSphere mesh, and on its surface I would like to display a mercator-projection map. In researching examples of pyglet texture mapping, I have found: Nehe ...
0
votes
0answers
208 views

2D Textures are shown through objects in front of it(OpenGL)

I am learning to use pyglet and learning about applying 2D textures to planes in pyglet. When I apply the 2D texture to the plane it works fine. When I make multiple objects with the same texture , ...
0
votes
1answer
233 views

Why is my obj file imported into pyglet showing a blank screen?

I am trying to figure out how to import .obj files generated using Blender into my Pyglet game. There is an importer object, example code, and an example .obj/.mtl file within Pyglet's contrib ...
2
votes
1answer
1k views

How do I implement camera axis aligned billboards?

I am trying to make an axis-aligned billboard with Pyglet. I have looked at several tutorials, but they only show me how to get the up, right, and look vectors. So far this is what I have: target = ...
2
votes
2answers
2k views

2D animation example in pyglet (python) looping through 2 images/sprites every x seconds

Suppose you have two images: step1.png and step2.png . Can anyone show me a very simple example in pyglet how to loop through those 2 images say every 0.5 seconds? The character doesn't have to ...
2
votes
1answer
310 views

Scaling window contents in Pyglet?

I'm trying to scale a window's contents so that every pixel displays at a multiple of it's normal size. Basically I want to achieve larger pixels without scaling each and every individual sprite. This ...
2
votes
1answer
214 views

How to debug pyglet/opengl bus errors

I'm using pyglet for game development, and sometimes encounter "bus errors". They are not consistently repeatable, and whenever I try to do simple debugging (eg move/remove variables, etc), the errors ...
7
votes
2answers
2k views

How can I resize pixel art in Pyglet without making it blurry?

I have a tileset of 8x8 pixel images, and I want to resize them in my game so they'd be double that (16x16 pixels, e.g. turning each pixel into a 2x2 block.) What I'm trying to achieve is a ...
7
votes
2answers
3k views

How can I distribute a native executable for a Python program?

Lately all of my work has been in Python (and Ruby), and I'm in love with those two languages. There are many libraries for game development on Python but the problem I see is that many of those ...
1
vote
3answers
3k views

Will I have an easier time learning OpenGL in Pygame or Pyglet? (NeHe tutorials downloaded)

I'm looking between PyGame and Pyglet, Pyglet seems to be somewhat newer and more Pythony, but it's last release according to Wikipedia is January '10. PyGame seems to have more documentation, more ...
4
votes
3answers
510 views

What resources are available to read and share pyglet code?

I am a Python programmer (I know the ins and outs decently well), and I have dabbled with Pygame. I want to make 3D applications and games, and so naturally I've been looking at OpenGL. pyglet uses ...