GameSalad

Is it possible to use game salad to make scratch card game?

Hi, I'm new to game salad and wondering is it possible to use it and make a scratch card game? one image will be on the top and a coin (mouse) will scratch the image and reveal the result image underneath, since I don't see mask effect in the game salad, and can't think of a way to do it. Many thanks to all of you that's willing to help.

Comments

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    Yep, it's possible and @Socks can tell you how.

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

  • SocksSocks London, UK.Posts: 12,821Member

    @tatiang said:
    Yep, it's possible and Socks can tell you how.

    As you well know I don't know how it's done, it's magic as far as I know . . . .

    Link: http://www.mediafire.com/?ug1ma8r3d9t28mb

  • jeezzcakejeezzcake Posts: 144Member
  • SocksSocks London, UK.Posts: 12,821Member

    @jeezzcake said:
    Socks : Amazing!

    Really !? :smile:

    It's just an actor spawning some random scribbly blobs.

  • ArmellineArmelline Posts: 4,589Member, PRO

    @Socks said:
    It's just an actor spawning some random scribbly blobs.

    It was some major thinking outside the box, though!

  • jsorr2jsorr2 Posts: 279Member
    edited November 2014

    wow, nice template @Socks‌

  • nicola520nicnicola520nic Posts: 3Member

    Thanks to everyone here, especially Socks, but what i see in the game is the win or lose text is on top of the background image and they are in the same colour, so the ppl who's playing the game couldn't tell, so the scratch brush plays the trick. A very good idea. however, i need to have a picture (many colours) on top and the another win lost image underneath, and the cursor to scratch the card, can that be done with game salad? again, thank you for all the advice.

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    I had an idea based on the image above where you would map pixels from a table so that a single pixel is spawned at the mouse position (x,y) and it sets its color from the table (say either gray for the scratched background or black for the "X"). But I spent about an hour on it and wasn't happy with it so I stopped. Maybe it can give you or someone else an idea about how to do this. Personally, I think it's a horrendous method but it's what popped into my head, so I went with it.

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

  • SocksSocks London, UK.Posts: 12,821Member
    edited November 2014

    @nicola520nic said:
    . . . . i need to have a picture (many colours) on top and the another win lost image underneath . . .

    You could adapt the idea from above to have an image on the top like this:

    Link: https://www.mediafire.com/?36hbw8v1ooh32hf

    It's very rough, but you might be able to develop into something viable ?

    P.S let the project run for 1-2 seconds before scratching, it needs time to draw the X, you could make this process pretty much instant, but I just threw this together as a test.

  • SocksSocks London, UK.Posts: 12,821Member

    @tatiang said:
    I had an idea based on the image above where you would map pixels from a table so that a single pixel is spawned at the mouse position (x,y) and it sets its color from the table (say either gray for the scratched background or black for the "X"). But I spent about an hour on it and wasn't happy with it so I stopped. Maybe it can give you or someone else an idea about how to do this. Personally, I think it's a horrendous method but it's what popped into my head, so I went with it.

    Yeah, I tried something similar (see above), but like you say, it's not a very elegant solution.

  • SocksSocks London, UK.Posts: 12,821Member
    edited November 2014

    @tatiang said:

    Actually if you zoom the camera out, so it's more the kind of size you might see on an phone, it doesn't look too bad . . .

    Example: https://www.mediafire.com/?qt4i58n59my244i

    . . .

  • vafurlogivafurlogi Posts: 197Member, PRO

    Or maybe just reverse how the template works. Fill the screen with scratch blobs and have touch delete them to reveal the underlying image. Might be way to heavy though.

  • SocksSocks London, UK.Posts: 12,821Member

    @vafurlogi said:
    Or maybe just reverse how the template works. Fill the screen with scratch blobs and have touch delete them to reveal the underlying image. Might be way to heavy though.

    Then you couldn't have a starting image that you scratch away.

  • vafurlogivafurlogi Posts: 197Member, PRO
    edited November 2014

    @Socks said:
    Then you couldn't have a starting image that you scratch away.

    No, that's true. It would have to be a solid colour on top but the picture under could be anything. Unless... You use an overlay on top with a transparent background (for texture) in the same colour as the background of the "scratched area" and would become invisible once that part is scratched. But... then that would also overlay on the "You won" image. I don't know. "I bring nothing to the table" is my motto.

  • jigglybeanjigglybean Posts: 1,584Member

    Zombie tsunami has a scratch card in game when you complete a level, which is pretty cool. You could take a look there for ideas

    Like Balls? Then click here! We've 100 coming soon

  • SocksSocks London, UK.Posts: 12,821Member

    @vafurlogi said:
    . . . "I bring nothing to the table" is my motto.

    Lol :smile:

  • nicola520nicnicola520nic Posts: 3Member

    @Socks said:
    P.S let the project run for 1-2 seconds before scratching, it needs time to draw the X, you could make this process pretty much instant, but I just threw this together as a test.

    wow, Socks, you are awesome, altho the image I need to put underneath is more complicate than an "X" it will be something like "you won" with a happy face, like the one you had in the original one. But you could think of drawing and "X" is really smart, I learned something good. Thank you so much... Any ideas of developing a solution for placing an image above and below, with out "mapping pixels from a table"..... Thanks again for your help

  • nicola520nicnicola520nic Posts: 3Member

    @jigglybean said:
    Zombie tsunami has a scratch card in game when you complete a level, which is pretty cool. You could take a look there for ideas

    Is it using game salad?

  • SocksSocks London, UK.Posts: 12,821Member
    edited November 2014

    @nicola520nic said:
    wow, Socks, you are awesome, altho the image I need to put underneath is more complicate than an "X" it will be something like "you won" with a happy face, like the one you had in the original one.

    Sure, the 'X' was just a test, you could have 'you w☺n' or whatever you like.

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    Very clever, @Socks!

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

  • smurftedsmurfted Posts: 493Member, BASIC

    This is not only very clever, but still works perfectly..

    Can anyone think of a way of rubbing out one image to reveal another underneath?

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    @smurfted I mean, you could slice the top image into tiny squares in Photoshop and spawn them in a grid to appear as one image and then upon collision with a small "cursor" actor, delete them to reveal the image below, but... you'd have to try it to see if you can spawn the tiles quickly enough initially and see if you like the look of a square-ish grid when they are deleted.

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

  • smurftedsmurfted Posts: 493Member, BASIC

    Is it not possible to paint an alpha channel..

  • smurftedsmurfted Posts: 493Member, BASIC

    @tatiang it just tried and that quickly becomes a super huge project and does not work so on other images..

    Does anyone have any other ideas???

  • PhilipCCPhilipCC Encounter Bay, South AustraliaPosts: 1,357Member, BASIC

    @smurfted said:

    Does anyone have any other ideas???

    This just came to mind. What about @Armelline 's Drawing template on GS Helper? There is an eraser tool. Maybe you could conceal an object on a lower layer with another picture on the higher layer and erase only the upper layer? Don't know how to do it, but it's a thought.

  • smurftedsmurfted Posts: 493Member, BASIC

    What do you think @Armelline ? Is that a possibility?

  • wayneh001wayneh001 Posts: 300Member
    edited August 2016

    @nicola520nic , @smurfted, @vafurlogi, @tatiang
    Thought I'd throw a few hours at this, as I've been asked to build various Scratch Card systems in the past. When clients have asked for Scratch Card systems, I usually use different SDK's - but thought I'd try and put something together for GameSalad to see what happens....

    Introducing: Scratch Card Designer - Mac only tool.

    To use:

    • Open Tool
    • Select A Background Image
    • Select a Foreground Image
    • Drag an area that needs to be 'scratch-able' on the canvas
    • Change how many scratchy bits you need (in the grid)
    • Create your GameSalad Project

    *Note: For the images try and use 1334 x 750 pixel PNG Files. If your images are smaller or larger, the tool will scale them up to the full size.

    The tool creates the GameSalad Project file (iPhone 6 layout), with all the images and logic in place.
    The SCRATCH, FOREGROUND, BACKGROUND etc are all on different layers in GameSalad - so you can easily add other items to be 'revealed', then move them to a layer underneath the scratch surface.

    If you want to give it a try it's a MAC ONLY tool, and can be downloaded using the link below. Tested on OS X.10 and X.11

    Here's a quick video of the tool in action.

    Download: Scratch Card Designer Tool

    Cheers
    Wayne
    http://www.deepblueideas.com

  • zweg25zweg25 Posts: 738Member

    @wayneh001 said:

    >

    Neat!

  • smurftedsmurfted Posts: 493Member, BASIC

    That is excellent. Its a shame we can't do anything with editing transparencies though.

    Gotta love the DBi. I'll check it out later today..

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    That's some serious magic right there. :)

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

Sign In or Register to comment.