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

learn more… | top users | synonyms

0
votes
2answers
133 views

Finding vectors with two points

We're are trying to get the direction of a projectile but we can't find out how For example: [1,1] will go SE [1,-1] will go NE [-1,-1] will go NW and [-1,1] will go SW we need an equation of ...
0
votes
1answer
367 views

Pygame top down shooter firing bullets

I'm working on a top down shooter in pygame and am having trouble getting bullets to fire. I'm using a class for the bullets, I'll show what I think is the relevant code. This is what I do after the ...
0
votes
1answer
186 views

Pong pygame problem

I've been following a tutorial to make my first Pong clone. Here is the tutorial: http://muagames.com/tutorials/pygame-3-pong/pygame-3-pong-step-1/ When I try to run it I get this error message: ...
0
votes
1answer
122 views

How to make healthbar size relative to hp

Like in most games with healthbars, the units in my game have a hp_bar object which is a frame, with a slightly smaller rectangle inside which should get smaller (and change color) as a unit loses hp, ...
0
votes
1answer
1k views

Pygame import error [closed]

When I installed pygame and tried to run import pygame, I got this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
0
votes
3answers
1k views

How to convert .max files to .egg on linux

I am very new to 3d graphics and game engines and panda3d and python. I followed few panda3d tutorials and now I want to test them with few new models. High majority of 3d models in the internet are ...
0
votes
1answer
30 views

WebSockets and Python/PyGame

I am looking to start development on a game that will have the server be written in Python/PyGame and the front end be in HTML5. What I would like to do is, with as minimal impact as possible, open ...
0
votes
1answer
33 views

PyGame2Exe doesn't include spritesheet?

My directory for my Pygame program looks something like this: [Parent directory] lib engine Various .py files graphics spritesheet.py ...
0
votes
1answer
134 views

Texturing a PyOpenGL 3D Cube with PySDL2

So, I've just started learning OpenGL with PySDL2, and I've created a class that will create a cube to the window that I've created with PySDL2. What I'd like to do now, is to figure out a way to ...
0
votes
1answer
146 views

Collision detection without classes, in Pygame

I am writing a game in Pygame and want to get collision detection working. The aim is that when an object hits another, the target object disappears. I want to avoid having classes for now, to keep ...
0
votes
2answers
273 views

Pygame - CollideRect - But How Do They Collide?

I'm having some trouble figuring out how I can handle collisions that are specifically colliding on the top or bottom a rect. How can specify those collisions? Here's a little code snippet to give ...
0
votes
1answer
73 views

Pygame Particle Emitter Problems

so I've been trying to create a basic particle system in pygame which I can later expand upon but I've run into a spot of bother creating the particle emitter. Obviously what's supposed to happen is ...
0
votes
1answer
87 views

PyGame sprite assistance

I've basically just started developing with PyGame and I am having trouble with the whole Sprite concept. I have been looking every where for guides on how to use it, I just can't seem to find any. I ...
0
votes
1answer
958 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 ...
0
votes
1answer
271 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 ...
0
votes
1answer
137 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
318 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 ...
0
votes
2answers
626 views

Detecting if line crosses rectangle in python. Need speed boost

I am currently writing a top down man vs robot shooter. The game works now, but if I have a decent sized level it runs slowly when you are being chased by robots. While just roaming around it can go ...
0
votes
2answers
152 views

Spritegroups and colorkeys

I have a problem using spritegroups in pygame. In my situation I have 2 spritegroups, one for humans, one for "infected". A human is represented by a blue circle: image = pygame.Surface((32,32)) ...
0
votes
1answer
467 views

python for game development [duplicate]

Possible Duplicate: Famous games written in Python Is python any good for game development? Can I have some examples of great indie python games. So I can have an idea what it's capable ...
0
votes
1answer
321 views

Importing python DirectX into c++ DirectX program

I'm not asking for code or anything, just some advice on what to google, because I have no idea what to call this process. I made a video player (with full controls) with python and DirectX and would ...
0
votes
0answers
47 views

How to rotate a line in 3d space?

I am trying to figure out direction vectors of the arrowheads of an arrow. Basically I'm given a normalized direction vector (u,v,w) and I need the normalized direction vectors of the its two arrow ...
0
votes
0answers
39 views

How to find the Y coordinate of a line moving up and down with given specific X coordinate?

I start with a horizontal line and I run midpoint displacement algorithm to generate some mountains, then I want to place some pillars on top of the mountain by randomly choosing the X coordinate, but ...
0
votes
1answer
45 views

Player & Level class structure in 2D python console game?

I'm trying to create a 2D console game, where I have a player who can freely move around in a level (~map, but map is a reserved keyword) and interfere with other objects. Levels construct out of ...
0
votes
1answer
63 views

How do I pass an object location into a vertex shader?

