tcamacho's Forum Posts

  • Hi all,

    I didn't found any solution for this on C3 which made me sad. I have been using C3 for almost 6 years on small projects it works great but when you want to do something more it doesn't keep up.

    After 4 days on multiple issues related with Android export I gave up and decided to move to other engines.

    In one morning on Godot i did what I was trying to achieve on C3 for days. It's sad because I still have my license active but I guess i have to move my project to another engine. That was the solution I found.

    Thank you guys

  • After some research I'm almost 100% sure its because of the Cross-Origin-Opener-Policy blocking the window pop up.

    Does anyone know how to fix this ? This is getting me very frustrated. This kind of setups are always a pain to deal with C3. I'm trying to make this work for quite some time I made it work for Android export from C3 and Unity, from a localhost simple webapp, also using JS on C3 this works but if I can't run it on the C3 editor this makes it impossible to work.

    I leave a print of my console after starting the game and clicking to sign in. Be aware this project has nothing else beside a sprite to click to Sign In on Google Play. The last 2 warnings and 2 errors only show after I click the button.

    Any C3 developer can give me a light on this ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just so that you also understand on Android is working fine. But I can't run it while I'm testing on the Web.

    I have been trying with no success I have it like this:

    If I use a random Client ID the Google popup says not allowed. If I use the correct one it askes for the account and all of that but in the end nothing happens. But both as soon as I click on the sign in button the Alert with Sign In failed pops up. Btw I'm also using Firebase I don't know if that matters but Firebase created these credentials for me when I created the app on my project on Firebase.

  • Hi Thank you so much for you answer.

    Yes I made a test project only for this and if I use the Android apk on my phone works with no problems. But on the web it doens't.

    Maybe there is something wrong with my web client I added preview.construct.net and mywebsite.com to the Authorised JavaScript origins and I have muffin-run.firebaseapp.com/__/auth/handler and preview.construct.net/local.html on the Authorised redirect URIs is this ok ? Am I missing something.

  • I think it has something to do with "Cross-Origin-Opener-Policy policy would block the window.closed call." that pops up after the failed alert. Does anyone know why this happens ?

  • Hi,

    I have been trying to setup Google Play with the GooglePlay plug in on web and on Android. I have done it on web using JS no issues there, but when I try to use C3 plug in the pop up shows to pick the user I pick the one I added to the testers list. And Nothing happens. I have this setup so that I can see if the user can Sign In. As soon as I press the Login Button the Sign In failed alert shows. Then I finish to choose the account the google pop up closes and nothing happens. When I check on Firebase the user is not authenticated. This is pretty annoying because I did it pretty easy with code and it's taking me a lot of time to do it with the plug-in.

    Appreciate any help thank you.

  • Hi,

    I have my project all in JS and I use Firebase. I added the Authentication to my app and it works fine when I use it on my PC and when testing on C3.

    But when I try to log-in with Google on my mobile device it gives a 403 disallowed_useragent and I don't understand what is the issue. I followed the guides on Google documentation for the Web integration I have 2 apps setup on my project in Firebase one Web and one Android. Maybe I'm missing something I'm really struggling with this.

    Thank you.

  • Hi,

    So my project is all in JS and I noticed that if I change the Fullscreen mode to 'Scale outer' the containsPoint(x, y) fails.

    I have a UI layer with Parallax set to 0 in both axis. And I click in the button but it doesn't trigger. My code use to be like this.

    this.i is the instance of that object.

     const myPointerDown = (e) => {
     const l = run.getLayer(layer);
     const [x, y] = l.cssPxToLayer(e.clientX, e.clientY);
    
     if (this.i.containsPoint(x, y)) {
     this._call(f);
     }
     };

    But now this fails after changing the Fullscreen mode. So I made this functions to check if the point is inside the polygon, and looks like this.

     const myPointerDown = (e) => {
     const l = run.getLayer(layer);
     const [x, y] = l.cssPxToLayer(e.clientX, e.clientY);
    
     let arr = run.getObjectPoly(obj);
    
     if (tools.inside(x, y, arr)) {
     this._call(f);
     }
     };
    

    But just happens that I have the same problem because when I use getPolyPointX(x) it gives the coordinates without taking in account the position change on the parallax 0 I guess because if I give it 100% to Y parallax it works fine. In terms of values the Y axis in the editor is 288 and should return ~351, having in account the viewport is 180x320 and I'm using a phone with 430x932. Anyone knows what is my problem and how to fix it ?

  • Ok I found the problem after some time. The solution was pretty simple in one of my animation frames for that Enemy "Slime" the polygon wasn't touching the ground so it wouldn't take into account the side scroller speed so it looked like it didn't move, as soon as I made the polygon touch the ground the problem was fixed.

  • Hy everyone.

    I will try to explain my problem the best I can.

    So I have a side scroller game like Flappy Bird, with some type of enemies. Everything is done using JS.

    I have one enemy that I called Slime, that gives me one issue that none of the others do, this is the Slime:

    So lets say every 1 second the enemy picks one position to go. When the Slime goes to the right it does a hop that moves twice as far as it is suppose to and if it hops to the left it moves half of what was suppose to travel. So my first guess is since this is a side scroller and I'm moving everything on the screen besides the player (including this enemy) the issue is that I need to take into account the travel Speed of the objects movement. And I have done that and the issue keeps happening. All the enemies work fine and all of them use the same class Enemy so it's the same code for all of them.

    After some research on this I found that if I change the Moving animation polygon to stay always the same, so no changes on frames. Puff the issue is gone. And this enemy is the only one that has a different movement polygon, the others don't change much the polygon while moving.

    However I feel this is more a symptom of something I'm doing wrong. Does anyone know why changing the polygon during an animation affects how a object moves ?

    Here is the code I use to move the enmies:

    	 if (this._direction == 1 && !this._hasObstacleRight && !this._nearRightEdge) {
    		 this.i.setAnimation('Run');
    		 this.i.behaviors.Platform.simulateControl('right');
    		 this.Mirror(true);
    		 if (this.CanHop) this._isHopping = true;
    		 } else if (this._direction == -1 && !this._hasObstacleLeft && !this._nearLeftEdge) {
    		 this.i.setAnimation('Run');
    		 this.i.behaviors.Platform.simulateControl('left');
    		 this.Mirror(false);
    		 if (this.CanHop) this._isHopping = true;
    		 } else {
    		 this.i.setAnimation('Idle');
    		 if (this.CanHop) this._isHopping = false;
    		 }
    
  • Hi my question is pretty straight forward. How do I set the Tilemap mapWidth, mapHeight, tileWidth and tileHeight on scripting ? I need to do this because my tiles are generated dynamically. I saw on documentation that the values are read only.

    Thanks

  • Hi,

    When I export my project with minify mode as Advanced or Debug Advanced the screen is black with an error in the console:

    When I open the exported c3main.js file in the line 12096 there is this error:

    My project is all in js and I have a old version that works with Advanced mode.

    I just find this odd being an error on the c3main file.

    Is there anyone with knowledge on the c3main file that can help me identify why is this happening ?

    THanks

  • Basically i want to make a procedural generated map with 40 chunks each. By a chunk I mean a peace of a map pre-made.

    Then i will randomly peak chunks ant put them together to generate a different map all the time.

    However I think I found a solution. I created a json template for each chunk, with type of object, positions, ... And then it loads the json and generates objects based on the configurations of the json.

    But I can't seem to load a json to the tilemap with js i have used things like

    newTile.#private.LoadFromJson('{"c2tilemap":true,"width":12,"height":14,"data":"84x-1,1,2x-1,9x1,72x10"}') 
    self.C3.Plugins.Tilemap.Acts.LoadFromJSON('{"c2tilemap":true,"width":12,"height":14,"data":"84x-1,2x1,2x-1,8x1,72x10"}');
    
    newTile.#privateWi._LoadFromJson('"{"c2tilemap":true,"width":12,"height":14,"data":"84x-1,2x1,2x-1,8x1,72x10"}"' )

    And nothing seems to work. I know that this is not the main question, but can you help ?

    Thanks

  • Yes the json from the tilemaps I'm also aware. I need to have 40 chunks per map for 3 maps so that's 120 layers that I need to have. That just doesn't sound right to me. And working with the layout editor would be better later for maintenance.

    probably i need to find another solution.

  • Hi, so I want to use layouts like templates, that work like chunks of a map. So that I can edit them on the editor.

    My question is how do I create an object on Layout1 that is on the Layout2, while I'm on Layout1 using js?

    I know that I can use layers or global variables but that gets very messy for me.

    Or maybe having some way of downloading the Layout configs in json and using them as json templates.