Aphrodite's Recent Forum Activity

  • Never mind I figured it out

    Also in some cases, when unbounding scrolling is On, you don't have to worry a lot about those things (since the center of the screen is always centered when it is not limited by the layout borders)

    And for elements that needs to be placed relative to the corners, you can take a look at the anchor behaviour

  • droptank21 : just tested it on my tablet (a samsung galaxy tab 3 10.1"):

    a long black screen followed by an error message:

    "Application Error

    The connection to the server was unsuccessful. (file:///android_asset/www/index.html)"

    The thing I found weird was the file:///, I though only "://" could be in a protocol, not ":///"

  • RamPackWobble does this work for both portrait and landscape, for example if I start in portrait and its centered and then I rotate my phone will it recenter in in landscape?

    Yup, since the viewport expressions update every tick , it should work

  • I find that lot's of dev's use 1 object per game button, 1 object per bullet type, 1 object per enemy.... so on etc. In the end they have around 200 objects and at any one time they may have 50 different objects.

    Where as if all the buttons, bullets... small stuff were in 1 Sprite used as an atlas using animations and frames. that would be better.

    I cannot be sure but, wouldn't that be worse when not all objects are used at the same time?

    Since the webgl renderer I think only load needed textures, doing that would force everything to be loaded at startup from what I understand

  • Hi, how can I create link between two instances ? In normal programming you can do this by setting "instance variable" on an object and then assign another object to this variable, but in construct it seems that only 3 basic types are allowed for instance variable: string, number and boolean.

    I would like to make connection between two objects, because I have tower (with turret behaviour) that shots bulets. Now when bullet hits enemy, i have no way to get somehow tower that has shot that bullet, but i need to get this tower because I want to increase experiance for it.

    Only way I see to do so is to put number variable on bullet, pass UID to that var while creating bullet and then add condition pick tower where tower.UID = bullet.tower_UID on the bullets with enemy collision event.

    Is there better aproach for such thing ?

    Have an instance variable for your bullet (a number) called TowerID

    When you create your bullet, set it's variable to the unique Id of the tower that spawned it (Tower.UID if Tower is the name of the tower)

    Then you can later do :

    Bullet on collision with Ennemy:

    Pick Tower by UID TowerID : add experience

  • I am using construct 2 to export html5 to coherent UI but when I do the transparent layers appear as black. Is this a known bug?

    I have used transparent layers in Coherent UI from other html5 software without issue.

    I don't know if that could be the cause, but I think that the index.html C2 export has a black background by default.

  • Every tick set position to

    X : clamp( sprite.X, sprite.width / 2 , ViewportRight(0) - sprite.width/2)

    Y : clamp( sprite.y, sprite.height / 2 , ViewportBottom(0) - sprite.height/2)

    To be more accurate:

    If the sprite has his origin at the center:

    set position to

    X : clamp( Self.X, ViewportLeft(Self.LayerName)+Self.Width/2 , ViewportRight(Self.LayerName) - Self.Width/2)

    Y : clamp( Self.Y, ViewportTop(Self.LayerName)+Self.Height/2 , ViewportBottom(Self.LayerName) - Self.Height/2)

  • CocoonJS is simply incompatible with the multiplayer object (no WebRTC support I think), but does a project with an unused multiplayer object also crashes? or only when you are using it?

  • I was wondering what is the ideal number of collisions per tick?

    When i say ideal i mean the ideal check collisions per tick to run a game smooth.

    300 check collisions per tick, should i worry or not?

    So yeah, that is my question.

    It depends on different factors, In the debbuger you can see both type of collisions checks:

    -Collision checks: It is a quick bounding box collision test, if this test is true, then it does the polygons check to see if the collision is truly happening.

    -Poly checks: a costly collision check, based on the collision polygon, this one should be as low as possible IMO.

    I think that the best is to not have useless collision checks, for exemple, is it useful to check every tick the collision between a giant slow canon bullet and a slow moving target (I mean in a case that they'll overlap during 10 tick in any case)? I think in some cases, you could try to filter those cases where the collision doesn't have to happen each tick (maybe by disabling collisions), but only if needed, also the collision cells can really help so filtering instances isn't always the best.

    As for the quantities of collision checks, I guess it depends of the targeted platform, just try to not check useless things if that helps

  • Up

    I can think of two potential solutions:

    -Do not use anchor, but instead place the sprite using the ViewportTop; ViewportBottom; ViewportLeft; ViewportRight expressions or

    -Replace the sprite accordingly, for exemple if you grow it of 10px width, move it 5px to the left, and same goes for height and going up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hola guys,

    when you want to adjust your sprite with the Collision Polygon, construct gives it automatically a few points where you can manipulate the line. Is there a way to add more points to this line?

    you can either :

    -Double click one of the points

    -Right click one of the point and add one

    I think it adds it clock-wise, but not sure (Also keep in mind that the platform behaviour works best with a rectangle hitbox, so you might want to think about having a separate object having the platform behaviour if needed)

  • Hi guys,

    I need your help to create a "mirror effect".

    I would like to do a platformer with the screen cut in 2 parts. The top part with the player and the bottom part with its twin that do exactly the same things but in reverse.

    Any clues or solutions would be appreciated.

    Thanks a lot!

    Cheers

    Just a though, I cannot test it now:

    One solution would be to have the gravity reversed on the bottom sprite (I think that could work), so both of them move the same way, but in reversed.

    If it is only graphical (aka: the bottom part isn't use differently compared to the upper one), you could just set the red sprite position accordingly.

Aphrodite's avatar

Aphrodite

Member since 20 Dec, 2011

Twitter
Aphrodite has 2 followers

Trophy Case

  • 12-Year Club
  • 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
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies