Hello.
I am one of the developers at Coffee Stain Studios and we have our game Super Sanctum TD built using Cocos2dx and Marmalade. This is actually our second Cocos game. We built our first ever game I Love Strawberries in cocos2d-iphone some years ago. Appart from cocos we mainly work with Unreal Engine.
Anyway, back to topic. As Super Sanctum TD runs on PC and Mac I started investigating trying to make it possible to resize the window and have the game scale accordingly. This turned out to be a pretty nasty task. I first tried using VirtualResolution settings in IwGL. This turned out to help me “start the app” in various resolutions and then render properly in those but as soon as I resize the window it all went bananas.
I also considered using a solution that used a root CCNode in each scene that I just added all content to and then scaled it, but then from what I’ve understood DesignResolution should be able to help me out so I figured I’d aim for that. Anyway, so basically trying to set the design resolution to 1024x768 and then re-sizing the window I still never got it to scale properly.
Finally I noticed that this in CCEGLViewProtocol.cpp
void EGLViewProtocol::setFrameSize(float width, float height) { _designResolutionSize = _screenSize = Size(width, height); }
Should the designResolutionSize really get the same value here? Seems a bit strange to me.
I changed it so that it only changes thescreenSize and after that I can resize my window fine and the app renders correctly.
Saw this is still the same in cocos2dx 3 beta so I figured I’d make a post.
Love cocos and I really appreciate all the hard work you put down into it
Best
Anton