pyglet

Pyglet working only with installed fonts?

Pyglet working only with installed fonts? Question: This program uses Tkinter and I’m trying to display text using a custom font that is not installed on my Windows machine, since other users certainly will not have this font installed as well.. I’ve tried to use pyglet but it only works when the font is installed.. …

Total answers: 1

Why is Pyglet adding random pixels to my window width/height?

Why is Pyglet adding random pixels to my window width/height? Question: Im trying to make a simple gif cropping programme using pyglet. It works perfectly on the first gif that gets loaded by the programme, in that the window is the exact size of the gif and the rectangle being used as the cropping shape …

Total answers: 1

planets created from 1d perlin noise terrain look weird

planets created from 1d perlin noise terrain look weird Question: i am trying to make planets using pyglet but they end up looking like stars result here is my code also i need a way to convert a batch to a sprite (to move it easily) import pyglet from pyglet import shapes import opensimplex import …

Total answers: 1

Why python tries to use directly Alsa as a sound output?

Why python tries to use directly Alsa as a sound output? Question: I’m using Ubuntu 20.04.5 LTS When I try to play sound with pygame or pyglet, it plays it normally. However, when my computer is playing sound from any other source, I just get error Here is the pygame version from pygame import mixer …

Total answers: 1

How do i draw an image from an array in pyglet

How do i draw an image from an array in pyglet Question: I working on a voxel engine based using raycasting. But i need a way to display my frame who is a nested list like that (100x100x3). The only idea i had was to create an image in pyglet using pyglet.image.create(width,height) and to next …

Total answers: 1

Why are pyglet.image and texture so heavy?

Why are pyglet.image and texture so heavy? Question: Envrionment: python: 3.6.6 pyglet: 1.3.2 Here is my code and results: import pyglet images = [] textures = [] with_textures = True count = 10 for x in range(count): image = pyglet.image.load(“big.png”) # 2.1 Mb source 2400*2400px images.append(image) if with_textures: texture_grid = pyglet.image.ImageGrid(image, 10, 10).get_texture_sequence() textures.append(texture_grid) # …

Total answers: 1

Low frame rate, possibly because un-accelerated graphics

Low frame rate, possibly because un-accelerated graphics Question: So I began creating a game a couple months ago using pygame, it has a top view similar to Starcraft, Age of empires etc… I have written around 1320 lines of code to create the basis of my game; however, I am experiencing issues with frame rate …

Total answers: 1

How to pan and zoom properly in 2D?

How to pan and zoom properly in 2D? Question: All I want to do is create a really simple pan and zoom feature in 2D with OpenGL through pyglet. As you can see, the zooming is working perfectly after the first jump:( Then again, the dragging (panning) is also working, but it also jumps (and …

Total answers: 3

how to play wav file in python?

how to play wav file in python? Question: I tried pygame for playing wav file like this: import pygame pygame.init() pygame.mixer.music.load(“mysound.wav”) pygame.mixer.music.play() pygame.event.wait() but It change the voice and I don’t know why! I read this link solutions and can’t solve my problem with playing wave file! for this solution I dont know what should …

Total answers: 5