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

learn more… | top users | synonyms

2
votes
1answer
23 views

How to make a moving background with PyGame?

I'd like to create a moving background in my Python game, with an image, that moves up until it reaches the end, then it goes back to its first position. I'm still in my learning process and this is ...
1
vote
1answer
29 views

Select motion path from curve in Maya Python

I need to obtain the motion path attached to a curve in maya using Python. This is the situation as shown in the editor: I want to obtain motionPath1 by calling a method on curve3 since they look ...
0
votes
1answer
51 views

Which language is more proper for game development? [on hold]

I want to make and 2D RPG Multiplayer Game I already have really good ideas but I don't know what programming language should I use. I want to know your opinion, I want something with good library, ...
3
votes
2answers
48 views

Preparing a 2D character to export from Blender to Unity?

I'm an animator for a game currently, and I don't have Unity (can't download due to too much gigs coupled with slow internet,) but the game designer told me I can use Blender to export animations into ...
-1
votes
1answer
33 views

How to make a Infinite Verticle Scrolling Background in Pygame

Is there anyone who knows how to create an infinite verticle scrolling background in pygame? Your help would be much appreciated, thanks in advance!
1
vote
2answers
63 views

Pygame: Collision detection

i've been adding some extra stuff like Gravity and a table to a simple pong game made with Pygame and Python, the problem is that i dont know how to add collision detection, so when the ball hits the ...
1
vote
2answers
84 views

PYGAME: When I release two directional keys together the player keep moving

I did the code this way to avoid the player to stop if a press two directional keys together making the movement more smooth. It works well but when I release two keys or more together the player keep ...
2
votes
1answer
259 views

pygame for python 3.5

I am running python 3.5 and I want to install pygame, the website only supports up to version 3.2. I have tried a few forums on this and other websites but they are all for python 3.4. Does anyone ...
2
votes
2answers
1k views

Detecting walls or floors in pygame

I am trying to make bullets bounce of walls, but I can't figure out how to correctly do the collision detection. What I am currently doing is iterating through all the solid blocks and if the bullet ...
0
votes
1answer
22 views

How to set size fairly

I had coded a simple click game with Python-kivy to android. You should click dots which are popping out randomly at screen. I set their size 20px to 60px as your level. But it seems when I try on ...
0
votes
1answer
147 views

Pygame wall collision is acting very odd

I've been playing around with python for a while, but I only did basic functional programming. Lately, I've been teaching myself about classes. I've been using pygame (instead of tk, because let's ...
0
votes
0answers
11 views

Object freezes in the air when using Panda3d collisions

I'm trying to make a simple box fall to the ground in panda3d (1.10) This is the code I have so far: from direct.showbase.ShowBase import ShowBase from panda3d.core import * from panda3d.physics ...
1
vote
1answer
47 views

How do I update individual sprites within a spritegroup in pygame?

I have a for loop that takes values from a text file, and then creates and adds a bunch of sprites to a group platformlist_list. The for loop will continue until every line of the text file is read. ...
2
votes
1answer
49 views

Pygame time.get_fps() value

I was looking at the pygame.time.Clock.get_fps() method and after puting it inside of the while loop printing and checking it some times, i see that i starts to give its value after five frames (and ...
-1
votes
3answers
165 views

A python script controlling a Unity game

I wish to build a simple game in Unity such that the objects in the game can be controlled via a Python script (or a code in any other programming language). Is this possible? If yes then how? If no ...
1
vote
0answers
91 views

Rendering thousands of circles in pyopengl

I am interested in rendering animated 2D vector graphics in python using PyOpenGL. As an initial test, I am trying to render thousands of pixel-perfect circles drawn using shaders. Here is the current ...
0
votes
0answers
32 views

How To Point An Object At Cursor? [duplicate]

I'm trying to make a Nuclear Throne like game in python 3 and pygame, but I got stuck at how to make the gun point at the cursor. If someone could show me how, that would be great. :D I looked at the ...
-1
votes
1answer
29 views

How To Extract A File In A Relative Location With Python? [closed]

I'm trying to extract a file with python 3(for my game launcher), and this is the code I'm using: import zipfile f = open('filenamehere.zip', 'rb') z = zipfile.ZipFile(f) for name in z.namelist(): ...
4
votes
2answers
99 views

Line Collision In Pygame?

I am working on a game(a platformer) that is physics and momentum based. I want to make it so that the player(a single dot) can bounce off of the lines with correct physics, but to do that, I need to ...
0
votes
2answers
91 views

Rotating hitboxes in pygame?

I'm using pygame.rect.colliderect() to check hitbox collision between sprites in my game, but now that i'm rotating the sprites, I'm realizing I can't do this because there's no way to rotate a pygame ...
-1
votes
1answer
304 views

Add Boo or Python to Unity 5

I'm new to Unity , but I'm more comfortable with python , Is there any way to use python for scripting language in Unity 5 ? I heard there is some language called Boo that is syntax liked python but ...
0
votes
1answer
47 views

How can I take a screenshot of a certain part of the screen in PyGame?

I need to for my pixel art tool that I'm making to help myself make games.
0
votes
1answer
57 views

How to figure out which tiles are within view, and where to draw them in the grid

I know there are a few questions on here similar to mine, but none of them seem to fit my needs. I'm using pygame to implement a tile based game similar to final fantasy or zelda from the early ...
0
votes
0answers
39 views

Pygame image blitting makes game lag

So I have a tile-based game that is 216X384 units large. Each square in the cell_array is grass, which I pre-loaded with convert_alpha(). Each time it draws (I have fps at 30), it cycles through the ...
1
vote
2answers
82 views

Adversarial Search AI having problems with too many choices

I'm a game designer working with a set of coders trying to create a card game. Currently we're trying to implement a drawing mechanic in which you choose which card you draw, but the Adversarial ...
5
votes
1answer
29k views

Pygame for python 3.5?

I just got Python 3.5 from... LINK: https://www.python.org/downloads/windows/ previously i had Python 3.4 and the Pygame version 1.9.2a0. It worked perfectly. However, my the new Python 3.5 isn't ...
0
votes
2answers
68 views

How do i approach these inheritance problem? (Pokemon Gen III) [closed]

I'm currently making a Pokemon clone on Python just for the heck of it. After fiddling a bit with some GBA ROM editing tools, i've found out that on these games there are, among other things: Events ...
-2
votes
1answer
87 views

Python: Programming a game GUI [closed]

I'm looking for some suggestion on books or tutorials to make a game GUI with inventory management, map , stats... in python, as this is the only language I know a bit of so far. I want to design it ...
3
votes
2answers
1k views

Does it make sense to use Lua scripting in a game developed in Python? [closed]

Well for C++ written games using Lua scripts for easy changing ai, quets etc is very reasonable and it's common. However now I'm going to write a game in pure python and I don't know if I should use ...
4
votes
2answers
246 views

How to implement a mechanism to select language specific expression (python)?

On a game server, programmed in python, I want to be able to select language specific expression, according to the user's preference. Provided a 'name tag' and a 'language identifier' I want a ...
-1
votes
1answer
128 views

How to create a seemingly infinite text-based map in Python

I am looking to create a text-based map in which a player could (hypothetically) move through out infinitely. I was thinking I could do this through class objects defining towns / dungeons / etc. and ...
20
votes
3answers
2k views

How to structure code for many unique weapons/spells/powers

I'm an inexperienced programmer creating a "roguelike-like" game in the vein of FTL, using Python (no PyGame as of yet as I'm still only concerned with text). My game will contain a large number of ...
2
votes
2answers
86 views

How should I efficiently store faction relationships?

I'm working on a game that follows the life of a powerful magician as she lives, dies, and reincarnates dozens of times across hundreds of years. Meanwhile, empires rise and fall around her--she can ...
1
vote
3answers
105 views

Ways to track time and character ages across many years of game time?

I'm working on a system to track large numbers of characters across long periods of time. Characters grow old and die, give birth to new characters, etc. It's a grand-strategy game, with warring ...
2
votes
3answers
372 views

shuffle a sprite group

Is there a way to shufle a group of sprites created with: pygame.sprite.Group() I have tried using random.shuffle but it apparently doesn't work on sprite groups.
2
votes
4answers
1k views

sprite group doesn't support indexing

I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method) How would I retrieve the nth sprite in this group? Code like this does not work: mygroup = ...
2
votes
1answer
133 views

