Questions tagged [cocos2d-python]

Python-based open source framework for building 2D games and graphical applications for Windows, Mac and Linux desktop computers.

Cocos2D is a Python based open source framework for building 2D games and graphical applications for Windows, Mac and Linux desktop computers. Cocos2D is published under a BSD License.

Due to the low popularity of Cocos2D (Python) please use the tag in Cocos2D (Python) related questions. The tag has become synonymous with due to the immense popularity of the Cocos2D for iPhone (and Mac) port.

Please refer to the description of the or tags for more information about the Cocos2D game engines.

36 questions
3
votes
1 answer

Cocos2D-Python to Android/iOS

I have a feeling this question must have been asked elsewhere but I still can't figure this out. My question is two-fold: Can Cocos2D-Python be used to create games for both iOS AND Android? Or am I stuck with Cocos2D-x with I'm looking for…
spicypumpkin
  • 1,188
  • 1
  • 8
  • 20
3
votes
1 answer

How to use cocos2d's collision_model

Recently, I used cocos2d with Python to make a game. But I had trouble with the collision_model. I read the documentation but I still can't use the CollisionManager to add the CollidableSprite as in the example. In fact, I had to change the…
ddming000
  • 141
  • 1
  • 1
  • 8
3
votes
0 answers

pycharm cannot find reference 'layer' in '__init__.py' for cocos2d

I am just starting out to learn cocos2d using python. When I write this in pycharm : import cocos class HelloWorld(cocos.layer.Layer): def __init__(self): super(HelloWorld, self).__init__() label = cocos.text.Label('Hello, World!', …
Ishan
  • 2,885
  • 4
  • 22
  • 41
2
votes
1 answer

How to find layer width/height with cocos python

I'm currently fiddling around with python and cocos2D and i wanted to make a simple display with indented space much like this import cocos from cocos.director import director class MyLayer(cocos.layer.Layer): def __init__(self): …
2
votes
2 answers

Python Game Libraries

First off please do not mark this topic as a duplicate. All the relevant threads are years old. I would like updated information. What are the pros and cons of the following libraries? I am aware of: PyGame, seems to be the most popular but the…
marsh
  • 2,191
  • 4
  • 26
  • 46
1
vote
1 answer

The Sprites and ColorLayers in cocos2d-python doesn't work

I've tested pyglet and I'm sure pyglet works well. But when I ran the script in samples/hello_world_actions.py , or anything with color, only thing in the Scene is Label. Could anyone tell me what has happend? PS:my env : Python2.7 cocos2d 0.5.0…
user950101
  • 11
  • 3
1
vote
2 answers

Learning Cocos2d

I want to learn cocos2d on UBUNTU 11.06 I have found tutorials, But if you people can help, then I can learn efficiently. If you know any Link / Tutorial / book, please let me know
Stuti
  • 1,580
  • 1
  • 15
  • 32
1
vote
1 answer

how to play avi or mpeg video with python cocos2d

i'm using cocos2d game engine for python. And i read api document but i can't found video library. how to play avi or mpeg video with python cocos2d ?
john misoskian
  • 546
  • 1
  • 12
  • 32
1
vote
1 answer

Pythonpath issue - Cocos2d

I'm trying to use a game library called Cocos2d in python. However, I can't really import it. It's installed in one of python's lib directories, and when I import it, it's saying that it's not there. I know it has to do with pythonpath (provided in…
pajm
  • 1,588
  • 6
  • 22
  • 30
1
vote
0 answers

Bad performance with relatively few sprites and medium sized tile map?

I am using python cocos2D and am trying to display a map of many tiles. About 100x100 32px tiles. It works alright when I am zoomed in by as soon as I zoom out to view more it gets very choppy. I also tried using my own sprites and that was even…
John O'Neil
  • 335
  • 1
  • 3
  • 14
1
vote
0 answers

Segmentation Fault when updating cocos.text.Label.element.text (Python/Pyglet/Cocos)

I have a Python/Cocos application that (among other things) receives events through a bus and displays relevant information on screen. I have a cocos.text.Label which displays the value coming from a remote sensor. When I try and update this label…
walrus
  • 151
  • 3
  • 10
1
vote
1 answer

What is bezier_conf.path1 in cocos2d(python)

I'm learning cocos2d(python).When i watch cocos2d Documentation on webpage(cocos2d documentation).There are some code as follows: action = Bezier(bezier_conf.path1, 5) # Moves the sprite using the sprite.do(action) # bezier…
AlexYu
  • 67
  • 1
  • 9
1
vote
1 answer

Cocos2d Python - AttributeError: 'Resource' object has no attribute 'set_view'

import cocos from cocos.tiles import load from cocos.layer import ScrollingManager from cocos.director import director from cocos.scene import Scene director.init() MapLayer = load("themap.tmx") scroller =…
1
vote
1 answer

Python Game Movement

I am working on a simulation for a business problem, but I am trying to build a 2d game to demonstrate the simulated movements. To do this, I am starting off with an actual python game that I found some code for online. The goal is to create 100s…
Rupert
  • 3,472
  • 7
  • 26
  • 35
1
vote
2 answers

Load image with pyglet turns some transparency pixels white

I'm using cocos2D-python and I am loading images with pyglet.image.load and pyglet.resource.image but it still adds some white pixels where it is suppoused to be transparent. I've used pygame before but never experienced it with that. If it matters…
Frothiny
  • 81
  • 9
1
2 3