Skip to main content

Questions tagged [cocos2d]

cocos2d is a free open-source framework for building 2D games, demos, and other graphical/interactive applications.

Filter by
Sorted by
Tagged with
0 votes
1 answer
82 views

Box2d: High screen resolution / frequency causes high friction?

I'm using Cocos Creator with (built-in) box2d for physics. Recently our game behaves weirdly on our new device Galaxy S20 Ultra 5G - which has screen size = 1440 x 3200 - frequency = 120Hz. After stop ...
David Tran's user avatar
0 votes
0 answers
242 views

How to take input from featured mobile phone in cocos creator?

I am beginner to cocos creator and I came to know cocos has Keyboard,DeviceMotion and Mouse input event but I want to know how to take input from featured mobile phone having number pad? Will it be ...
Aryaman Gupta's user avatar
2 votes
0 answers
68 views

What is the right way to implement a loading screen in cocos2d-js?

We have two scenes that are loaded with heavy computation; a map screen and a puzzle screen. When we change the scene from A to B, the app gets stuck on scene A for a while before it renders scene B. ...
ramiz balayil's user avatar
1 vote
0 answers
381 views

Given the size of far and near plane, find other parameters of a frustum

I am trying to find the correct parameters for setting up my perspective camera. But I don't know the mathematics involved in that. Can somebody point me to the right direction? My near plane should ...
DarkNemesis's user avatar
0 votes
1 answer
87 views

Adjusting arms of character while moving

I'm working on a test game in Cocos2d for Python (code is a little dirty). I'm trying to run and shoot at the same time without having my character's (running) legs go back to the beginning position ...
Bennybear's user avatar
  • 125
1 vote
1 answer
61 views

Help understanding the parkour tutorial in Cocos2d

I was practicing the parkour tutorial for chapter 7, but I failed to understand why we should move the same delta movement of this.gameLayer, which contains the ...
user100497's user avatar
0 votes
2 answers
101 views

Make something move when no key is pressed

I am new to game programming and I have a question about my game logic. In my game there is a balloon that is supposed to collect some stars. the balloon moves with the keyboard. When the balloon ...
lino's user avatar
  • 105
0 votes
1 answer
1k views

How do I publish a game for the web, using Cocos Creator?

I am new to Cocos Creator and web game programming. I have build a simple game for the web, but I don't know how can I publish it. In the documentation files, it says: You only need to .zip scripts ...
lino's user avatar
  • 105
0 votes
1 answer
165 views

Cocosdenshion and Android not working

I'm trying to play sounds and music with cocos2d. When I run on iPhone and .caf files the audio is perfect, but on Android it is not playing the background music and is only playing 2 sounds of 10 ...
RN Vi's user avatar
  • 1
0 votes
1 answer
86 views

Cocos2dx launcher - how do I set a newer engine version?

Why doesn't Cocos(V3.10) detect my newer engine version (3.14) which I downloaded and placed into the engine folder? ( I mean the launcher, the all-in-one version where you can create your project ...
user avatar
1 vote
0 answers
45 views

Socket.io emit textfield

Hello everyone I learned how to emit from socket.io website guides but I was wondering how does the chat example receive its input? For example in my cocos2dx app how do I pass a text field over to ...
GK Dorus's user avatar
0 votes
1 answer
4k views

Minimum hardware requirements for developing for iOS and Android with Unity, Cocos2d-x and GameSalad on a Mac

I intend to create iOS and Android games. My main priority is to create 2D games. The software that I’m planing to use are Unity, Cocos2d-x and GameSalad. I am a bit interest in the Mac Mini, ...
Carlson's user avatar
0 votes
2 answers
489 views

Cocos2dx - Create the friction of the ground

