Word game mechanic (reversal)

tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
I'm sure this game exists, probably ten-fold but since it just popped into my head I thought I'd see how hard it would be to make. The idea is to find a word that is reversed and highlight it to score points (I still need to add highlighting while the mouse button is down.) This used to be possible but very tedious because it used individual table cells for each letter and they had to be constantly concatenated or individually displayed in an actor.

The nightly build available to Pro members includes some powerful text manipulation functions, which made this much simpler to code. It uses a table to store the letter strings (one for each round) but does all of the letter rearranging and displaying using a single text attribute, a Loop behavior, and the textSubStr() function.



New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782
    Cool @tatiang, call it OTPYRC ;)

    While you are busy with the highlighting, is it sensitive to the direction in which you highlight the letters? I would find it natural to also highlight in reverse.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited February 2014


    The nightly build available to Pro members includes some powerful text manipulation functions, which made this much simpler to code.



    I know! It's amazing what you can do with the new functions. Great idea you have going on there. Looks like fun! I love word games, by the way. ;)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2014

    Well neat, @tatiang, good one! It'll be great if/when these new text manipulation features make their way into the mainstream beta. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Hopscotch Ah, clever naming idea. :)
    While you are busy with the highlighting, is it sensitive to the direction in which you highlight the letters? I would find it natural to also highlight in reverse.
    Yes, that's my plan and I just added it this morning. Thanks!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Couple more videos:

    (1) Added bi-directional "live" highlighting (blue highlighting still needs to be widened).



    (2) I'm working on the reversal animation for each letter (only 8 frames currently so it's not that smooth looking).


    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ImNiklasImNiklas Member Posts: 103
    edited March 2014
    (2) I'm working on the reversal animation for each letter (only 8 frames currently so it's not that smooth looking).

    [video]
    That looks amazing! Is it possible to something like that with GameSalad Text or do you need to create your own image for each letter? I'm working on a quiz game and that animation would be just perfect for my needs. If I succed with it, it will be my first successful app (except a poor flappy bird clone) :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014
    @ImNiklas
    That looks amazing! Is it possible to something like that with GameSalad Text or do you need to create your own image for each letter? I'm working on a quiz game and that animation would be just perfect for my needs.
    Thanks! There is no way to turn or otherwise physically manipulate the text in a Display Text behavior, so you would need to create custom graphics, which is what I've done. Each letter in the animation above was made with 8 individual frames. I'll probably go with 2-3 times that amount for the final version.

    Animating something like that is quite simple. Allowing the user to swipe and control the flipping of the letter, as I've done in the video, is a bit harder.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Nice update, @tatiang‌ - That looks like fun! Although, I have to say, my brain just doesn't work that way. How you ever find those reversed words I'll never know. ;)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Thanks, @Braydon_SFX!

    Oh, it's easy... you come up with them and put them in a table. ;) When you see them again your brain says "wait, that's the word I just entered in the table." =))

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    @tatiang‌ - LOL I'd probably still mess it up haha! I still couldn't figure it out. :-B
Sign In or Register to comment.