Thanks, you was right once again…But can’t i set its anchor point, i mean so that i can place the bottom of the rec at the bottom of the screen? Can’t get it to work using this rectNode->setAnchorPoint(Vec2(0.5, 0.0));
rectNode->setPosition(Vec2(visibleSize.width / 2 + origin.x, 0 ));
Any idea? With this, it’s just like that the anchor points is all 0.5? and i have changed it to 0.0
I am not very experienced in cocosd-x, just started to develop a game.
That said I can only offer limited help but I’m glad if I can help.
I would just take an image because I think cocos handles that very well so it won’t be a big issue.
If you want to save memory use a spritesheet.
Maybe I could help you better if you can tell me what exactly your app is and what you want to do.
Hah look the funny thing is that I’ve programmed four games and i’m not sure about this openGL…It’s strange but yea I think i’ll just import it in a spritesheet with all the other images…Again Thanks FOR ALL!<333333333333333333333333333333 And btw when you are done with your game I can promote it, I have contacts you know As a gift for your help, contact me for further info at vuvysoft@gmail.com
Personally for something like that I’d try to draw it rather than use sprites.
I fill areas using code based on PRKit https://github.com/dmazzella/cocos2d-x-PRKit which allows you to fill shapes with textures; obviously in your case it looks like you just want to fill squares - but you can use the code from PRKit to see how to draw textures.
Drawing lines is reasonably trivial too.
And the advantage of drawing over sprites is the flexibility it gives you - especially with the lines joining your boxes.