Tagged Questions

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

learn more… | top users | synonyms

3
votes
1answer
196 views

Pathfiding for groups of agents

How can we refine this path search method to make group movement more elegant? I'm trying to make a RTS-style game, using a 2d tiled gameworld. I have implemented an A* pathfinding algorithm which ...
1
vote
1answer
1k views

Pygame 2D Scrolling Map

I have currently a pygame program that stores tiles in a 2d list like [[1,1,1] [1,1,1] [1,1,1]] where the 1 is a tile object. I have the character centered in the middle of the screen, and I am ...
-2
votes
2answers
189 views

Transfering a game from Python to C [closed]

I have a simple game RiceRocks which I want to translate into C programming language not C++,because I know C better. I know only basic C++ such as : loops,control statements, arrays. Where to start? ...
1
vote
2answers
331 views

How to implement rectangle selection?

I don't know if there is another term for it, but I mean this: You hold down a mouse button. A rectangle forms when you move the mouse around. The units inside the box get selected when you let go of ...
0
votes
4answers
3k views

smooth movement pygame

Hello im trying to learn more about smoother movement in games. I have created a little program to hopefully help me understand this. As far as i can tell i am suppose to track time, and update ...
1
vote
2answers
422 views

Pygame's rotation methods have crippling issues, but is it me or Python's pygame?

http://www.youtube.com/watch?v=lNJFxvR6ex8&feature=youtu.be On rotate and rotozoom, can't find fixes on these on the internet, anywhere. Basically, the video is showing 4 things in this order: 1. ...
4
votes
2answers
1k views

Pygame set_colorkey transparency issues

I'm having a strange issue that I cannot seem to remedy. I am doing some prototyping with Pygame on a desktop running windows and a laptop running OS X. Both are running python v2.7.3 (installed via ...
2
votes
2answers
190 views

Anybody know how I can write a game for the dualshock 3 or other gampad in python?

I am a new developer and want to write a game that uses a gamepad like the dualshock 3 I want to write it in python although am willing to learn a little C/C++ I need to identify the buttons and ...
0
votes
2answers
161 views

How do I implement unit selection in this program?

I'm trying to implement unit selection on a large, scrollable surface. # Arbitrary values for window size self.w, self.h = 1600, 900 # Game world surface, everything gets blitted to this, which is ...
1
vote
0answers
149 views

Which technology should I choose to develop this fisheye perspective game? [closed]

I'm going to develop a 3D game, that a player walks in a maze with a 3D first-person perspective, collects things and escapes a monster. The game itself is very simple, but as it is not for ...
3
votes
1answer
390 views

Pygame performance issue for many images

I've made a script for generating a game world based off of image pixel data. Trying to make a python map editor My progress so far has resulted in a program which loads an image and draws sprites ...
3
votes
2answers
582 views

2D destructable terrain with collisions in MMO

Task What I want is to create destructable terrain (like in Worms) and collisions with this terrain (with calculated normals) that will be fast enough to work on server machine. Basically lets say ...
4
votes
5answers
588 views

Collision detection performance problem

Using python and pygame I've built a collision detection system according to the instructions in this YouTube tutorial. This is updated 40 times per second and controls movement and collision ...
0
votes
1answer
350 views

Trying to make a python map editor

The program is supposed to read the pixel color values from an image, and use that data as a map for where to place objects in a game world. Getting the color values was easy enough: import numpy ...
2
votes
1answer
94 views

Getting an instance of KX_PolygonMaterial in Blender

I've got a question concerning using Python in Blender's Game Engine. Before I start I want to state that I'm trying to change the color of an object in Blender's game engine. To do this, I'm ...
1
vote
1answer
338 views

Pygame - Change sprite collision Rect

I'm making a platformer in Pygame. One of the sprites I'm using is a flag, and I want to detect if the player collides with the flagpole (just like in Super Mario Bros). The problem is that the image ...
1
vote
0answers
147 views

How can I use iteration to lead targets?