I'm writing a game, it a pool game. I've read about cocos2dx + physics library, however the document is really poor to understand. Material has 3 attributes (http://www.cocos2d-x.org/wiki/Physics#) : ...
TomSawyer's user avatar
  • 243
3 votes
0 answers
285 views

Batch z-ordering problem in Cocos2d (Python)

I have a weird problem with my hexmap drawing code. My code uses "squished" hexagons to achieve a pseudo-isometric view. Because of that, the order of drawing them on screen matters a lot. ...
Daniel Tyomin's user avatar
2 votes
2 answers
450 views

Cocos2d JS - Getting vector reflection

I'm working on a small Breakout clone using Cocos2D-JS, without the use of a physics engine. One of the things that baffles me was how the ball bounces. My friend came up with this: inputVector - ...
zack_falcon's user avatar
0 votes
1 answer
344 views

How to detect collision during a cocos2d::Action

I spent a day trying to hack my own Action class, but given the hurdles I've hit trying to do so, I'm hoping there's some way to work around my problem while still using the built-in (and admittedly ...
msmoiz's user avatar
  • 11
-1 votes
1 answer
388 views

How to set building in sequence like COC game using tiles map in cocos2d-x V3.9?

i am developing game in cocos2d-x V3.9. i want to create base like COC game. set all buildings in sequence and it can't be overlap with each others. i want also make boundary for develop city view. ...
vipul's user avatar
  • 1
1 vote
0 answers
168 views

Black border all around simulation / viewport in iOS using Xamarin + CocosSharp

I'm just getting started with Xamarin and CocosSharp so it's possible I've missed something basic here.. but whatever it is I can't seem to figure it out. I'm trying to get my app/game to be ...
JensB's user avatar
  • 253
4 votes
1 answer
222 views

android - How Do I Replace A Scene in Cocos2D

I am using Cocos2D for Android: I have two scenes MainScene and LogoScene. I want to show a Splash screen on ...
sn0wfall's user avatar
1 vote
0 answers
191 views

Cocos2d How do I transition to a scene

So I have mainScene and I have LogoScene, I am wondering If i can make logoscene show a logo, then transition to mainscene. here is what i have ...
sn0wfall's user avatar
1 vote
2 answers
1k views

Opengles 2.0, Replace the black region in the image to make it transparent

I have two textures, Source image A and Overlay B, B is drawed on top of A, I want to replace the black color in B, then make the region of A visible, what should I do? This is my shader language: <...
user2803729's user avatar
3 votes
0 answers
90 views

Cocos2dx Windows Phone 8.1: Seperate Characters in RTL Label

I use below code to show a text : auto label = Label::createWithSystemFont("سلام و خداحافظ", "BTitrBold", 24); ( RTL text like Persian, Arabic and Hebrew) This ...
Emadpres's user avatar
  • 940
0 votes
0 answers
123 views

`setVelocity` allows body to pass through bodies

In my game, I'm using cocos2d-x and I wanted to have an object that changes direction immediately, so I used setVelocity() on the physics body to do that. However, ...
dontangg's user avatar
  • 223
1 vote
1 answer
6k views

Java - Adjusting the speed of an object during movement

I am trying to get an object to move (on java canvas) in the same angle but at different speed within the X and Y axis. Below you can see how i have implemented the movement of the object. ...
user5991026's user avatar
-1 votes
2 answers
796 views

Unity equivalent to cocos2D (and Sprite Kit) Actions?

Does Unity have an equivalent to the Actions feature/functionality of cocos2D and Sprite Kit; if so, what is it? cocos2D Actions: http://python.cocos2d.org/doc/programming_guide/actions.html http://...
Confused's user avatar
  • 183
2 votes
2 answers
851 views

How do mobile games create simple UI components? [closed]

How are simple UI inputs typically handled in 2D mobile games? For example, text input boxes and keyboards. It seems that many game engines do always have simple UI components. There are obvious ...
jaybers's user avatar
  • 129
0 votes
1 answer
628 views

Opengles 2.0 multi Textures fade out one by one

I have multi textures, A was drawed on top of B, B was on top of C ...., ( like Picture 1) .I want to fade out A first, then B will appear and fade out either... But when A fade out, background color ...
user2803729's user avatar
0 votes
1 answer
1k views

Rotate sprite direction Cocos2d

I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless. The constants to move and ...
Zoroastiran's user avatar
1 vote
0 answers
317 views

Error OpenGL null Cocos-2D/Visual Studio [closed]

When I try to execute a game code fully functional on Visual Studio 2013, using Cocos-2D (3.8.1) library this error jumps on screen. (I'm working on a laptop) OpenGL 1.5 or higher is required (your ...
Zoroastiran's user avatar
1 vote
0 answers
117 views

Turn Based Game Match Data in iOS

Hi I’m working on turn based game development using turn based API from Apple’s GameKit framework. My game is 2 player strategy game. Currently I’m facing the issue match data update on game play ...
Vijay's user avatar
  • 121
0 votes
1 answer
193 views

Cocos framework gives large Android builds than cocos2d-x

This question is regarding Project Architecture and workflow. I have an installation of cocos2d-x and Cocos Studio with Cocos Framework ( version 3.6). I carried out different build tests with hello ...
Abhishek Deb's user avatar
1 vote
0 answers
434 views

Best way to transition between multiple Cocostudio defined scenes

I'm designing a game that has to switch between multiple game scenes. Each scene has been created in cocostudio and is imported into the code as a json file as: ...
Danni's user avatar
  • 11
0 votes
1 answer
155 views

Transition from UIView to CCScene in Cocos2D

I've surfed the internet for quite some time but haven't come to find an answer. Any help would be greatly appreciated. I am trying to perform a transition from a UIView to a CCScene So i have a class ...
votelessbubble's user avatar
1 vote
1 answer
1k views

How to move sprite mimicking mouse/touch position on some part of the screen?

I am having a difficulty and I am been doing it wrong, I think. I want to move sprite relatively to touch. Just like when you are playing space shooter like 1943. I just learning some math and try to ...
Neon Warge's user avatar
1 vote
1 answer
1k views

How to use Cocos2dJS to connect to a Socket.IO server?

How can I connect to a nodejs socket.io server from a cocos2djs game? I've google all the way to no avail. I tried this but it ...
Anderson Madeira's user avatar
2 votes
3 answers
816 views

Cocos2d v3.4 Templates

How to create cocos2d v3.4 without using Cocos2D-SpriteBuilder? I installed Cocos2D-SpriteBuilder as they recommended in cocos2d blog: http://cocos2d.spritebuilder.com/get-started But I need to ...
Mariam's user avatar
  • 163
-1 votes
2 answers
276 views

Change sprite position

I have Sprite and i want change my Sprite position when score == 2 ...
Farzad Mohebbi's user avatar
1 vote
1 answer
294 views

How do I calculate the path of something in orbit around one or more bodies?

I need to figure out how to calculate the orbit of an object around one or more bodies for a game that I am making (built on Cocos2D-Swift). The game is in two dimensions, so it's a two-dimensional ...
ben's user avatar
  • 113
0 votes
3 answers
2k views

How Use loop's in cocos2d-x

I've for loop which work well on Windows ...
Farzad Mohebbi's user avatar
2 votes
2 answers
968 views

Right-To-Left Text Direction in Cocos2dx

I want to use Persian/Arabic text beside English in whether Label or ui::Text. Persian is a Right-to-Left and English is a Left-...
Emadpres's user avatar
  • 940
0 votes
1 answer
118 views

differences betwen game resolution in a different display resolution

my game is not supported on the other devices with a different resolutions. for example may character is 140w X 55h pixels which is ok on a 4 inch display but it goes wide when i tested my game on a ...
Farzad Mohebbi's user avatar
0 votes
0 answers
330 views

Cocos2d v3 - addChild method make performance problems

i have currently a performance problem with the addChild method in cocos2d version 3.3. My scenario is currently that i have about ten ...
Yetispapa's user avatar
  • 101
1 vote
1 answer
325 views

cocos2d-js displays only one type of tile from a tmx file

I am using Tiled to produce a tmx which I use in my code using cocos2d-js. The problem is that when I run it on the browser, a wrong tile gets displayed, the first ...
zbs's user avatar
  • 111
0 votes
1 answer
131 views

Cocos Code IDE unable to find python

I am trying to create a new JavaScript project on Cocos Code IDE but every time it immediately give me the error message: Unable to find python. Please, click ...
zbs's user avatar
  • 111
1 vote
2 answers
430 views

How to prevent fish eye effect when using CCOrbitCamera in Cocos2D?

Note: I'm using CocosSharp, a Xamarin C# version but the question is valid for all Cocos2D versions I presume. I'm also fine with answers in any Cocos2D dialect (there is no tag yet for CocosSharp ...
Krumelur's user avatar
  • 299
2 votes
1 answer
4k views

How can I run two CCActions in parallel and another one afterwards with Cocos2D?

With Cocos2D I can run two actions in parallel by simply using runAction and I can use a CCSequence two run several actions ...
Krumelur's user avatar
  • 299
0 votes
2 answers
1k views

Cocos2dx - Physics - Abort() When Changing Dynamic PhysicBody to Static?

I just learned cocos2dx v3.3 integrated chipmunk physics engine. Here ,as you see, I create a simple circle with physic as: ...
Emadpres's user avatar
  • 940
0 votes
1 answer
979 views

cocos2dx: RunningScene != Scene You just Replace

I have this code for cocos2d-x 3.x: ...
Emadpres's user avatar
  • 940
3 votes
1 answer
259 views

How can I use CCClippingNode to trim the top and bottom from a CCTableView?

I'm fairly new to Cocos2d and struggling with sizing a CCTableView. How can its height be controlled so that I have space at the top and the bottom? I'm trying to ...
Carl Hine's user avatar
  • 141
0 votes
0 answers
134 views

Using Tile Maps with cocos2d - how do I handle a large amount of images?

I am building a game where the users (players) can build their own town. There they can build houses, add furniture to the houses etc etc. Basically similar to The Sims. I am using the Tiled Map ...
Eyeball's user avatar
  • 101

1
2 3 4 5 6