Nepeo's Forum Posts

  • Might be related to having an iframe in the example?

  • Well we haven't intentionally reduced device compatibility. Unfortunately I'm not aware of what that specific warning relates to. I think I need to take a closer look at the project, and perhaps check what changes we made over the duration. Knowing what version you used for the last "good" release would also be helpful.

  • When you say

    Just tried the endless runner template and this one seems to work after export.

    Do you mean as in it displays the issue, or that it works correctly?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In your config.xml the icon and splashscreen file paths should be relative to the cordova project root, not the platform specific project

    	<splash src="www/icons/default@2x~universal~anyany.png">
    
  • Yes install from the cordova CLI. I would typically add it to the config.xml before running "prepare" to hydrate the project, but if the project has already been hydrated then "npm install" is fine.

    I believe that's the latest version is 9.0.1 so you should be good.

  • Nah append it to the end of the c2runtime.js file. It runs when the app starts and hides the statusbar ( making it fullscreen ). It also runs a little block which corrects the window size, as the iPhone X forces the window to the wrong size...

  • Okay so our current approach to patching a C2 project for the buildservice to resolve this is as follows:

    - set the cordova "fullscreen" flag to FALSE

    - add the "cordova-plugin-statusbar" plugin to the project

    - append the following chunk of javascript

    ;(function () {
    	var previousWidth = -1;
    	var previousHeight = -1;
    
    	function tick ()
    	{
    		requestAnimationFrame(tick);
    
    		var isPortrait = window.innerWidth < window.innerHeight;
    
    		var height = isPortrait ? window["screen"]["height"] : window["screen"]["width"];
    		var width = isPortrait ? window["screen"]["width"] : window["screen"]["height"];
    
    		if (previousHeight == height && previousWidth == width)
    			return;
    
    		previousHeight = height;
    		previousWidth = width;
    
    		var docStyle = document["documentElement"].style;
    		var bodyStyle = document["body"].style;
    
    		if (height && width)
    		{
    			bodyStyle["height"] = docStyle["height"] = height + "px";
    			bodyStyle["width"] = docStyle["width"] = width + "px";
    		}
    	}
    
    	function enterFullscreen ()
    	{
    		// ios - hide statusbar
    		if (typeof window["StatusBar"] === "object")
    			window["StatusBar"]["hide"]();
    
    		// android - hide status and nav bar
    		if (typeof window["AndroidFullScreen"] === "object")
    			window["AndroidFullScreen"]["immersiveMode"]();
    	}
    
    	document.addEventListener("deviceready", function () {
    		var ua = navigator.userAgent;
    		var isMicrosoftEdge = /edge\\//i.test(ua);
    		var isIE = (/msie/i.test(ua) || /trident/i.test(ua) || /iemobile/i.test(ua)) && !isMicrosoftEdge;
    		var isiPhone = (/iphone/i.test(ua) || /ipod/i.test(ua)) && !isIE && !isMicrosoftEdge;	// treat ipod as an iphone; IE mobile masquerades as iPhone
    
    		enterFullscreen();
    		if (isiPhone && window["screen"])
    			tick();
    	});
    })();
    

    That's as far as the build service goes to try fix C2 exports ( at least for iOS ) but to work on "notched" iOS devices you will also have to add "viewport-fit=cover" to the meta viewport tag in your main .html file, like so:

    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> 
    

    ... and you need to use a launch storyboard for instead of a standard splashscreen. Further details on this can be found here.

    One other thing I'd note is that the build service is using Cordova CLI 9 which officially supports iOS 12. Phongegap has only just added the option for this, but I thought you should be aware.

  • Hey tarek2 are you exporting as an app or just trying to get support for a HTML export?

    We actually made some changes to how C2 projects are built on the build service to try and improve this issue. Although I realise there's probably still a couple of steps that would need resolving in addition. If your not a C3 sub then it's going to be a bit harder, but I will try to help.

  • If you haven't read it I would recommend looking at my tutorial on using the advanced random plugin. It doesn't cover the complete feature set, but it's a good starting place.

    A "permutation" refers to an arrangement of values. Hence a "permutation table" is an "table" / "array" /"list" of values that have been rearranged. In this case we are "shuffling" them, so arranging them in a random order.

    It has 2 main uses that I have come across. The first is to produce a non-repeating random sequence of values like your trying to. The second is when you wish to associate a value with a random value in a repeatable way. "Perlin noise" uses a permutation table to give specific "random" values for a location.

    Probability tables are basically for doing random drops in games. You can specify a value ( string or number ) and the chance it will be chosen. Then the expression for it will choose one of the values for you.

    Octaves are related to a concept called "fractional brownian motion" which we use with the various "noise" algorithms to improve the quality. Each octave is an additional layer of noise that is applied on top. There's some diagrams demonstrating it in the tutorial.

    Gradient are linear gradients with support for multiple value stops. They support both colours and values.

    All the features have notes and explanations on the manual page, but the ideas that the Advanced Random plugin cover tend to be a bit more complicated than others.

  • We did look at the black hornets "smart random" plugin when adding the permutation tables. They fulfil a slightly different purpose, but can be used to produce non-repeating random numbers like "smart random" does. If your happier with the way "smart random" works then I encourage you to keep using it for that, but it's worth knowing what "Advanced Random" offers as well.

  • Should be as simple as having a loop and a counter variable. Something like this should work:

    It assumes that there's 10 instances, and 10 animation frames but you could put safety checks in place for that.

  • Example usage:

    ...and the resulting log message...

  • It creates an array of values between the 2 numbers you give, and then shuffles it. I presume they chose 52 because it's the number of playing cards in a deck.

    The expression tells you what card is in that location. If you want the next then just increment your index.

  • It's in the next beta, most changes made during the last couple of weeks before a stable go into the next beta cycle. The only exceptions are low risk and high importance fixes.

  • KENYONB The update to use the latest version of the SDK for iOS is coming in the next beta release, just committed the change.