WackyToaster's Forum Posts

  • Absolutely do use the manual. Sometimes certain APIs are not (yet) available, which is a bit of a bummer, and you have to make your own functions for certain things.

    let tilemap = runtime.objects.Tilemap.getFirstPickedInstance();
    let mouse = runtime.mouse.getMousePosition();
    
    let tile = positionToTile(tilemap, mouse[0], mouse[1]);
    
    tilemap.setTileAt(tile.x, tile.y, 0);
    
    	function positionToTile(tilemap,x,y) {
    	let gridX = tilemap.tileWidth;
    	let gridY = tilemap.tileHeight;
    	
    	let resultX = Math.floor((x - tilemap.x)/gridX);
    	let resultY = Math.floor((y - tilemap.y)/gridY);
    	
    	if (resultX < 0 || resultY < 0 || resultX > tilemap.width/gridX || resultY > tilemap.height/gridY) {
    		return "outside Tilemap";
    	} else {
    		return {"x": resultX, "y": resultY};
    	}
    	
    }
    
  • That's actually a good workaround :D

  • R0J0hound This is really awesome!

  • I'm pretty sure it simply means that any objects that were picked in the event that called the function, will also be picked in the function, and you don't have to pick them again. As in the two random objects I pick in the event, will be picked inside the function, which was not possible this easy previously. The function is still only called once.

    This would have destroyed ALL enemies and set the animation of ALL sprites, but with copy picked it will only do it for the picked instances.

  • That I cannot reproduce. After switching the worker mode on it works as crisp as it gets with the debugger open, which is in my case 144 fps with no hiccups.

    I'll put it in the tracker.

    github.com/Scirra/Construct-3-bugs/issues/5926

  • The browser plugin has an "Is online" condition which is probably your best bet. construct.net/en/make-games/manuals/construct-3/plugin-reference/browser

    Rather than saying that the app requires an online connection and refusing access just because you can't load an ad, I recommend using the space otherwise if you can. For example, if you have multiple games on the store and the user has no online connection, put a custom (offline) banner ad there linking to one of your other games. This can also be a fallback if an ad fails to load for any other reason.

  • Not 100% sure what you are going for but Wordpress has plugins where people can pay for membership access. So you could have it all on one site with a membership area.

  • My first thought was "wait, that's not a thing?" and yeah... it should be a thing!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are custom eases and an ease editor. It's not a formula tho, but isn't that still doing what you mean? oosyrag

  • Heh, yeah that's it. Worker on fixes it. I had worker set to auto and I assume it ended up off because I use a few scripts, but I don't use DOM stuff so I can safely turn it on.

  • Maybe this helps, here's a performance recording from Chrome. As long as the Debugger is on System there's a "Layout" task that takes very long that basically vanishes when switching to another view.

  • Hmm ok then that's probably not it. It also doesn't always happen even in the same project, at least not immediately. I feel like it works at first and eventually starts struggling.

    I'm on Chrome Version 103.0.5060.134 (Official Build) (64-bit) too btw.

  • Same here. I thought it was just my laptop switching between plug and battery so I kinda shrugged it off. But it is indeed the system view. Are you using 3D features by any chance, because that's when I first noticed it, but that may be coincidence.

    I guess it's an interesting way to make a level but it also seems quite wonky/impractical. Many games in general are held together with duct tape tho, so it's a matter of "it works and doesn't cause any issues so who cares". I'm thinking of the infamous train-hat npcs in fallout 3, or the squirrel timers in titan quest. In these cases they were certainly legitimate as they were done as workarounds for engine limitations. Not so sure about the examples.

    I do agree on examples not actually explaining the code properly. I remember looking up an example not too long ago and I just couldn't figure out what exactly the code did because it was a long bunch of sin/cos math stuff with the comment above being "here we make thing work lol"

    I can say tho I 100% have written code before that would make more knowledgeable programmers die from cringe. But I'm trying :V

  • Oh yeah, actually both easystar and the build in behavior use a* and should work as long as you can get the tile count.