I am using Blender Game Engine. I want to create a large flat plane, and deform it locally near a moving object. So far (despite being a beginner at shaders) I've written a vertex shader for the ...
0
votes
0answers
28 views

Generating map in a numpy matrix

I created object, that with random selects which type of terrain is and which weather it has. That is fine for just one place, but now I want to make it bigger and create a map. I create a matrix with ...
0
votes
0answers
37 views

Figuring out commands of PyMo

I'm trying to develop a game for my mobile phone (runs on Symbian Belle), just something to learn how, not really planning on distributing and I've found a game engine called PyMo (SourceForge main ...
0
votes
1answer
125 views

How does collapsable structures in a voxel based game like Ace of Spades/Build and Shoot work? [duplicate]

I know that once all the cubes that are connected are destroyed, the unconnected blocks collapse. How do you find out the unconnected blocks? edit 1: How would you determine the collapsible object if ...
0
votes
1answer
172 views

Exporting Blender bones' transform matrix

I use this simple python script to export bones transformation: bones = armature.pose.bones # for eaach bone in bones SystemMatrix = Matrix.Scale(-1, 4, Vector((0, 0, 1))) * ...
0
votes
0answers
85 views

Game physics movement

I am trying to write some code in Pygame that will achieve smooth movement from place to another. I've been able to do some nice physics for jumping but when I need to move horizontally I am not sure ...
0
votes
1answer
65 views

How to determine the best approximate direction [duplicate]

I want to determine which sprite to use when one agent is "facing" another agent. My game is 2d, and uses 8-directional movement. Deciding which sprite to use for movement is easy enough since there ...
0
votes
0answers
48 views

How to modify graph ingame?

The pathfinding in my game uses this function to generate a graph: def make_graph(self, size, impassable): nodes = [[astar_gridnode(x, y) for y in range(size)] for x in range(size)] graph = ...
0
votes
1answer
113 views

Pygame Bounding Box at Player Feet

I'm new to python and pygame and am trying to build a very simple "game" (it's more of a test for me to figure things out) in which you move a character around the screen and he can collide with walls ...
0
votes
1answer
161 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 ...
0
votes
1answer
102 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(); ...
0
votes
2answers
397 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 ...
0
votes
0answers
371 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 ...
0
votes
2answers
470 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 = ...
0
votes
1answer
410 views

How do I use setFilmSize in panda3d to achieve the correct view?

I'm working with Panda3d and recently switched my game to isometric rendering. I moved the virtual camera accordingly and set an orthographic lens. Then I implemented the classes "Map" and "Canvas". ...
-1
votes
3answers
2k views

Will I have an easier time learning OpenGL in Pygame or Pyglet? (NeHe tutorials downloaded)

I'm looking between PyGame and Pyglet, Pyglet seems to be somewhat newer and more Pythony, but it's last release according to Wikipedia is January '10. PyGame seems to have more documentation, more ...
-1
votes
2answers
333 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
votes
1answer
253 views

Flixel or Pygame for a small game? [closed]

I have some experience in Bash and Python, Lua. I've always wanted to try and make point & click quest games. Most quest games I loved aesthetically and gameplay wise were made with Flash. So ...
-1
votes
2answers
50 views

Basic Python Question, Working with Function and List [closed]

I'm new to programming and learning Python over the web and I'm stuck on this problem. The objective is to have a list of numbers and create a function that will evaluate that list of numbers and ...
-2
votes
2answers
85 views

Pygame 2d map error [closed]

I'm writing a Legend of Zelda like game in pygame. I have this code for loading a map from a text file. #Load maps f = open ("map1","r")#This file is a text file containing only: 1 map01 = f.read() ...
-2
votes
1answer
102 views

Imports in python [closed]

Recently I downloaded a game off pydev and the imports for it look like this below. import pygame from pygame.locals import * However I have only ever created games by calling the in this way. ...
-2
votes
2answers
183 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? ...
-3
votes
1answer
392 views

Python 3d game engine? 2013? [closed]

I saw another question from 2011 on this, but it's 2013 What's the best 3d Python game engine to learn? Good documentation, cross-platform, good community, continuing development? I looked at ...
-4
votes
1answer
166 views

How good can the graphics get on a game made only with Python? [closed]

Aside from the game being fun, which is the most important, is it possible to make a "good looking" game with it? The graphics I mean. Like Angry Birds. Could that be made in python, looking like ...
-6
votes
2answers
454 views

I want to use Python as a scripting language for my game, can I use it purely with C (not C++)?

I want to use Python as a scripting language for my game, can I use it purely with C (not C++)? It is important to me that I not use C++, and purely use C instead.
-8
votes
1answer
1k views

Alternative to C# and XNA? [closed]

I'm interested in Game Development, I know OOP programming and so, but I never used a Stable Language. My favourite language is Java, but people say that is not a good Game Language, since it can be ...