Magistross's Recent Forum Activity

  • Viewport size has nothing to do with the map size, it's basically the size of your game's window.

    The actual tilemap should be sized to 128*TileWidth X 168*TileHeight.

  • Newly created objects becomes available at the next top-level event, not at the next tick.

    I tried recreating the problem but the count expression in my case always returns the expected value. I must be missing something I can't see from those screenshots.

  • Objects are actually created at the end of the tick.

    Not quite, objects are created directly with the action. However, they are not available to be filtered/picked until the next top-level event. The "Pick by unique ID" condition is the exception to this rule, it can be used to pick any object, even if it was just created within the same event stack.

    That said, I still don't understand why the "count" expression is acting so weird, and I can't seem to be able to reproduce said behavior.

  • Function with return values cannot be called with actions. So if you don't see your function in the list, that's most likely the reason.

  • "balance="&balance&"email="&email

    This is incorrect.

    "balance=" & balance & "&email=" & email

    This should work. The space characters are superfluous but help a ton with readability. As Ashley said, preview your data string in the debugger or console and you'll see if it is valid or not.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    But why would you avoid loops ? They are one of the fundamental building blocks of coding !

    As a rule of thumb, I steer clear of "Wait 0". Rarely do I really want to postpone actions back to the end of a tick.

  • It's something that could indeed be useful, you ought to suggest it on the C3 suggestions & ideas platform, if it's not already there.

    construct3.ideas.aha.io/ideas

  • I expanded my example to switch over to the wallclock check explained by Ashley.

    github.com/Magistross/Magistross.github.io/raw/master/files/progressWallclock.c3p

    There's still plenty of room for improvement, but the basic idea is there.

    20 millions iterations, done while trying to keep FPS at 60.

  • Just a small bump for those following this topic, I uploaded a new version with a bunch of improvements and dedicated for the C3 runtime. Get it while it's hot !

  • Using "else" is the proper way to deal with this particular situation. All your triggers have complementary condition, so you should just completely replace every second condition with "else".

  • You need to use the "main" loop, to execute a set amount of "units of work" per tick. Otherwise, the whole thing is gonna hang while the logic is running.

    Check out this file : github.com/Magistross/Magistross.github.io/raw/master/files/progress.c3p

    10 millions of "units of work" (that does nothing) are ran per tick, after each time the progress is updated and the screen is refreshed. You can tweak the amount of "units of work" you want done in a tick, higher numbers will make your FPS drop to a crawl, but less time is loss updating the screen/progress.

    You will however need to change how you implemented things so you can exit the local loop mid-task without crashing everything :P.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies