Python is a dynamically and strongly typed programming language that encourages readability.
2
votes
1answer
143 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 ...
0
votes
1answer
30 views
Getting collision detection in Pygames
I am writing a game in Pygame, I want to get collision detection. The aim is when a object hits another, the target object disappears. I want to avoid having classes and just have my code class less ...
-2
votes
2answers
56 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
80 views
How can I get post-processing effects with pygame?
I'd like to be able to make the screen like blurry and wavy, like when a player enters a portal in Minecraft.
How would I make this with pygame?
0
votes
1answer
63 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 ...
1
vote
2answers
95 views
Sprite erasing text in Pygame
I'm making a Pong clone in which the user can press the 'p' button to pause/unpause the game. When the user presses the 'p' button the word 'PAUSE' is drawn to the screen and when he presses again the ...
1
vote
2answers
119 views
Monster attack is not randomising right [closed]
I have a code that I've been messing around with and the monster attack (monster.ma)
isn't randomising after the first time it's called upon (elif statement). I've tried to make it a tuple since they ...
0
votes
2answers
60 views
Crossfade Between Two Music Tracks in Pygame
My intention is to have two music tracks, which are similar in nature, fade between each other at various times. When such a fade occurs, one music track should fade from full volume to muted in a ...
0
votes
1answer
62 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
1answer
103 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
91 views
Can you use python, c and c++ in udk without plugins?
Im pretty new to game engines and i was wondering if I could use python, c and c++ in udk. I've tried getting the answer all over the internet but the answers i do find aren't very clear. So am i ...
-4
votes
1answer
124 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 ...
1
vote
1answer
93 views
How to get the angle to an object from angle you are facing [duplicate]
I am making an creature simulator where the creatures have a neural net for a brain.
One of the inputs to the net is the angle it has to travel to go to be facing the nearest piece of food. I can get ...
3
votes
1answer
235 views
How do I use more than 32 textures in my game?
I'm building a game in OpenGL, relying on shaders as much as possible because python. However, I think I've been working under a misunderstanding of OpenGL since I started.
I've abstracted stuff into ...
1
vote
1answer
27 views
Mobu: Motion Files Naming Scheme for Unity
When exporting takes as several fbx files in Motionbuilder 2014 with File > Motion File Export..., the files are named like so:
file_Take1.fbx
file_Take2.fbx
file_Take3.fbx
In order ...
0
votes
1answer
52 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 ...
1
vote
0answers
103 views
pygame double buffering
I am trying to use double buffering in pygame. What I'm trying to do is display a red then green screen, and switch from one to the other. Unfortunately, all I have is a black screen. I looked through ...
0
votes
0answers
72 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 ...
13
votes
2answers
501 views
Random/Procedural vs. Previously Made Level Generation
I am making a game (called "Glory") that is a top-down explorer game, and am wondering what the advantages/disadvantages of using random/procedural generation vs. pre-made levels are.
There seems to ...
3
votes
1answer
135 views
How would one go about integrated python into a c++ written game for the use of user-made scripts
I'm quite new to game development (not the site) and I'm currently just trying to educate myself about some certain things before I really begin working and a game.
anyway, I'd like to know what ...
0
votes
2answers
102 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 ...
1
vote
1answer
95 views
Python + Pygame - Collision problems
I'm currently developing a game in Python + Pygame and i came up with a problem with the player and the platforms. The game is a 'runner' where the player it's fixed (The 'x' position isn't variable, ...
4
votes
2answers
170 views
Accidental noise - Gradient function
Related to my previous question (2D Terra(ria)in generation - Accidental noise) I'm stuck on understanding how the gradient function itself works (in the Accidental library).
After help on chat ...
2
votes
1answer
199 views
2D Terra(ria)in generation - Accidental noise
I'm currently trying to implement terrain generation as described on the following page:
http://accidentalnoise.sourceforge.net/minecraftworlds.html.
But I have issues understanding how to interpret ...
1
vote
1answer
315 views
Is There an Easy Way to Convert Python/Pygame code into C#?
I am working on a game, sort of like this and I want to convert it to C#, as it is currently written in Python. The reason of this is because I can add features more easily and with less writing in ...
0
votes
1answer
65 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
169 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 ...
-1
votes
2answers
47 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
0answers
95 views
What to pass to scripting
I am using Java and libgdx to create a game and have decided to go a data driven approaching with Jython for this refactoring (just picked up Jython, have used Java for a while). The game is a ...
3
votes
1answer
171 views
Detect collision in Blender
I am trying to write a Python function for Blender(2.66) game engine, that permits me to detect collision between two objects.
I tried to read the documentation, but it's very confusing, and I don't ...
0
votes
1answer
61 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 ...
2
votes
1answer
142 views
how to represent a nested menu system?
I'm wondering what would be a clever way of making a layered menu system, in terms of what data structures to use.
An example of what I mean: A unit has the ability to construct buildings, and to ...
1
vote
1answer
181 views
pygame performance issues
I'm trying to make a tactics game using python and the infamous pygame library. I use threading for networking and pathfinding. The game uses a p2p lockstep architecture, with one of the players ...
3
votes
1answer
169 views
Pygame: circular motion with Bresenham's algorithm
I'm trying to figure out a way to move an object in a circular path. I read about Bresenham's circle algorithm, but all the codes available online draw an entire circle.
For my game, I want it so ...
0
votes
1answer
113 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:
...
1
vote
1answer
145 views
How do I determine if one value is within a certain range of another in Python
I've been working on the attacking in my RPG.
The problem I have recently encountered is, I have to be in Exactly the same x coordinate as the Enemy. When I want to attack the enemy this is what ...
2
votes
4answers
490 views
RPG movement holding down button
I've been writing a simple top down mini RPG in python.
My problem is that when I move the player I have to repeatedly tap the arrow key. Each time I tap the key the player moves 5 PX in the ...
0
votes
0answers
37 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
98 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, ...
-1
votes
1answer
189 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
vote
3answers
240 views
Solving the riddle on distributing a python built game?
So, I've done the research, and i've done the try/catch process of almost getting things to work. . . almost.
I've read this chart: ...
3
votes
0answers
78 views
Creating Animal Crossing style world rendering with Python [duplicate]
I've dabbled a bit with writing 3D rendering code in the past, although I'm interested in knowing if there is existing code (libraries) written for/with bindings to Python that might facilitate the ...
3
votes
3answers
272 views
Best way to network the movement of 2D tanks?
I'm working on a multiplayer Flash game with a Python server and I have a quick question regarding how I should send positional updates for tanks for other players.
Should I choose
Option A:
When ...
-3
votes
1answer
346 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 ...
0
votes
1answer
86 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 ...
1
vote
2answers
414 views
Packet handling system architecture?
I'm working on a multiplayer Flash game (ActionScript 3) with an accompanying server written in Python and I'd like some tips regarding networking, and specifically, the handling of packets and ...
18
votes
2answers
767 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 ...
3
votes
2answers
234 views
How to implement armor? [closed]
I am a newbie in Python, I am very bad at math too and I need some help. Also close/move this post if you feel this isn't the right place for it.
Hero1 = 5000 # His HP is 5k.
Hero1dmg = 200 # ...
0
votes
0answers
65 views
pygame object returns wrong button object
Another question from dumb developer :)
I have class for window:
class MainMenuWindow(Window):
# singeltone:
_instance = None
def __new__(cls, *args, **kwargs):
if not cls._instance:
...
1
vote
3answers
162 views
Geometry problem for area of sight
My player have a line of sight and all objects between the white lines, turns red.
To compute this, the following conditions are met: if the angle between the yellow line and the red line are small ...