bartalluyn's Forum Posts

  • It's not exactly the same, but very similar:

    this video shows how to end the game when the bouncing ball hits the bottom.

    youtu.be/ZBJSSRZrILY

    If you're new to Construct, make sure to check out all of the other example projects where you can get a good idea of how certain types of games work.

    cheers!

  • several of the games on my youtube channel use popup windows.

    May that can help?

    youtube.com/playlist

    cheers!

  • I concur with dop2000, just watch this video

    youtu.be/S8OJBf4B5_E

    you can even get the free template. Make sure to watch the other video's on my channel to get some more tips & tricks

  • I actually think that's normal behavior. If you change the origin of your sprite, the x and y position on the layout will stay the same. Only the image will move relative to the origin. So if you put your origin at 0,0 instead of center, the image will just shift with height/2 and width/2, and keep the x and y position the same.

    Maybe it's better to use another image point instead of origin?

    But i'm not sure if I fully understand your question...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • sure! but that's a very generic question. Maybe some more specific questions might be helpful.

    If you're a complete beginner maybe you can check out the video's on my channel. I've pasted a link to a playlist with some easy and some harder games to make. You'll get inspiration on the general way of working and maybe it will help you on your way.

    youtube.com/playlist

  • Not sure I understand correctly, but have you tried a sprite instead of a button, and find the path to the x-y position of the sprite? You'll need the mouse plugin & check for on object clicked event of the mouse plugin to check for a click on the sprite.

  • Hi,

    I changed to code of the match 3 template to also allow a suggestion by pressing the "S" button in the interface. It holds a rather easy solution by checking if the top left and bottom let or top right and bottom right jewel are the same of the center jewel.

    A function with a pretty straight forward logic you can easily adapt.

    The guys at scirra just approved the version on the store. Feel free to pick it up if you still need it. I copied the code of the function below in case you're interested

    cheers!

    * On function 'CheckSuggestion'

    | Local number suggestionfound‎ = 0

    | Local number curcol‎ = 0

    | Local number currow‎ = 0

    | Local string curtype‎ =

    | Local string typeTL‎ =

    | Local string typeTR‎ =

    | Local string typeBR‎ =

    | Local string typeBL‎ =

    ----+ (no conditions)

    -----> suggestion: Clear

    ----+ System: For "columnloop" from 0 to NUM_COLS-1

    --------+ System: For "rowloop" from 0 to NUM_ROWS-1

    // once a suggestion is found, stop searching for it

    ------------+ System: suggestionfound = 0

    ----------------+ (no conditions)

    -----------------> System: Set curcol to LoopIndex("columnloop")

    -----------------> System: Set currow to LoopIndex("rowloop")

    -----------------> System: Set curtype to Functions.GetJewelTypeForCoordinate( currow, curcol )

    -----------------> System: Set typeBL to Functions.GetJewelTypeForCoordinate( currow+1, curcol-1 )

    -----------------> System: Set typeBR to Functions.GetJewelTypeForCoordinate( currow+1, curcol+1 )

    -----------------> System: Set typeTL to Functions.GetJewelTypeForCoordinate( currow-1, curcol-1 )

    -----------------> System: Set typeTR to Functions.GetJewelTypeForCoordinate( currow-1, curcol+1 )

    // powerups don't count for suggestions

    --------------------+ System: curtype ≠ "cross_powerup"

    ------------------------+ System: curtype = typeTL

    ------------------------+ System: curtype = typeBL

    -------------------------> System: Set suggestionfound to 1

    // add jewels to dictionary for highlighting

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow & jewels.column = curcol

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow-1 & jewels.column = curcol-1

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow+1 & jewels.column = curcol-1

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    ------------------------+ System: curtype = typeTR

    ------------------------+ System: curtype = typeBR

    -------------------------> System: Set suggestionfound to 1

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow & jewels.column = curcol

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow-1 & jewels.column = curcol+1

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    ----------------------------+ System: Pick jewels by evaluating jewels.row = currow+1 & jewels.column = curcol+1

    -----------------------------> suggestion: Add key str(jewels.UID) with value 0

    // Possible extension : also check TR + TL or BL + BR

    ------------------------+ (no conditions)

    -------------------------> (no actions)

    // Finally also return the number of values in the explode dictionary, so expressions that call this function can check if there are any matches in the entire grid

    ----+ (no conditions)

    -----> Functions: Set return value suggestion.KeyCount

  • You could watch this video where I use the local storage plugin to store a variable for the best score, and then load the best score when the game starts again.

    You can use it to store cur_anim.

    youtu.be/6Lyj2oQexGU

    good luck

    cheers

  • Hi rafaeltrigo

    thank you for the vote of confidence, and challenge accepted.

    I will change this tomorrow, and let you know.

  • Hi,

    I think it can be done using a simple algorithm that loops through the shapes.

    For each shape

    - "pretend to drag it to the left"

    see if there is a match horizontally

    Yes: Add UID's of matches to a temp array

    No: continue

    see if there is a match vertically

    Same yes/no logic

    - "pretend to drag to the right"

    same

    - "pretend drag up.." & same

    - "pretend drag down.." & same

    Finally highlight the UUD's somehow

    something like that. maybe there are more optimal way, but i'm all for easy solutions

    Hope that helps

  • Hi,

    maybe you can check my tutorial on multiplayer card game where I do some serialzation between peers using json.

    youtu.be/BpnkIL7XvvA

    Hope it helps

    Cheers!

  • Hi,

    if you want another take on how to create this type of games, maybe you can find inspiration on my youtube channel. For example, the endless runner

    youtu.be/AzcBG4OYZU0

    or even may piano tiles, which also constantly keeps on spawning things, but only not pillars like flappy bird, but piano tiles;

    youtu.be/6Lyj2oQexGU

    Check them out, hope it helps!

    Cheers

  • Hi,

    you can watch my tutorial on match 3 game on my youtube channel.

    It's fully functional, so maybe you can get more insights here.

    Hope it helps

    youtu.be/9ISEJK8vtZI

    Cheers

  • Hi,

    You can check this tutorial of mine on sudoku. Not really a quiz but it also stores array data and loops through them. Maybe that helps

    youtu.be/Rq0iQGcVQtc

    cheers