dop2000's Forum Posts

  • Looks like the response from Firebase comes in JSON format. You can load (parse) it into JSON object, then loop through all scores in JSON and copy them into an array. Then sort the array and display sorted values on the leaderboard.

  • Must be the same issue as in this bug report:

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

    Ashley says it's by design, but it feels like a bug to me.

  • I don't understand your question to be honest. Do you have a problem with running the game in preview? Or does the game crash when you run the exported app (APK) on your phone?

    If the APK crashes, you need to get the Logcat log! Not the Chrome log from the preview.

  • You mean when you install the game on Android phone and click its icon - it launches and immediately closes (crashes)?

    You need to collect logcat logs.

  • You can right-click the family, click "Select all in project" and then turn the effect off. This will update all family instances on all layouts.

  • Hmm. I'm confused then. The only place that I can see to choose a scaling mode is under "Full Screen Mode".

    Yeah, it's a slightly confusing name. Should be called "Scaling mode".

    Most common mode is "Letterbox" - it's sufficient for 90% projects. "Scale outer" requires a bit more work, you need to make sure that the app works correctly on ultra-wide and ultra-tall screens, that the backgrounds are big enough etc.

  • You can use LineOfSight behavior (or multiple LineOfSight behaviors with different settings) on the TesterHelp sprites to check if the player is in LOS, or if there are other enemies nearby. It also allows to cast rays, for example if you need to find the exact position of an obstacle between that sprite and the player.

    I also suggest re-using these TesterHelper sprites, instead of constantly creating and destroying them. Keep them somewhere off-screen when they are not needed, and move to the random point when required.

    This whole task is pretty advanced. I recommend studying a few tutorials and built-in examples in C3 on how to use LOS behavior and raycasting. Try to make a very dumb AI first, then improve it bit by bit.

  • I hope I understood your question correctly, here is a demo:

    dropbox.com/s/90po3uh49sekbx1/VisualLeaderboard_dop2000.c3p

  • Here is my idea, somewhat similar to oosyrag's.

    When an enemy needs to move - randomly generate a bunch of destination points in the walking distance and in general direction to the player. You can spawn invisible sprites at each point to make it easier. Then evaluate each point - is it behind a cover, does it have a line-of-sight to the player, is it close to other enemies etc. You can give it a score, say +5 if it's behind a cover, -2 if it's close to other enemies (because you want them to flank the player). The point with the highest score wins and the enemy moves there.

  • You still need to choose one of the scaling modes, it doesn't need to work in full screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What black bar? You mean this?

    Most likely the image in the tilemap is slightly misplaced. Try double-clicking this tile in the Tilemap Bar to check.

  • What scaling mode are you using? Here is an old but still relevant tutorial:

    construct.net/en/tutorials/supporting-multiple-screen-77

    With letterbox scaling all objects will be where you placed them. And the game viewport should be centered in the browser window.

    With Scale Outer or Scale Inner modes you might need to enable "Unbounded scrolling" in properties for each layout. You can use Anchor behavior for UI objects. And of course set zero parallax and scale rate for all UI layers which you don't want to be scrolled or scaled.

  • Yeah, I'm currently using EasyStarJS C3 addon in several big projects, it's working great.

  • Not sure if this will be helpful, but check out this link:

    howtoconstructdemos.com/communicating-with-an-iframe-in-construct

  • Your mistake is that your are moving the Base sprite with 8-direction behavior. Or changing its position on every tick, which is essentially the same.

    You should only move physics objects with physics actions (set velocity, apply force, impulse etc.). Never use other movement behaviors or change position/angle of physics objects directly, especially when there are joints.