Skip to main content

Questions tagged [python]

Python is a dynamically and strongly typed programming language that encourages readability.

Filter by
Sorted by
Tagged with
0 votes
0 answers
466 views

I've recently been experimenting with Python and PIL to generate heightmap images using simplex noise. The generated heightmaps are simply 2D numPy arrays with height values ranging from 0-1. I ...
Sad Strawberry's user avatar
0 votes
1 answer
432 views

I'm looking at the impressive video about verlet integration. I managed to implement a sphere falling, exactly like the video up to the minute mark 2:19 in the video. I want to use velocity verlet ...
nammerkage's user avatar
0 votes
0 answers
197 views

I am making my own pygame game, but I want to reduce the size of the player's hitbox in order to make dodging bullets easier. ...
Kai van Loon's user avatar
1 vote
1 answer
86 views

I am trying to code my first 2d game with physics (in python), and so far my physics simulation works with solid bodies. I want to add connections, for example, so the player can rotate an arm and ...
Alexei Tsybyshev's user avatar
0 votes
1 answer
56 views

I have an NPC class with a DialogueTree object as a field. DialogueTree objects are ...
Michael Moreno's user avatar
0 votes
1 answer
663 views

I'm going through a tutorial and trying to build a game using Python and struggling to resolve below error. Not sure what I'm missing here can someone help with it Alien_invasion.py ...
user14932992's user avatar
0 votes
3 answers
2k views

I know I can use ONNX plugins to use pretrained Deep Learning models in Unreal Engine 5, like style transfer, object detection, etc. I want to build a basic reinforcement learning project and would be ...
Devanshu's user avatar
0 votes
1 answer
974 views

Goal, Description & Scope (when encountered issue) I was building a testing script to see how implementing different ideas (event handling, update handling, draw method) to loading sprite images, ...
DracoDaine's user avatar
0 votes
1 answer
240 views

I am creating a game with Pygame but my collisions are registering too soon. I'm using this code to end the game when the player collides with a pipe: ...
Shantanu's user avatar
0 votes
0 answers
24 views

I need to be able to find out which tiles are intersected when a line is drawn between two points. I'm currently working with a isometric perspective which makes things a little more complicated. I've ...
Zoler1337's user avatar
0 votes
1 answer
227 views

I'm working on a Tetris clone. When I clear a line, my code does this: I want to move the squares down + 1. My code is: ...
tony_ramos.98's user avatar
0 votes
0 answers
85 views

I recently programmed a game in Pygame and added a text box (which I made using pygame_gui) which will send data directly to a MySQL database. But whenever I type ...
cupbord's user avatar
0 votes
0 answers
444 views

...
hasan abbas's user avatar
0 votes
0 answers
45 views

When I run it, I get: ...
s3246's user avatar
  • 1
1 vote
2 answers
1k views

I am new to computer graphics and am trying to make a simple little game where I can move a cube around with the keyboard. I have it so you can rotate the cube with the arrow keys, and I wanted to ...
Joe's user avatar
  • 13
0 votes
0 answers
91 views

I'm making a driving game in Pygame, and want to give a player the option to send game data to a Forza-compatible dashboard app (like SIM Dashboard) or to an OBD app (like RevHeadz). How do I do so? ...
s3246's user avatar
  • 1
2 votes
1 answer
5k views

I'm coding a custom engine using Python and Pygame. It's a top down 2D isometric RTS and I wan't to implement pathfinding for my units. My research has lead me to using a Navigation mesh which seems ...
Zoler1337's user avatar
0 votes
0 answers
149 views

I am currently working on implementing a pathfinding module for my 2D game engine that I am writing in Python using Pygame. Currently there are objects such as trees or buildings which can be placed ...
Zoler1337's user avatar
0 votes
0 answers
34 views

I'm trying to move a spacecraft across the screen. The craft is drawn with this function ...
Void Spider's user avatar
0 votes
1 answer
66 views

I'm using the arcade library, and this script keeps crashing. I think it's my function but idk. Definitely the script, I've run it from two IDEs and the file explorer and every time it shows a black ...
Void Spider's user avatar
0 votes
1 answer
2k views

I recently wrote a program where I needed to limit the fps. After some searching I found a way via pygame built-in methods pygame.time.Clock() and ...
anathrax's user avatar
0 votes
0 answers
103 views

I am trying to write a game with artillery mortar fire I have another gun adjusting & firing towards the mouse, but would like to switch weapons. I am having problems with how to fire a shell up ...
Tomjtp's user avatar
  • 1
0 votes
1 answer
95 views

I would like to use pybox2d's Framework class to visualize the simulation. However, the default screen / windows size is 640 x ...
Gilfoyle's user avatar
  • 111
0 votes
2 answers
2k views

I'm thinking about developing a scalable real-time online multiplayer game. it would be an online 2D battle game. I'm an experienced software developer but this is my first experience in game ...
m.Khaki's user avatar
0 votes
1 answer
79 views

I would like to create two objects of different density and (inelastically) weld them perpendicular together, so that the final object forms an L. Afterwards, I want to be able to assign a position ...
Gilfoyle's user avatar
  • 111
0 votes
1 answer
368 views

I'm using pygame and trying to create an animation by going through a list of variables: self.image = self.walk_right[self.index] I have loaded the images into ...
jacko_123's user avatar
2 votes
1 answer
740 views

