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

learn more… | top users | synonyms

3
votes
2answers
49 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 ...
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 ...
1
vote
2answers
65 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 ...
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
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
148 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
1answer
544 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". ...
2
votes
0answers
627 views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
2
votes
0answers
175 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 ...
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 ...
1
vote
0answers
82 views

Get original image size in Ren'py

I'm building a visual novel and in one scene, I want to have a couple of different images move from one position to another and change size as it moves. My first position is called "doorway", my ...
1
vote
0answers
120 views

Python interpreter as in-game console

Say I have a game which has lots objects (NPCs, monsters, etc.), I want a console so I can change the variables of the objects (like changing HP for example), how could I embed python into my program, ...
1
vote
0answers
285 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
12 views

Pygame Vertical movement of a comet

I try to make a platform game where comets will collide as the character,this comet must fall from a vertical angle This is my code: # coding=utf-8 import sys import pygame import random pygame....
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 ...
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 ...
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
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
0answers
142 views

My sprites do not always respect collisions in Pygame

I have a Player sprite (40x40 pixels) and Tiles (20x20 pixels) which build the terrain. At the 4 edges there are 2 rows or columns (depends on vertical or horizontal) of wall tiles. Those are the ...
0
votes
0answers
111 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
0answers
717 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 ...