In my 2D game, I have stationary AI turrets firing constant speed bullets at moving targets. So far I have used a quadratic solver technique to calculate where the turret should aim in advance of the ...
2
votes
2answers
599 views

How do I detect multiple sprite collisions when there are >10 sprites?

I making a small program to animate the astar algorithm. If you look at the image, there are lots of yellow cars moving around. Those can collide at any moment, could be just one or all of them could ...
1
vote
3answers
248 views

Multithreading for a mixed-genre game in Python?

So here's the situation. I'm making a game that mixes two genres; arcade shooter and puzzler. They don't intertwine TOO much; all the interaction that really goes on is that every time an enemy is ...
0
votes
1answer
146 views

add collision detection to sprite?

bassically im trying to add collision detection to the sprite below, using the following: self.rect = bounds_rect collide = pygame.sprite.spritecollide(self, wall_list, False) ...
0
votes
1answer
221 views

Using NumPy arrays as 2D mathematical vectors?

Right now I'm using lists as position, velocity, and acceleration vectors in my game. Is that a better option than using NumPy's arrays (not the standard library's) as vectors (with float data ...
-1
votes
2answers
513 views

Online scoreboard in Python?

So my friend and I are working on an arcade-style game in Python and Pygame. We're beginning to look at the feasibility of an online leaderboard, given our current programming backgrounds. Such a ...
1
vote
1answer
162 views

Looking for a library to create a grid based first person game online

Before I go and build it myself, I have been looking for a library that may help making a grid based first person view similar to: https://www.youtube.com/watch?v=GwmZoCFd4Us I plan to make a web ...
1
vote
3answers
521 views

How can I make smoother upwards/downwards controls in pygame?

This is a loop I use to interpret key events in a python game. # Event Loop for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == ...
2
votes
1answer
622 views

Pygame Tile Based Character movement speed

Thanks for taking the time to read this. Right now I'm making a really basic tile based game. The map is a large amount of 16x16 tiles, and the character image is 16x16 as well. My character has its ...
1
vote
1answer
550 views

Pygame Import Error, Python 3.2

I'm having an issue with the Pygame module. I run Python 3.2 and installed the respective Pygame file, but now when I try to import it in the IDLE, it gives me this error: >>> import pygame ...
3
votes
1answer
198 views

How do I create a selection rectangle?

I have a basic prototype working with health, resources and units. The problem is: How do I select multiple units? I have an idea of making an rectangle which dynamically extends with the mouse ...
0
votes
1answer
112 views

Read an object from compressed file generated from ActionScript 3 [closed]

I have made a simple game Map Editor and I want to save a array that contain map tile info to a file, as below: var arr:Array = [.....2d tile info in it...]; var ba:ByteArray = new ByteArray(); ...
1
vote
1answer
300 views

Embedding Pygame to C++ [closed]

If embedding Pygame to C++ to have a game be an executable, is there any extra process I would have to use in order to use Pygame functions when embedding into C++? As opposed to just writing ...
0
votes
1answer
378 views

Python library for scripting (C++ integration)

Please advise me good wrapper/library for python. I need to implement simple scripting in c++ app; Under "good" I mean pretty understandable, well documented, no memory leaking, fast. For creating ...
1
vote
1answer
237 views

Game software design

I have been working on a simple implementation of a card game in object oriented Python/HTML/Javascript and building on the top of Django. At this point the game is in its final stage of development ...
1
vote
0answers
212 views

what space is this Matrix in?

In Blender 2.6 API, PoseBone is used for animating a bone. PoseBone.matrix is one way to do that. API says PoseBone.matrix is in "object space". ...
3
votes
2answers
604 views

Collision library for bullet hell in Python

I am making a bullet hell game in Python and am looking for a suitable collision library, taking the following into consideration: The library should do 2D polygon collision. It should be very fast. ...
5
votes
2answers
1k views

How to render metaballs?

How to render metaballs? I am a Python programmer familiar with the Panda3d and Blender3d APIs. My math kinda sucks, but I know enough to write game logic code and procedural model generation code, ...
1
vote
2answers
340 views

Implementing Online Leaderboards for indie windows PC Game

I've just finished my game and I'd like to add some ranking functionality to it. I have a mySQL database running on my website and want to be able to insert and retrieve data from it. My knowledge in ...
2
votes
5answers
3k views

How do i choose what technology to use for a 2D game like Pokemon? [closed]

I apologize in advance for the wall of text about to come. I've had an idea for a game for a while now, and am stuck at step 1 of game development: Choosing a language/engine. I've read a whole ...
2
votes
3answers
366 views

Publish Python Game

I wrote a Python game in for a group project using Pygame. Now we wanted to package it into an executable but I can't seem to do it. When I was working with C# through Microsoft Visual Studio it had ...
0
votes
2answers
464 views

How to handle multiple game sessions where players turn can timeout, using Python and Socket.IO?

I want to make a multi player card game, allowing several people to play with each other (each game session should be able to have between 5 - 10 players). I'm doing this in Python (Django and ...
2
votes
1answer
457 views

Blending colors on Surfaces in PyGame?

So I'm making a game in Python and PyGame. I have aliens and blocks that each adopt one of several colors; rather than make several copies of them in different colors, I plan on making the sprite ...
0
votes
0answers
439 views

Calculating the correct roll from a bone transform matrix

Read this forum topic for more info: http://blenderartists.org/forum/showthread.php?260602-transform-matrix-to-bone-%28head-tail-roll%29-bug I'm trying to get my Blender3d modeller importer to create ...
3
votes
0answers
259 views

Blender - creating bones from transform matrices [closed]

Notice: this is for the Blender 2.5/2.6 API. Back in the old days in the Blender 2.4 API, you could easily create a bone from a transform matrix in your 3d file as EditBones had an attribute named ...
2
votes
2answers
2k views

2D animation example in pyglet (python) looping through 2 images/sprites every x seconds

Suppose you have two images: step1.png and step2.png . Can anyone show me a very simple example in pyglet how to loop through those 2 images say every 0.5 seconds? The character doesn't have to ...
2
votes
1answer
299 views

Scaling window contents in Pyglet?

I'm trying to scale a window's contents so that every pixel displays at a multiple of it's normal size. Basically I want to achieve larger pixels without scaling each and every individual sprite. This ...
2
votes
3answers
455 views

Detecting Units on a Grid

I am making a little turn based strategy game in pygame, that uses a grid system as the main map to hold all the characters and the map layout. (Similar to Fire Emblem, or Advance Wars) I am trying ...
1
vote
1answer
522 views

Implementing powerups for my Breakout clone

I'm making a simple Breakout clone in Python that will have very many powerups/powerdowns (so far I came up with 26). Some will affect the paddle (paddle missile, two paddles, short paddle, etc.), ...
1
vote
1answer
2k views

Exporting UV coords from Blender

So I have searched on google and various other websites but I've not found an answer. The only ones I did find did not work. So my question is how do I get UV coords from blender (2.63)? Currently ...
3
votes
1answer
222 views

pygame.Rect around circle

I'm trying to make a pong game in pygame, but I can't figure out how to put a ball circle, which I can create with pygame.draw.circle into a pygame.Rect object so i can use the colliderect function to ...
1
vote
1answer
221 views

Pixelated and incomplete image when loading with pygame.image.load

This is the image I'm trying to load on the surface, an 40x40 Ubuntu logo: Ans this is how it looks when trying to show the image on the surface via the blit method: I'm trying to load different ...
5
votes
2answers
730 views

How do I sync entity ids with the server and client?

I'm continuing my experimentation with entity component design by making a multiplayer space/trading/combat game with python and panda3d. My component system is a simple version of java's artimis. The ...
1
vote
1answer
127 views

Drawing over objects occasionally leaving relics behind

I'm drawing a large number of bouncing shapes similar to an old 1990s screensaver. I'm just doing this to study (but not hopework) For some reason my object clearing (simply blitting a black shape ...