Questions tagged [python]

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

Python is a dynamically and strongly typed programming language, used for developing a wide range of applications. The philosophy of Python is succinctly formulated in The Zen of Python, which can be revealed by issuing this command at the interactive interpreter:

>>> import this

The exhaustive and up-to-date reference to the Python specification and standard library documentation can be found in the official docs. There are a wide variety of implementations. The reference implementation is known as CPython.

The current stable versions are 2.7.1 and 3.2.6.

636 questions
30
votes
5 answers

Famous games written in Python

I've seen a couple of these, namely Java and C#/XNA...and I've recently been picking up Python. Which kind of made me think. What (famous) games have been written in Python, with Pygame/Pyglet/Pyopengl?
PrettyPrincessKitty FS
  • 10,315
  • 8
  • 43
  • 68
10
votes
3 answers

Is it a good idea to develop non-trivial 2d game in python?

I am planning to develop 2D space RPG and i am facing the choice: what is the best language to write it in? My candidates are C++, Java and Python. Obviously, I want to write game in Python because of its expressiveness, speed of development and…
Anton Barkovsky
  • 203
  • 2
  • 5
3
votes
2 answers

What is the best online game framework for Python?

I want create online game with Python. Is there any framework or library to make it easier? I would like it if the framework provided things like character attributes, such as health.
2
votes
1 answer

Picking random monster cards from a deck

What is the best way to go about making user defined classes (monsters, items, loot, armor, weapons, spell types, etc) and then calling them later during an encounter? Looking at the entire card list for a trading card game is intimidating, and I…
2
votes
2 answers

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 rotaters and send feedback like haptics not to…
Klanestro
  • 121
  • 3
2
votes
1 answer

Creating an mouse-friendly GUI in a "sort of" Python console mode

I'm developing a real-time rogue-like game during my spare time, using Python and libtcod, to learn programming (and have some fun). I would like to create some sort of mouse-friendly GUI, just like in Goblin Camp. This game is 90% mouse-driven,…
1
vote
2 answers

Attempting to have a group of units create random values independently in python 3 for a salvage loot system

I am working on creating a salvage mechanic for my game. I want different units to calculate salvage after an encounter to randomly determine how much each one was able to scavenge from fallen allies or attackers. As I have it setup up now its…
Revya
  • 13
  • 2
1
vote
3 answers

Making games In Python

I'm a beginner at making games, and my eBook that I learnt Python from just made a 2D game and simple game like snake in Nokia because I want to know more Python in correlation with game development. Can someone tell and explain to me what the…
user286610
  • 27
  • 1
0
votes
0 answers

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 I need the Y coordinate of the mountain so I can…
dragons
  • 206
  • 2
  • 8
0
votes
0 answers

Pyinstaller compiled Harfang 3d game not working

When I run it, I get: (0:051:583:200) Harfang core 1.2.0 (build 1538b3acd3c9351b7b9108742a5f352c98b78e5d Feb 7 2019 09:51:22) (0:056:555:200) See http://harfang3d.com/license for licensing terms (0:204:585:600) Load plugins from 4 default…
s3246
  • 1
  • 1
0
votes
0 answers

Minimax algorithm seems stuck in infinite loop, please help!

2 players works fine but I can't debug the minimax algorithm, it just keeps going.. sorry that the code is messy import random # board in nested list board = [[' ',' ',' ',' ',' ',' ',' '],[' ',' ',' ',' ',' ',' ',' '],[' ',' ',' ',' ',' ',' ','…
Jerpen80
  • 1
  • 1
0
votes
0 answers

How to implement a simple chat option for server-client based game (blender/BGE)

I want 2 players to be able to chat with eachother. I have a running server-client game, but I'm kind of stuck on this one. Since there are only outdated videos this is an example I need: https://www.youtube.com/watch?v=pTPsNYLg2oY It's just a very…
N3ur0
  • 1
  • 1
0
votes
1 answer

Python: I have a python statement which should work but it doesn't

The error in the picture is highlighted in red. So, I have used this code on another computer and it worked, why wont it work now? I may have made a really small and stupid error and if I have I'm sorry for wasting your time but, it should work. By…
0
votes
1 answer

First "If" Enemy Selection Function being recognized as a syntax error in Python

I have an issue with trying to under the syntax error with the line if enemy_select = 1: in this type of code: enemy_select = random.randit(1, 11) for enemy_select in range(1): if enemy_select = 1: enemy_type = character 1 elif…
0
votes
1 answer

Generate Random Integers

I am trying to make a dice rolling game. I want to generate a random integer in the range of the number of dice I have multiplied by the number of sides the dice has. For example, if two dice were played with three sides, then there could be any…
1
2