Python-Forum » Game Development
458 FOLLOWERS
Python-Forum is a place to post questions regarding Pygame, Pyglet or general game logic. This category of the forum is for asking game development related questions, tutorials, applications, and more.
Python-Forum » Game Development
6d ago
The problem is that after the bird loses one life, as well as after restarting the game, the pipes do not disappear, so the bird remains in the same place where it collided with the pipe, and the user cannot continue the game, because a new collision is immediately initialized.
import pygame
import random
from user import create_user, get_user_by_nickname, get_user_by_mail, update_coin_collections, create_achievement, update_achievement, get_achievement, connect_db
pygame.init() # Ініціалізація Pygame
# Визначення розмірів пташки
bird_width = 50
bird_height = 50
# Завантаження зображень
b ..read more
Python-Forum » Game Development
2w ago
Hi,
I'm trying to add mouse control for the character in a Space Invaders clone whose code I found online.
Determining the X position of the mouse pointer (event.pos[0]) works, in line 278 I pass this to the function
"spaceship.update(event.pos[0])".
The error occurs in line 242, see error message.
I don't understand the error message, because I specified "pos" on line 75...
When I move the mouse, the program crahses...
I tried very long and don't know the reason for the error.
Thank you very much for your support!
Traceback (most recent call last):
File "D:\Daten\aktuell\sinvaders\main.p ..read more
Python-Forum » Game Development
1M ago
I need to detect solar radio bursts using python. The spectograms are in .fits file. Cansmash kartsanyone help me to brainstorm the methodology to do this? As far as I know, firstly I need to do preprocessing image which consist of background subtraction and noise cancellation. Then, I need to build an algorithm that can detect the burst in the image. But how ..read more
Python-Forum » Game Development
1M ago
Path of Exile Currency
Path of Exile has a complex and unique currency system. The majority of functional currency items are orbs that can be traded between players, fostering a player-driven economy. Players can use these currency items to socket skill gems, access high-level maps, and alter their character’s passive skills.
Divine Orbs are a common currency that can be used to re-roll the values of modifiers on an item. They can drop from monsters, or be earned by opening chests or destructible containers in maps.
Basic currency
The basic currency in Path of Exile is used to trade and ..read more
Python-Forum » Game Development
2M ago
Hello,I'm new to python and I'm starting to study it,but I have this code that it's been used to unpack a certain compressed file.
This file needs to be compressed back If I want to apply my changes to a game,so I'm trying to understand how I can make it so that instead of decompress,it does the opposite.
Is it possible to revert this code?
If someone can help me through this I would be very grateful,thanks.
Code is attached.
DeobfuscateGameBootstrap.py (Size: 2.69 KB / Downloads: 7)
--------------------
import sys
def DeObfuscate(pInput, pOutput):
inpOffset = 0
out ..read more
Python-Forum » Game Development
3M ago
Hi there!
I'm interested in creating an isometric game using Pygame, specifically with isometric movement on a map created with Tiled. I would like to achieve something similar to this:
Additionally, I would like to implement collision detection between two objects within the isometric grid.
Thank you ..read more
Python-Forum » Game Development
4M ago
I'm relatively new to python and I'm currently following a tutorial for a fighting game in pygame, but i want to add my own changes and additions. I'm trying to add a shooting function, but i have no idea how to go about it. I've seen the list method but don't know how to implement it because my game uses a player class and a main function, and i want to be able to assign the function to a button press.
Even Cooler.py (Size: 2.35 KB / Downloads: 5)
Player.py (Size: 6.75 KB / Downloads: 5 ..read more
Python-Forum » Game Development
4M ago
Hello, I am a high school student and I have a problem displaying my images on my screen. I would like my game board to be placed in the middle and the menus to be displayed on the sides of the board, all in full screen, or even windowed if possible. I tried different things, but I was unable to display my image correctly , although it should be able to fit on the screen (it measures 900*900 pixel) ... Do you have a solution?
Here is my code :
https://www.mediafire.com/file/zpi4pizme...9.zip/file
This is the best result I had ..read more
Python-Forum » Game Development
5M ago
The game ends even though player did not touch the enemy in this code.
I do believe there is a problem with collision or with the image size of player and enemy, can anybody help me with this?
---
import pygame
import random
import sys
from pygame.locals import *
pygame.init()
screen_width = 1280
screen_height = 720
screen = pygame.display.set_mode((screen_width, screen_height))
clock = pygame.time.Clock()
player = pygame.image.load("C:/Users/USER/Downloads/Player.png")
player_size = player.get_rect().size
player_width = player_size[0]
player_height = player_size[1]
player = pygame.t ..read more
Python-Forum » Game Development
5M ago
Kind regards, for the first time I'm trying to experiment with Python to create game situations, I get the black game window but apparently I get no errors, it could be an indentation error? what is the problem?
import pygame
import random
import pygame.mixer
# Definisci la larghezza e l'altezza della finestra
WIDTH = 1200
HEIGHT = 800
# Inizializza pygame
pygame.init()
# Crea una finestra di gioco di dimensione WIDTH x HEIGHT
screen = pygame.display.set_mode((WIDTH,HEIGHT))
pygame.display.update()
# Crea un titolo per la finestra
pygame.display.set_caption("Bersagli mobili")
# Crea un orolo ..read more