Qushy's Recent Forum Activity

  • Hello, I just exported a game with Construct which, when uploaded to a server doesn't start at all. This is the error I'm getting:

    It doesn't even run the first action in the Event Sheet which is a Browser Log. Any ideas what might be wrong?

    I doesn't even work on Preview, this is what Preview says:

  • For anyone stumbling upon this the solution is

    window.parent.postMessage()
    

    I don't even know why I didn't try this earlier.

  • Hello, I'm trying to send a message to the iFrame using window.postMessage but the server doesn't seem to get my message no matter what. Can someone give some examples of how I can correctly do that?

    This is what I've tried so far:

    window.postMessage ("completed", "*")

    window.postMessage ("completed", window.location)

    window.opener.postMessage('completed');

  • Hello, I'm having an issue which I am pretty sure is a Construct bug but I can't share the project unfortunately as it is property of the company I work for, so I will try to post as many details as I can here in case you would like to take a look for a future Construct release.

    The game consists of 4 Layouts, the Intro Layout, the Select Difficulty Layout, the Game Layout and the Results Layout (which contains a Restart Button).

    The game works perfectly well for the first two times someone (re)plays it, meaning all 4 work layouts appear and work as expected. If you finish the game 2 times and press the Restart Button in the Results Layout which takes you to the Intro Layout everything is fine. You move on to the Select Difficulty Layout and choose one of the three difficulties. The moment you press the Start Button to move to the Game Layout the whole game just freezes and the Browser console throws an "Already loaded texture" error. Nothing happens after that.

    To help with debugging I will share the actions before moving to the Game Scene, right after we loaded in the Game Scene and the Game Layout itself.

    TLDR: I print a message right before going to the Game Layout and another message as the very first action of the Game Layout. In the 3rd run of the game the message "Entering Game Layout" appears followed by the error mentioned above. The expected behaviour is the console to show "Entered Game Layout" and the game continue as normal.

    Here are the screens:

    Tagged:

  • See the bug report guidelines.

    Thank you, I'll keep it in mind.

  • I have several tests involving Drawing Canvas, including some pretty complex ones, and they all work fine for me in r283. Usually bugs involve some very specific set of circumstances, but unless we know what those are, it's impossible to do anything about it. That's why we need people reporting issues to co-operate and follow those guidelines to make sure the problem can be fixed.

    This is not a personal project unforuntately so I cannot provide it. The game still won't work in Chrome which is a major issue for me and my company. What would be required for you to look into this?

  • https://github.com/Scirra/Construct-3-bugs

    Unfortunately I can't provide the project and am too busy to create a new minimal one with the exact logic. Thank you for your help though and please if could somehow try it yourself I would be grateful.Pasting an object on a Drawing Canvas won't work only in Chrome. It works fine everywhere else.

  • Please file an issue - we're close to a stable release and the next stable will go out as-is unless we get the chance to fix it before then, and to do that we need a bug report following all the guidelines.

    Could you provide a link? I can't seem to find it, sorry.

  • Canvas Paste action definitely works in Google Chrome, I used it hundreds of times. Maybe in your project you are removing the object before it gets pasted? This operation takes some time (one or several ticks) to complete.

    It was actually a Construct issue fixed up until R281. In R283 the problem has returned, hopefulyl it's fixed again soon.

  • Hello,

    I am working on a Puzzle game that needs to get the pixel data of an image to create the pieces. It works in every browser except Google Chrome and Opera. I've tried Chrome, Chromium, Firefox, Falkon, Opera and Vivaldi.

    Is there a reason for that and if so how can I rectify this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I have a Drawing Canvas in my scene where I draw lines that I want to get the pixel data from. I use the following code to get the pixel data from two canvases:

    	// Load the pixels of the player Drawing Canvas asyncronously and then proceed to load the computer Drawing Canvas pixel data
    function loadPlayerData(playerImage, computerImage)
    {	
    	playerImage.getImagePixelData().then(playerData=>loadComputerData (playerData,computerImage));
    }
    
    function loadComputerData (playerData, computerImage) {
    
    	computerImage.getImagePixelData().then (computerData=>compare(playerData, computerData));
    }
    

    The data returned is the correct length but no matter what I draw on the player canvas it's filled with zeros. Am i doing something wrong here? The computer canvas seems to work just fine and I'm pasting a sprite on it.

  • Hello I've written the following script:

    	var careerIndices = [];
    
    var randomCareers = [];
    var randomCareersForPortraits = [];
    var randomCareersForCareerImages = [];
    
    var portraitIndices = [];
    var careerImagesIndices = [];
    
    
    
    function intializeCareerIndices (runtime) {
    
    	for (var i = 0; i < runtime.globalVars.gNumberOfCareers; i++) {
    		careerIndices.push(i);
    	}
    
    	for (var i = 0; i < runtime.globalVars.gNumberOfCharacters; i++){
    		
    		var index = Math.floor(Math.random() * careerIndices.length);
    		
    		var roll = careerIndices.splice(index,1);
    		
    		randomCareers.push (roll [0]);
    	}
    	
    	randomCareersForPortraits = randomCareers;
    	randomCareersForCareerImages = randomCareers;
    	
    	console.log (careerIndices);
    }
    
    
    function initializeImagesIndices (runtime) {
    
    
    	for (var i = 0; i < runtime.globalVars.gNumberOfCharacters; i++){
    		
    		var index = Math.floor(Math.random() * randomCareersForPortraits.length);
    		
    		var roll = randomCareersForPortraits.splice(index,1);
    		
    		portraitIndices.push (roll [0]);
    		
    		index = Math.floor(Math.random() * randomCareersForCareerImages.length);
    		
    		roll = randomCareersForCareerImages.splice(index,1);
    		
    		careerImagesIndices.push (roll [0]);
    	}
    }
    

    The NumberOfCareers is 15 but the careerIndices array has a length of 11 for some reason even if I explicitly define it as careerIndex = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]. Is this a bug or am I doing something wrong?

Qushy's avatar

Qushy

Member since 2 Jul, 2020

None one is following Qushy yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies