Hey everyone, recently I have been digging into Python game development 
mainly for its rapid prototyping capabilities. I started out by using 
Pyglet which I have been using for the last month or two and just recently 
stumbled upon cocos2d and really love all the features it provides. Though 
I must admit I am having a very hard time transitioning from pyglet to 
cocos2d. I have scoured the internet hoping to find some tutorials and 
examples to learn from but everything on the subject seems to deal with the 
Objective C port of cocos :(. I have been taking a look at the examples in 
the repo but am still quite confused about how things work in cocos.

My main problem is how to structure the game and if I am understanding 
everything right. In Pyglet I basically went down the normal route of 
creating a main window for the game and then having different states (Menu, 
Playing, Dead, Whatever) to control the flow of the game. But in cocos I am 
struggling to get a hold on the scene/layer things. 

>From what I understand is a scene represents the current global state of 
the game like Menu, Level 1, Level 2, ect. and each scene is made up of 
layers (Background layer, Game Objects layer, HUD layer, ect). I would then 
add my game objects to their respective layers (My subclassed 
cocos.sprite.Sprite objects in the GameObjects layer, my labels in another 
layer, I might even create a different layer for enemies, ect). and then 
add them layers to their respective scenes.

Is this how it is usually done? If it isn't please feel free to correct 
anything :).

I'm also having trouble understanding how to control the game objects and 
what does the controlling. For example I thought I would build a simple 
vertical space shooter to get familiar with cocos. For the enemy movement's 
would the scene be in charge of pathing the enemies around and managing 
them all or would that fall to the certain layer, or even the sprite class 
itself?

This all might be because I am still fairly new with game development in 
general so sorry if these seem like stupid questions. It also tends to help 
me if I bounce ideas off others to help get a grounding.

Anyways if anyone can maybe explain the structure a bit more or even share 
a project example that would be great. And thank you all in advance for 
taking the time to read this and help me :).

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cocos-discuss.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to