Makoren's Forum Posts

  • Will the Line of Sight behaviour work for this? You could add an object at the position of the 3D camera, and then check to see if a tank leaves that object's line of sight to set the opacity of the wall.

    Example: editor.construct.net

  • I'm able to achieve this through the Add Child action in the event sheet, so it seems to be possible in the free version. But it's still strange that it doesn't show up in the editor.

    This solves my original problem, by the way. The player sprite now moves independently of its parent. Thanks!

  • The link says to select all objects and then right click the parent, but I don't see any option for that. Right clicking also clears the selection.

    Is this because I have the free version? I don't see any details on the pricing page.

  • I have the tile movement behaviour on my player object, and I want to use the sine behaviour in Vertical mode to give the player a bit of bounce when it walks. But both behaviours are trying to move the player at the same time, which causes issues.

    Is there a way to separate the sine behaviour's position from the tile movement's position, or otherwise desync the player's position from the tile movement behaviour?

    I've already tried separating the player sprite from the object that uses the tile movement behaviour, but I still need to set the position of the player sprite to keep the tile movement in sync, so I get the same issue.

  • I can make the slope using images with custom collision shapes, but how to I figure out the correct angle to use for the player's gravity and angle?

  • Nevermind I solved it, I used the "Tween (value)" tween instead, so I could specify 0 and 360 as the start and end values. Then while that specific tween was playing I set the sprite's angle to that tween's value using Self.Tween.Value("rotate").

  • If I try to tween normally with the "Tween (one property)" action and set the angle to 360, it won't rotate at all. I tested doing a tween to 350 instead of 360, but instead of doing a spin, the tween takes the shortest route to 350, which meant rotating 10 degrees in the other direction.

    Is there a way to decide which direction the object rotates, or should I use a different method? I want to apply an easing curve to the object when this happens.

  • From what I understand, one player is the host for a game, and other players connect to that player as peers. If peers leave, the game continues, but if the host leaves, all peers are kicked.

    What if I'm hosting a game with 3-4 players, and the game is designed so that it doesn't matter if one player leaves? If that leaving player is the host, the game would just shut down, even though that's not ideal.

    Is there a way to turn a peer into a host when this happens to avoid kicking other players?

    P.S: I'm aware of the dedicated server option, but as a solo developer with not a lot of money to pay for servers with I'd like to avoid that option if I can help it.

  • I want to make most of my game in JS, but also prevent players from seeing my game's functions in the console, which means I want to use globalThis sparingly.

    For example, I have a Player class which is applied to my Player object type using setInstanceClass(). Since createInstance() doesn't take any constructor arguments, I made a static function called create() to allow me to add properties to the instance after it gets created.

    The problem with this is that the Player class is global, so a player could easily go into the console and type Player.create() to create a new player object.

    However, I'm not sure how I would go about this while also letting the rest of my code access these functions.

    The only potential solution I've found wraps an IIFE around the Player class so that it's locked away from global scope, but now this means I can only access this class from within the IIFE.

    What's the best way to solve this?

    P.S: It looks like runtime is required to do anything with your game's code. Is this fact alone enough to solve this problem?

  • There are existing solutions to loading the Kongregate API already, like using Execute Javascript calls and loading the API from an exported HTML file, but it would be much more convenient to load the API directly from JavaScript.

    I've done two things to try and make this work. I have this code as a separate main.js file:

    runOnStartup(async runtime => {
    	kongregateAPI.loadAPI(() => {
    		globalThis.kongregate = kongregateAPI.getAPI();
    		alert("Kongregate API successfully loaded!");
    	});
    });
    

    And I've also tried loading the Kongregate API by copying the contents of that file into a new script. However, this causes a syntax error, if I understand correctly this is because of the automatic strict mode.

    Is there a way to achieve this with JavaScript alone?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to start moving at max speed immediately, but there doesn't seem to be an option to disable acceleration and deceleration. How do you do this?

  • If I use the Javascript beta release to make a game, is it a good idea to release the game using the beta build? If not, will I be able to transfer the project I make into the stable release once it becomes stable?

  • Yep, cutting down the size of that sprite sheet fixed it. Thanks.

  • [SW] Up to date

    c3runtime.js:2 Made with Construct 3, the game and app creator :: construct.net

    c3runtime.js:2 [C3 runtime] Hosted in DOM, rendering with WebGL 2 [ANGLE (AMD Radeon (TM) R9 200 Series Direct3D11 vs_5_0 ps_5_0)]

    register-sw.js:1 Registered service worker on <site I don't want to disclose>

    There are no console errors or warnings. The browser I'm using supports WebGL.

  • Project file: ufile.io/4y5qr

    The game runs fine on both Windows and Mac, but it will not work on iOS or Android. On iOS/Android the game will load the background color, but nothing else. Tested on the latest version of Chrome with the latest version of Construct 3, on both Remote Preview and by exporting the game as HTML5 and hosting it.

    Does anyone know what the issue is here?

    EDIT: Should have mentioned that I can make a new project, and it will work on mobile just fine. This problem appears to be specific to this project.