derboo's Forum Posts

  • 15 posts
  • Oh, that's smart. The anchoring works quite well for me, thanks!

  • Hi!

    I'm trying to build an interface consisting of a main viewing window and a frame (no scrolling), and I would like it to be compatible with 10:16, 9:16 and 9:19.5 (and anything in between) screens by cutting off the upper part of the frame. Setting fullscreen to scale-inner gets me closest to this, but there the visible area is centered. Is there any way to make it align differently, or an alternate way to get the same result with another fullscreen mode?

    Basically like this, with the different colored portions "added on top" for the longer resolutions:

  • Hi! I'm trying to implement direct mouse controls, eg. when the mouse is moved left, the character moves left, etc.

    However, I want to do this with a limited speed, so my first approach was storing Mouse.AbsoluteX and Mouse.AbsoluteY each tick and comparing the next to see if the mouse was moved, then move the character with my fixed speed, all while hiding the cursor as "none".

    Well, I guess I should have predicted that this approach breaks down when the invisible cursor hits the border of the window/screen, but the character is still somewhere in the middle due to their slower speed.

    Is there any way to check the mouse movement directly (disregarding of cursor coordinates), or maybe somehow influence the cursor position or speed, in Construct 2?

  • OK I found the below method greatly improved performance for me, so I'm posting it for posterity in case someone ever runs into the same issue:

    • destroy all instances of the object(s) in question on start of layout
    • call "Recreate initial" for the object type or family in a specific area once the player gets close to it

    Stuff to be aware of:

    • this works best for games with linear progression where you expect that most or all instances will be destroyed once the player is past them (otherwise performance will suffer the same way as before once all instances in a layout are spawned and not destroyed)
    • make sure Recreate initial is only called ONCE for each area, or you end up with duplicates of the same object stacked on top of each other and/or resetting of areas
    • this messes up z order, so use ordering by layers where it matters.
    • any "for each" type state changes made before entering an area will not affect the instances in that area (cause they didn't exist at that time)
  • Hi, I'm making something with a large number of generic pick-up items (think coins in Super Mario), several hundreds up to more than a thousand per layout.

    I need to make every instance within a certain area move, but checking each instance is very taxing on performance with mobile devices. It appears to be a bit more efficient to do an "is on-screen" check before comparing the precise coordinates, but it's still getting pretty demanding with larger layouts / higher item counts.

    Are there any tricks to speed this up a little more?

    I was thinking about not putting the object instances in the layout editor but instead load them in chunks when certain areas come on-screen, but then again I'm wondering if creating 50-or-so objects at certain coordinates might also cause slowdown on low-end devices? (Also, if I'm going that route, is there any convenient way to turn a layout into a series of create object actions?)

  • I'm building a HTML5 game made in Construct 2 using Cordova with Crosswalk enabled. When testing on low end Android devices, sometimes the game will run well, other times it doesn't and I get hit by severe framerate drops. Same device, same app build, same game situations, huge performance differences, so I'm guessing it's got probably something to do with the environment on the phone, but what might be causing this? And is there anything that can be done about it from the app developer's side?

  • Thanks for the elaborate reply! What I'm hoping to achieve is letterbox integer scale with point filtering on desktop devices but letterbox scale with linear filtering for mobile devices. I'll try fiddling around with the crop setting then, although the way things seem it may be easier to just export two separate versions for this...

  • Well, the only code involved is on button/key/touch pressed -> go to layout, so there's not really much that can go bad...

  • When running my project online, it first shows the loader, then switches to the first layout. After that there is a ca. 5 second period where the layout is functional, but all calls to switch to other layouts are ignored. What may be causing this?

  • Doesn't the engine use the ID to determine the order of layers? Would it in any way hamper with the functionality of your game if you changed it to identify layers by name instead?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Trying one more time with a bump...

    Is the answer "no one knows" or "it's not possible"?

  • Is there a way to switch between point and linear while the game is running?

    Vaguely related, is there a way to change the "Fullscreen in browser" setting (which is valid already in windowed mode, at least in all the browsers I've tried) without requesting fullscreen?

  • OK, in the unlikely case anyone else wants to do this: There's a layer effect that is exactly that.

    Wonder if there's a specific reason why it's not available as an ordinary blend mode, though...

  • I'm certain there's smarter ways to do this, but here's an approach I'd try:

    • When jump button is pressed, start a counter from 0 to max height. With each increase, increase height of the character.
    • Once max height is reached, turn the whole thing around with variable toggle so the number is decreased with each step. - When the counter is back at zero, the jump is over.
    • You can also use the current value of the height counter to make sure characters only can hit each other when they're of similar jumping height.
  • Is there any elegant (read: not too taxing on performance or data volume) way of making an object behave the exact opposite than with the "additive" blend mode?

    For example, if the object is a pixel with the RGB values 0-50-0 and it's in front of a pixel with 100-100-100, I need the resulting pixel that's actually displayed on screen to be 100-50-100.

    I've experimented with opacity settings and gamma values in the overlaying object, but they don't seem to work in any way that can give me the exact results I want.

  • 15 posts