WackyToaster's Recent Forum Activity

  • You can set a minimum framerate, this clamps dt to a maximum. Making games run at slow motion if they fall below that, this is set to 30 fps by default. So this is basically a fixed tickrate, at least from one way.

    This doesn't solve the problem. If I set it to 60, everyone with a quicker screen has different results. If I set it to anything higher, it will run in slow-mo for slower screens. That's no good.

    I think ideally you don't want to design the game around extremely tight timings and precision. Not only for dt but other imprecisions like input delay etc. in case the player has to react.

    I understand, but I'm not even doing that. It's just that the difference is so big that it ramps up quickly and noticeably. If there was a difference of a few pixels I'd not have noticed it. The specific part I have made simply requires 2 of those interactions, and the jump is significantly harder to pull off at low framerates, as the character simply goes ~48-64 pixels lower than it should.

    Alternatively you could instead animate something like this with the timeline, which I think will be much more consistent across framerates.

    That is not gonna work in my case, I'm not gonna animate the player character in a platformer :V

    I guess my last option would be to hardcode the values but I think it would be more fun if I don't? Also who knows where else that issue creeps up again in a different form. Afaik other engines avoid this usually by being able to lock the tickrate e.g. the physics always tick at 30 fps regardless of the games framerate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've noticed there's a couple of things that appear to be framerate dependent and there doesn't seem to be a way to actually solve this. Take this setup for example:

    wackytoaster.at/parachute/framerateindep.c3p

    It's as simple as it gets. Sprite1 collides with sprite2 and sprite2 vectorY is logged in the console. (then layout restarts and does it again)

    While the results are consistent over and over again for the same framerate (ignoring minute differences), it gets ugly once I switch it. My screen supports up to 240 fps, so I can easily test it.

    And there we have it. A difference in vectorY of 20! I knew beforehand that deltatime has some imprecision, but this is too large to build around.

    60fps -> 875

    240fps -> 894

    4500fps -> 897 (unlimited mode)

    Based on that it seems that the error gets exponentially smaller at higher fps, but the important ranges of 60-240hz (which I think 99.99% of screens fall into) have quite large differences.

    My project (or part of it) relies on this specific interaction actually, and the compounding error over multiple of these interactions is very noticable. I only see two options. Either I figure out some kind of formula that accounts for the differences somehow or I ship it with unlimited mode, simply assuming most computers will manage to run it at 240+ fps.

    The third option is to use a fixed tickrate for the engine which is not possible in Construct from my understanding. Though maybe it is considering there's an unlimited (ticks only) mode?

    So... what can I do? Any ideas?

  • Funny enough, I've many times encountered the issue of "events/actions running that aren't supposed to run, but without noticable bugs"

    I usually notice it when I add sound to things and the sounds go haywire unexpectedly. The event/actions in it do not cause any other issues, resulting in an event being run every tick for no purpose. I'd assume that's kind of an invisible performance sink, especially if it happens with multiple eventblocks and per object.

    I also notice it sometimes when putting browser.logs somewhere and then see it being triggered constantly when it shouldn't, but your headphones blowing up with 240 sounds/second is much more prominent. :)

  • If you are using event sheets and don't want to program, then a tool like Construct makes it possible for you to make your game whereas otherwise it could have been impossible.

    That's the best point imo.

  • I think there's a couple of things to consider. Finding additional support for example seems more like a you-problem and not the publishers problem, and possibly can be avoided with careful planning/scoping. (Not that I have the ability to not woefully overscope everything I touch...)

    The export to console is a little bit of a bummer, but in reality there's probably not that much difference I think. Even if the engine technically supports export for consoles, it's more than likely that it will not work out of the box. You will almost certainly have to do porting work, regardless of engine. The only difference would be that you could do the porting work yourself, which sounds like an absolute anti-fun nightmare to me. Ratalaika (aka one of the companies that does porting) covers all porting costs and ports for a % of revenue. At least that's what they told me last time I asked. Sounds like a perfectly fine deal in my book. If the game is well received, it will still be worth porting and as such will still be worth for the publisher, just not as much I guess. Not to mention the publisher will make damn sure they get their share of money either way.

    Not sure about sustainability/maintenance to be honest. I'd guess that well thought out eventsheets are similarly sustainable as well thought out code, and terrible code will be just as bad as terrible eventsheets. Also you CAN do a large portion in code if you want.

    I guess my bottom line is to worry a bit less about the publisher. And if you show the publisher an absolute banger game, they probably really don't care if it's made in Construct or not.

  • If on the eventsheet, you can do the picking in the conditions and then use

    runtime.objects.H1.getPickedInstances()
    

    Outside of the evensheet you can do

    let instances = runtime.objects.Sprite.getAllInstances(); //returns an array of all instances
    let pick = instances.filter(i => i.uid === 3)[0]; //filter the array based on UID. Just replace "3" with your variable.
    	
    pick.angle += 1; // do whatever you wanna do with the object
    
    
  • Just for fun I created a project with 6k objects, 22k events and 68k actions, all in a single eventsheet. I can tell that performance is tanking at this point, extremely so on the eventsheet. It's pretty much not useable at this point, as every action taken there takes a good 3 seconds. Just switching to it freezes construct for maybe 20 seconds. I'd argue tho that nobody is insane enough to have 22k events all on a single eventsheet.

    On the layout view however I notice little impact, though it gets slightly laggy once I open up the folder in the project view that contains all 6k objects. About 0.2 seconds delay that goes away if I close the folder again. Very much useable. I've increased the objects to 12k even and now it certainly starts lagging more, but still not unuseable, and closing the folder also still fixes it.

    I've been mucking around in the project a while, but apart from switching to the eventsheet I don't have any freezes longer than a few seconds, and even those are only on the eventsheet. So... I dunno.

  • Lord have mercy 17k events, 25k actions, 4k object types! That's like orders of magnitude larger than my largest project, which is like 500 events tops. No wonder I have no issues lol. Out of curiosity, what are you building?

  • I just wanna chime in and say I haven't seen any issues. How big are your projects roughly?

  • Is shift down -> set value to X

    Is shift not down -> set value to Y

    Does that not work?

    construct.net/en/make-games/manuals/construct-3/project-primitives/events/conditions

  • You can save a tilemap with tilemap.asJSON and load that data into the tilemap.

    You can also use a custom way of parsing your data. I personally did that, you just have to loop over an array and then depending on the data and the cell location set a tile on the tilemap.

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 25 followers

Connect with WackyToaster

Blogs