dop2000's Forum Posts

  • In some of my match 3 demos, instead of creating a swipe directional recognition, I used a single touch trigger.

    You mean when there is only one possible match at that location?

    Otherwise it can actually be frustrating for players if they want to swipe right and the game swipes left instead.

  • So when the NPC reaches the location (water) it doesn't stop and continues to walk?

    There is probably something wrong with your code, it's hard to tell without seeing it.

    Maybe you are interfering with the sequence of pathfinding events somehow, for example calling "find path" repeatedly while NPC is still moving or something like that.

    For priority you can add some kind of ImportanceFactor. Say, for thirst set it to 1, for food 0.8, for tv 0.3

    Then to determine which action NPC should take, divide each instance variable by ImportanceFactor, for example:

    hunger=3 / 0.8 = 3.75

    thirst=3 / 1 = 3

    tv=2 / 0.3 = 6.66

    So the NPC should go drink first.

  • I'm creating a puzzle game with 200+ levels.

    It's based on Match 3 concept, but the gameplay is completely different.

    For the purposes of this post, imagine it's a variation of Candy Crash Saga. (although it's not )

    There is a lot of randomness in the game and levels are generated randomly, so the final score for each level depends not just on player's skill but also very much on luck.

    Besides, players can use magical gems during the game which can significantly increase the score in each level.

    Basically what I'm saying is that scores in each of individual levels are not that important, as they can vary a lot and don't represent payer's skill.

    This and the large number of levels makes me think that making 200 online leaderboards (one for each level) is probably not a good idea.

    But I still want the players to be able to compete with each other.

    I'm thinking of several ideas:

    1. Pick just one score - the highest of all levels. The problem is that some levels are much easier than others, so again, this will not be an accurate way to measure the skill.

    2. Cumulative score of all levels (sum of all scores). The problem here is that a less skilled player who finished 150 levels will have a larger cumulative score than an expert who finished only 50.

    3. Average score. It's the most accurate method to measure the skill, but the average score is very inert, it will be hard for players to improve it.

    4. Total number of stars. At the end of each level I'm awarding 1,2 or 3 stars. This method has the same disadvantage as #2

    5. Break 200 levels into chapters. Have a separate leaderboard with cumulative score for each chapter. My levels are grouped by 10, this makes 20 chapters and leaderboards - still quite a lot...

    What should I choose?

    I don't play many mobile games, so maybe a better solution is already invented, I just don't know about it?

  • Main article:

    https://www.polygon.com/2017/9/2/162471 ... er-secrets

    The original twitter thread is very long but also very educational. Here are a few tweets that caught my eye:

    [quote:3srgzcc0]In games with nitro/boost mode, the actual speed increase is often small, hidden by the FOV pull + psychological sensation of being "faster"

    In Bioshock if you would have taken your last pt of dmg you instead were invuln for abt 1-2 sec so you get more "barely survived" moments.

    The thugs in Arkham Asylum will avoid doing 180' turns at all costs to allow you to feel stealthy and sneak up behind them.

    The Suikoden's world map is made to not frustrate players. If players walk in a straight line, less enemies will appear, bc they're clearly trying to go SOMEWHERE and don't want towaste time. If players zig-zag around, more enemies will attack, to help them grind.

    In Stellaris, we use 'tit-for-tat' mechanics to make the computer feel more human. For example: If you insult an AI-controlled empire... they usually insult you back, and grabbing space near them will make them prioritize taking systems it thinks will annoy you.

    In Bloodborne, if you're reloading your weapon your character's collisions are temporarily disabled to give you a safe reload period.

    Small enemy colliders on 2D platformers for that feeling of *Just* dodging them.

    In Infamous, if you fire and your crosshair just tracked across an enemy, we'd retroactively make it so you fired at the exact right moment. Makes it feel like your aim is better than it really is, without the usual auto-aim effect of "the game is aiming for me".

    Peggle had a hidden "luck" variable that was cranked up for the first few levels that made the ball bounce in the most beneficial angle.

    Would be interesting to hear from Construct developers - what secret mechanics do you have in your games? <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Using a boolean variable seems like a good solution.

    On every tick -> call Function.ProcessOne()
    
    Function ProcessOne()
       Pick Family where isProcessed=false
           Pick random Family instance -> do something with it, set Family.isProcessed=true
       Else
           Pick All -> Family set isProcessed=false
           call Function.ProcessOne()
    [/code:bv3nyqfd]
    
    There is nothing in this code that could affect performance, it should work very fast. Function will be called recursively only once in many ticks.
  • So when unit 1 or 2 is overlapping the obstacle, it should be considered as in LOS?

    Don't think it's possible, but you can simply add overlapping check as another event. For example:

    1. UnitA has LOS to EnemyUnit -> UnitA fire bullet to EnemyUnit

    2. EnemyUnit is overlapping Obstacle -> UnitA fire bullet to EnemyUnit

  • Sorry, I didn't understand your explanation <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    What I meant is this:

    https://www.dropbox.com/s/3229duj1g2im1 ... .capx?dl=0

    Use another sprite with Bullet behavior just as a source of coordinates (X, Y, angle of motion, angle of reflection).

    You can then use these values in your formulas and reposition your main ball sprite - invert angles etc.

  • Particles trail works quite well:

    https://www.dropbox.com/s/0mk2sskzt6emm ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is it a Construct 3 file?

    I don't have C3 and this forum is for C2 projects. You need to post your question here:

  • Something like this?

    https://www.dropbox.com/s/1iiq5dg88npzj ... .capx?dl=0

    It looks terrible, but I hope it's what you were asking.

  • Can you do it without the gyroscope first? Say, using mouse or keyboard controls.

  • Set time scale to 0 for objects that you want to be paused.

    Set global variable isPaused when the game is paused.

    In your spawning event add another condition checking if "isPaused=0".

    Or instead of spawning "Every X seconds" use Timer behavior on your spawners sprites. Then when you set spawner's time scale to 0, its timer will also be paused.

  • You do not have permission to view this post

  • I'm guessing you have different events for different sprites?

    Mouse -> On Sprite1 clicked -> (start dragging Sprite1)

    Mouse -> On Sprite2 clicked -> (start dragging Sprite2)

    etc.

    Just create a flag (a global variable) isDragging. Set isDragging=1 when a sprite is clicked, reset to 0 when it's dropped.

    Add a second condition to all these events:

    System-> isDragging=0

    Or if all these draggable sprites are in a family, and you have just one event (Mouse->On DraggableFamily clicked), add DraggableFamily->Pick Top Instance as a sub-event.

  • I have a different idea for you.

    Create an invisible "shadow" clone of your ball sprite with Bullet behavior and "Bounce off solids=yes" and gravity if needed.

    Use its coordinates to adjust your main ball coordinates.

    You can even do this with physics behavior, see my comment in this post: