AndreasR's Forum Posts

  • Not really. I just start teamviewer before I open C2.

    Regards

  • . thanks bro your template is very good

    Thank your very much

  • You can use my template.

    https://www.scirra.com/store/royalty-fr ... coins-3380

    Regards

    Andy

  • AndreasR This is EXTREMELY good advice I wish I knew before I published a few of the games I already published with Cocoon.io

    So right now Webview+ with spritefont is the optimal solution for performance and less heat?

    For WebView+ you also can use the text object. Only canvasplus has strangles to render the text object.

    Regards

    Andy

  • AndreasR nope. Just "New Project 2" or "Mkmer".

    Ashley I compare with other games on the same devices. Clucking adventures for an example keeps perfectly cool. I understand some heat is expected, but not high heat when running a few expanding circles.

    Hi,

    I made a guide for Cocoon and Construct 3.

    Build for Cocoon with Construct 3

    At the moment I only got WebView+ working. Canvasplus seems to have problems with Construct 3, or the other way arround.

    Here is the topic about the Canvas issue.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'll make some further tests and let you know. I just tried a new project made with C3 (not the KiwiStory game), and here it's working fine. At least for WebView+.

    Thank you for your help!

    Regards

  • AndreasR nope. Just "New Project 2" or "Mkmer".

    Ashley I compare with other games on the same devices. Clucking adventures for an example keeps perfectly cool. I understand some heat is expected, but not high heat when running a few expanding circles.

    Clucking adventures is running in WebView, I know the developer. Canvas is known to run mostly always at 80-90% cpu usage.

    https://forums.cocoon.io/t/causes-for-h ... usage/2136

    For canvas you must be very carefully what object you are using. For instance a "Text" object needs a lot of rendering power in Canvas+, that's why you should use SpriteFont instead. This is all no problem when you use "WebView+", but the performance isnt' that good as with Canvas+.

  • If it works with other export options, and it only happens in Cocoon, then isn't it a Cocoon bug?

    I'm not quite sure. It seems that C3 doesn't use HDPI if using the cocoon wrapper. In c2 it was sufficient to add "this.isCocoonJs" to set the accurate display size.

    Isn't there a way to do this in c3?

    I added following line in the c3 runtime file.

    		
    // Detect wrapper platforms
    		this.isCrosswalk = /crosswalk/i.test(navigator.userAgent) || /xwalk/i.test(navigator.userAgent) || !!(typeof window["c2isCrosswalk"] !== "undefined" && window["c2isCrosswalk"]);
    		this.isCocoonJs = !!window["c2cocoonjs"];                //<- added to detect cocoon
    		this.isCordova = (this.exportType === "cordova");
    [/code:1ionpv6k]
    
    This condition is true when the game was built with cocoon. But I don't know where to adjust the screen/window size.
    so that I can do 
    [code:1ionpv6k]
    if (this.isCocoonJS)
    {
       ... set width..
       ... set height...
    }
    [/code:1ionpv6k]
  • I'm currently working on a guide to export a c3 game with Cordova and built an app via Cocoon (not Canvas+, but WebView+).

    However I stuck at the scaling issue (there was a workarround for C2, but the code has changed with c3).

    Result (atm)

    I tried to find the same code snippet in the c3 runtime.js file and I did, however it is changed.

    Then

    if (this.canvas)
    {
    this.canvas.width = Math.round(w * dpr);
    this.canvas.height = Math.round(h * dpr);
    if (this.isEjecta || this.isCocoonJs) //maybe this is better (Ask Ashley): if (this.isDomFree)
    {
    this.canvas.style.left = Math.floor(offx) + "px";
    this.canvas.style.top = Math.floor(offy) + "px";
    this.canvas.style.width = Math.round(w) + "px";
    this.canvas.style.height = Math.round(h) + "px";
    }
    else if (this.isRetina && !this.isDomFree)
    {
    this.canvas.style.width = Math.round(w) + "px";
    this.canvas.style.height = Math.round(h) + "px";
    }
    }
    [/code:3cqlydma]
    
    [b]Now[/b]
    [code:3cqlydma]
    if (this.canvas)
    		{
    			this.canvas.width = Math.round(w * dpr);
    			this.canvas.height = Math.round(h * dpr);
    			
    			if (this.isRetina)
    			{
    				this.canvas.style.width = Math.round(w) + "px";
    				this.canvas.style.height = Math.round(h) + "px";
    			}
    			
    			this.canvas.style.marginLeft = Math.floor(offx) + "px";
    			this.canvas.style.marginTop = Math.floor(offy) + "px";
    		}
    		
    		if (this.overlay_canvas)
    		{
    			this.overlay_canvas.width = Math.round(w * dpr);
    			this.overlay_canvas.height = Math.round(h * dpr);
    			
    			this.overlay_canvas.style.width = this.cssWidth + "px";
    			this.overlay_canvas.style.height = this.cssHeight + "px";
    			
    			this.overlay_canvas.style.left = Math.floor(offx) + "px";
    			this.overlay_canvas.style.top = Math.floor(offy) + "px";
    		}
    [/code:3cqlydma]
    
    @Ashley I know you are not a friend of cocoon, however this issue also comes up while using WebView+. Do you now where we need to adjust the runtime.js file to get a fullscreen display?
  • Hi Ashley

    is there a way to get the Cordova exporter back (same as in C2?). Now I need to export for android and ios, before it was just a cordova export for both.

    Or is there any specific reason why this was changed?

    Thank you

    Regards

    Andy

  • AndreasR Couldn't run. This error welcomed me :

    It's a simple sprite and sine project. No addons, nothing weird.

    Are you using any special chars in your file names (sprite) or project name?

    Cocoon only supports english letters and some special chars.

    P.S. I made a guide for C2, however this also should apply on C3.

    I haven't a license for C3, yet. Once I've decided to purchase one, I'll update the guides.

    https://shatter-box.com/knowledgebase/cocoonio/

    Regards

    Andy

  • I've been looking a way to export to mobile without the horrible performance of the cordova export that's present right now (I built an .apk of 3 circles expanding and retracting via sine, Samsung S6 starting heating up )

    And Cocoon usually has great performance. Any options?

    This shouldn't have changed. Just export as "Cordova", delete the config.xml file and zip the content.

    Upload it to cocoon and select "CanvasPlus" as WebView Engine.

    Regards

    Andy

  • I've been looking for this a while, but it seems in c2 you can only do it by having two different text objects, because the text inside can be only bold or normal, but not both at the same time.

    Yes, seems so

  • I like Alpaca's! And I like the graphics in you game.

    Thank you very much for your feedback

    I'm glad you like it!

  • Hi,

    I want to set a few words in a "Text" object to bold in runtime.

    "This is a normal text but this should be bold and this normal"

    Is there a way to do this in c2?

    Regards

    Andy