Questions tagged [pygame]

a cross-platform python framework including graphics and sound libraries for designing video games.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
1k views

Why won't pygame play sound over Bluetooth when everything else works?

I having trouble getting a program I've written using the pygame sound mixer to play sound to work over Bluetooth. The program is able to work correctly over HDMI audio. The Raspberry Pi has no ...
1
vote
0answers
68 views

pygame small screen missing mousecklicks

I am using a small 2.4" touchscreen with a resolution of 320x240 and I am working with pygame to create a GUI. Strangely I am not recording any mouse click between y position 26 and 35. The problem ...
1
vote
1answer
289 views

Add Touch Mode feature to Minecraft Pi

I have Raspberry Pi 3 Model B+ with 5 inches Display with touchscreen for my challenge [Display works successful!]. I am using Debian Raspberry OS. I am on the file in /home/pi/mcpi/api/python/mcpi/...
1
vote
1answer
88 views

Raspberry pi zero arduboy

I saw the arduboy some time ago and got quite interested in it. I'd like to know if it is possible, through some kind of os, to make something of the sort with a raspberry pi zero w(make my own games ...
1
vote
0answers
307 views

c310 logitech webcam not closing properly in pygame code

I'm accessing my c310 logitech webcam in python with pygame in an attempt to take pictures and save them. My final goal is to take a new picture every minute for 24 hours to make a timelapse. Here is ...
1
vote
0answers
257 views

Incorrect Pygame touch events from Raspi Display without startx

I have a Clock / Weather / MPD client PyGame application that runs on a Raspi3 with an official Raspi Touchscreen. The app works fine when executed under startx. When started from the command line, ...
1
vote
0answers
291 views

Run brushless motor with esc

I have looked all over the internet on how to run a brushless motor with an esc through RPi.GPIO and have no results. I have tried simply wiring the esc as it is supposed to be and programming it ...
0
votes
0answers
19 views

Playing audio on Bluetooth speaker using pygame

I know there are already posts related to this question, but there aren't any I can find that have worked for me. I am attempting to get an iHome B66 Bluetooth speaker to play sound coming from my ...
0
votes
0answers
25 views

Using Motion Library with pygame.camera

I have a python file that works standalone to take a photo, then post it to an api, but I want this file to be run when motion is detected on my livestream using on_event_start. The file begins as ...
0
votes
0answers
15 views

Bind pygame surface to dispmanx element

I have managed to create a dispmanx element from a python script. I want to write text on this element. I can do it with pygame, but pygame does not provide layer feature. I need this feature for ...
0
votes
1answer
52 views

Draw something over omxplayer

I am playing a video with OMXPlayer in fullscreen mode. What I want to do is to draw something. I want to see my video by transparency. I have tried with pygame, but I cannot see both videos and ...
0
votes
0answers
54 views

Is there a way to loop through GPIO pins and a database in python

I have built a set of musical stairs using raspberry pi, motion sensors and python, and a web app to change the instrument using PHP. The python connects to a mysql database storing the instrument ...
0
votes
0answers
100 views

Python, pygame.mixer, wait for track to end

A little stuck on the last part of this code. I want a random track to play until the end when a switch is switched. I would like the track to play no matter how many times the switch is switched ...
0
votes
0answers
26 views

Raspberry Pi pygame play music

I want to play sound on raspberry pi with pygame, it doesn't work on terminal. Later I tried with thonny python ide, it is working but I need it to play on terminal, what can I do?
0
votes
0answers
41 views

No available Audio Device after switch from NOOBS to Raspbian Stretch

my program uses Pygame to play sounds. I used Noobs before and my program worked fine in Thonny. Now, i switched to Raspbian Full Stretch and now I get the error No available Audio Device. I already ...
0
votes
0answers
22 views

Which screen size in Pygame for an 3.5 inch LCD?

i try to fill out my whole LCD screen in Pygame with the best sharp resolution possible. So there is a difference between computer screen and the LCD. My LCD has resolution is 480×320. So choosing ...
0
votes
0answers
27 views

How to send data across usb0 to use in pygame?

So i have a pi3b+ and a zero hooked up to a tft ili9341 display. I can run pygame on boot and it works fine. I have also started using python sockets and successfully sent data (my wlan0 ip) from my ...
0
votes
0answers
33 views

PyGame GUI hidden by program

I am working on creating a graphical program to display two lines of text (a big message and a small message) on my Raspberry Pi Touchscreen using the module pygame. In the basic terminal, I can pass ...
0
votes
0answers
195 views

photobooth, gphoto2, pygame, problem with saving pictures

Hello recently i downloaded photobooth script that I want tweak a little bit to suit my needs and I tried to edit. #!/usr/bin/env python # Created by br _at_ re-web _dot_ eu, 2015-2016 import os ...
0
votes
0answers
529 views

Running pygame without X results in stuck black screen

I'm trying to run a Pygame app without using X. I have a Raspberry Pi 3 with raspbian Jessie installed with very few modifications. The script I'm trying to run is the following: #!/home/pi/.env/bin/...
0
votes
1answer
2k views

Cannot get pygame to open a wav file

I copied this program from a previous reply on this site: import pygame pygame.mixer.init() pygame.mixer.music.load('beep.wav') pygame.mixer.music.play() while pygame.mixer.music.get_busy()==True: ...