AllanR's Forum Posts

  • I can take a look at that, shouldn't be too hard but have to change a couple things in the way it looks for matches (and want to optimize the code a bit).

  • found a couple of bugs... with moving blocks too quickly (starting a tween while one is still running), and suggestions when there are no moves and after an invalid move. I will post an updated version later today, maybe with a few more comments to help explain what is going on as well.

  • I decided to give it a try as well...

    I started with your code, and figured it would be fastest using an array so ended up doing what made sense to me - but haven't put many comments in yet so it might be hard to follow.

    The board can be any size, just change the Columns and Rows global variables and everything else will adapt. I fixed a number of issues - now it wont let you make a move until all other blocks have stopped moving, if you make an invalid move it will reverse it, as long as you hold down on a block you can move it back or another direction (you have to let go to finalize the move), multi touch will only allow one move at a time...

    after a move has completed it makes an array of all possible moves and then sorts them by the number of blocks that will be removed. This will prioritize a move of two sets of 3 over one of 5 in a row. This could be changed by making the scoring work differently, but this is a start... it shows the recommended move as soon as it has calculated it for testing purposes, or you can click the Hint button.

    https://www.rieperts.com/games/forum/Match3.c3p

  • to sort your array you pretty much will have to convert you words to lower case - using lowercase(text).

    what you could do is make your array 2 dimentional where the y=0 is the lowercase version of the word, and y=1 has the unconverted word.

    Then you can sort the array on the x axis.

    Another thing I have done with very large arrays is use a second array to filter and build a key to sort on (when I had to sort based on more than one field from the main array). the index array had the key in the 0 column, and the line number back to the main array in column 1.

  • take a look at this thread: in the middle of the second page it has a demo of how to draw a path and have an object follow it.

    https://www.construct.net/en/forum/construct-3/general-discussion-7/collection-demo-projects-149701/page-2

  • Awesome tutorial! Nicely done.

  • this is called Picking.

    by default, all instances of an object type will be Picked for an event on the eventsheet (unless a mouse click or some other trigger singles out one instance). There are many ways to filter out or pick smaller groups of an object.

  • Choose adds a random chance into the equation.

    if you want to increase by percent you just have to express the percentage as a decimal, so 0.1 would be 10%, or 0.05 would be 5%.

    multiply the current attack by the decimal to get the amount to add

    PlayerAttack = PlayerAttack + 0.05 x PlayerAttack

    would add 5% more attack to the current value.

  • I tried a bunch of ways to replicate that, and couldn't... seem's like a glitch. I would try updating everything - Chrome, C3, video drivers, etc. reboot and try again.

    if that doesn't resolve it, then try making a small version of your file for others to test to see if we get the same results.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • tick rate is determined by the hardware, so you can't adjust that.

    what you can do is remember where the last tick pasted and compare that to where the current tick will paste and if that creates too big of a gap then calculate how many extra paste steps you will need to fill the gap and space those out evenly. (and do that all in the same tick)

    if pasting to a canvas is too slow and processor intensive, it may be easier to create instances of the brush and then paste them all after each "stroke" is finished.

  • the problem is in event 6

    you are trying to pick the Personnage1 instance associated with Pointmove.Element, but when the condition is checked there are multiple Pointmove picked by default so it ends up filtering Personnage1 instances against the same Pointmove.

    you could add a "For Each Pointmove" subevent under event 6, and then the Pick Personnage1 by UID...

    - System is Play

    - - For Each Pointmove

    - - - Personnage1 Pick instance with UID Pointmove.Element : Personnage1 - Move To(Pointmove.X, Pointmove.Y)

  • if there is no interaction on the players part, maybe the phone is going into a lower power mode where it can't maintain the frame rate, as soon as you start interacting again it goes back to full power?

  • I would put all the data in an array, the tutorial step would be the index to the array. Then one set of actions can set the text, size and position, and you can completely change the array without having to change any code.

  • I would put the characters in a family and give the family instance variables to identify the team and type and any other options.

    you can also define image points for each character with the same names so you always know right where things go.

  • if you reference the instance variable in an event sheet, then it takes away your ability to change the type, since you may be trying to check in a way that wont work with another type. You will have to remove all references in the event sheet before you can change the type.