I am writing code that requires me to find all points within circle on certain parts of the screen hundreds of times per frame. I wrote a quadtree for this and have 1 method called query_circle that ...
Aayush's user avatar
  • 67
0 votes
0 answers
933 views

I am trying to build a game in pygame, however any movement feels laggy. Its not a big lag but more like a small stuttering. I created a boiled down version to showcase this. The code in the git below ...
Ogorf's user avatar
  • 1
3 votes
1 answer
4k views

I am making a Bloons tower defense game and I came across a problem with regards to collisions. The way my code currently works is all the current bullets on the screen(could be potentially thousand) ...
Aayush's user avatar
  • 67
1 vote
1 answer
177 views

I am coding a Bloons Tower Defense Game and one of the problems I have is how to shoot a projectile from a tower and have it hit a balloon that is moving along a certain path. The way I am currently ...
Aayush's user avatar
  • 67
0 votes
1 answer
803 views

I'm trying to make a dialog box with pygame, and initially everything was going well. I printed the letters sequentially on the screen and it works very well in a single line of text, but when I use <...
Furkan125's user avatar
0 votes
1 answer
227 views

I'm trying to programmatically convert the largest mipmap of a 32x32 DXT5-compressed VTF file to a PNG. Here is what the image should look like after conversion: And here is what mine looks like: ...
noG23's user avatar
  • 1
-1 votes
2 answers
95 views

...
kot may's user avatar
1 vote
1 answer
2k views

I am trying to make some games using classes. But I got a problem when trying to make the ping pong game. I made 2 paddles and a ball but I just do not understand how should I make the collision ...
beWiNN's user avatar
  • 15
0 votes
1 answer
586 views

I'm really new to this community. I'm sorry for any mistakes in advance.I'm making a game like minecraft with GLFW and OpenGL. The problem is, I just can't render a VBO while I update it from another ...
N3RDIUM's user avatar
  • 53
0 votes
1 answer
329 views

I'm making a settings menu for my game, and would like to know if it is possible to play a sound every time a value of a scale is changed. For example, the user changes the scale from 1 to 2, a sound ...
CodeWizard777's user avatar
0 votes
0 answers
291 views

I'm trying to make a game where the player has to dodge asteroids coming, and I'd like to display the lives. I looked up some tutorials and decided to settle on pygame.freetype. When I run the code ...
CodeWizard777's user avatar
0 votes
1 answer
503 views

I have a game where the player has to dodge asteroids coming towards it, and I would like to incorporate a life system. Unfortunately, when I tried this, it still killed my player immediately. I ...
CodeWizard777's user avatar
0 votes
1 answer
744 views

I'm making a game with pygame and I wanted to add a background for my game. I'm trying to add a 1920x1080 background to a 1920x1080 screen, but part of the background is not visible. My code: ...
Furkan125's user avatar
0 votes
1 answer
1k views

Every time I press the left or right arrow keys it moves a little however when I wiggle the mouse around while pressing the keys the player flys across the screen for no reason. I'm following ...
CS-Jai's user avatar
  • 1
-1 votes
1 answer
52 views

In a 2d game, I am trying to shoot at a moving enemy and the vehicle that is shooting is also moving. However, the velocity of the bullet is not in the same direction as the position of the enemy. The ...
Karim Osama's user avatar
1 vote
1 answer
131 views

Currently I'm developing a RTS game using Python/PyGame and I got some problems with fps drops when there are many units on the screen. Using Snakeviz profiling I found out that the function ...
Zoler1337's user avatar
1 vote
1 answer
117 views

I would like to build something that allows me to obtain potions using two identical lists of ingredients. ...
Pitto's user avatar
  • 257
1 vote
2 answers
4k views

Is there any framework or method that will allow to use browser to run a 2D game made in python with pygame graphical library?
GKozinski's user avatar
  • 133
0 votes
1 answer
95 views

I've been looking into making a small game where you would walk around and do puzzles (perhaps do some combat if I can get the basic framework going). So far, Googling for general game patterns used ...
Oleg Pittman's user avatar
1 vote
0 answers
2k views

I'm trying to make an as realistic as possible ball physics simulator. Currently, I worked out all the collisions between balls, and it works really well when there are few balls. But once you create ...
DaNubCoding's user avatar
1 vote
1 answer
6k views

I am trying to work out how to detect and resolve collisions between moving sprites in pygame, I followed the logic of this video: https://www.youtube.com/watch?v=VpSWuywFlC8 The basic idea is that I ...
Another_coder's user avatar
0 votes
1 answer
188 views

My goal is to figure out if a point exists within a 3D polygon. To do this here is what I am doing: Load obj mesh ...
joethemow's user avatar
  • 101
0 votes
1 answer
329 views

Basically, I'm doing a game for a school project and I am not really sure how to make a player point towards the mouse pointer in a pygame tab. also if anyone has ideas of how i could point a bullet ...
luckee365's user avatar
0 votes
0 answers
949 views

I'm making my first isometric game in Python using Pygame. It's a 2D tile-based dungeon crawler, but I want to create a nice lighting system. I've made a random level generator that creates the rooms ...
Forsaken_Knight77's user avatar

1
2
3 4 5
13