Collision detection with PyGame

I have been making a 2d platformer using Python with PyGame. It has all be going good, but I have stumbled accross many problems with collision detection. Here they are: You can't go through objects ...
0
votes
3answers
582 views

Python mini RPG enemy movement. (how to have two infinite loops running at the same time)

I have a problem with my RPG. I want enemies to wander randomly. So I put: enx_speed = random.randint(-2, 2) eny_speed = random.randint(-2, 2) in the main loop (while true:). However, that loops ...
0
votes
1answer
36 views

Pygame.display.set_icon unable to show transparecy

On Python 3.2.5 32 bit, I installed pygame. I made some code with it. It included pygame.display.set_icon(image). The image file is .png and I loaded it by using image = pygame.image.load("clockico....
2
votes
1answer
147 views

What Is A Good Way To Make A Self Updating Game? (Python) [closed]

I've been making games and I have always had a problem if I wanted to sell a game. People would have to re-buy games to get the updated version. Does anyone have any ideas on how to make a self ...
1
vote
1answer
209 views

Implementing Shadow Mapping in Python and OpenGL 2.1

I am trying to create a little shadow mapping demo. My code is currently divided into three rendering passes: Pass 1 - Create the depth texture that will be used for shadow mapping on an offscreen ...
1
vote
1answer
161 views

How can I change the anchor point of a Pyglet sprite?

while trying to make my game, I noticed that you can't change the anchor point of Sprites in pyglet. I use some convoluted way(see bottom of the post) to draw my minimap(WIP) so that the rooms are ...
0
votes
1answer
55 views

Python: Character name and raw_input [closed]

I have a few lines of code here for Python: # Asks for a name def CC(): print "..." tick.clock(3) print "Welcome...\ What is your name, scared one?" name = str(raw_input("What is ...
5
votes
1answer
786 views

How to march tiles together like in Terraria?

I've been trying to get tile marching to work like in Terraria, and I got something to work. I don't think it's actually very good way of doing this, so I'm wondering what would be really the main way ...
-5
votes
1answer
66 views

New to game development [closed]

I have some programing experience, and I have tried making some games. I have some knowledge with c#, but I am much better at python. I have a general code structure knowledge, so I am open to learn ...
0
votes
0answers
18 views

Spritesheet trouble / code review

http://stackoverflow.com/questions/34563084/spritesheet-trouble-code-review If the player presses right, i have an image of a guy facing right. Left, up, and down same concept. if he holds the button,...
0
votes
1answer
44 views

Remove bullets from sprite Group

I'm having an issue with removing objects from a sprite Group. What is happening is I have a bullet class and every time the user presses the player shoots a bullet. I have 'alive = bool' code and ...
0
votes
0answers
40 views

How can I make bullets go to the cursor in Pygame properly

So hey, I'm new into making games and programming at all, I tried to make a small game thingy in Pygame that would include a dude shooting bullets and stuff. However, I can't really get the shooting ...
0
votes
1answer
41 views

Pygame making Snake, need help with generating fruit with a random color

This is my function for generating an apple, I want it to generate a random color each time the snake eats it. def AppleGenerator(): fruit_colors = [crimson,powderblue,yellow,hotpink,...
1
vote
1answer
230 views

Speeding up point-in-polygon for Python

In researching collision detection methods for non-Rect-like objects I came across point-in-polygon -- specifically, the even-odd rule. The one presently on Wikipedia claims it is written in Python, ...