Newbie: is Stencyl good for card games?

ricarod

  • Posts: 8
Hello Everyone, I'm an old guy (middle age actually) and totally newbie not only to Stencyl but to overall gaming (I think I once had an ATARI back in the 80's but that's about it) and I'm so excited about getting start with Stencyl but I wonder if this would be a good framework to deliver a card games?

I'm thinking something like memory games? Those matching cards with certain images?

I also wonder if the actual image for each card should be build or maybe there's some sort of set of assets that already exist (I would thought that 'cards' are very common games) that can be reuse for not starting from scratch?

Thanks.

mdotedot

  • Posts: 1654
Hello Ricarod,

Welcome to the forum (and Stencyl)

Card Games are absolutely possible in Stencyl.

Search the web for free images on cards: http://www.freestockphotos.biz/photos.php?c=playing%2Bcards&o=popular&s=0&lic=all&a=all&set=all

Have fun with Stencyl and creating (card) games!

Best regards from
M.E.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

brando011994

  • Posts: 11
Correct me if I'm wrong, but virtually any 2D game can be made with Stencyl. It really just comes down to the skill of the person making it.

cabinfever

  • Posts: 159
One item that you need to create on your own, is the shuffle routine.
Currently Stencyl doesn't have that (for lists or arrays or anything).
Otherwise, there is nothing limit you doing card games.

ricarod

  • Posts: 8
Thank you for your help, good to know that forums is very active ;)

Natrium

  • *
  • Posts: 111
But remember, if you want to make a card game like, say, Hearthstone, it would be very difficult (if not almost impossible) to be implement the playing online with someone part using Stencyl.


But a memory game should be quite easy.  ;)

ricarod

  • Posts: 8
Thank you Natrium, what would you use for something like that? 

Not my case though but just curious since I'm in the very first stage of my learning curve.  Thnx.

t4u

  • Posts: 418
Topics for memory game:
- Create n actors upon scene entering (create actor + change position of last created actor)
- You need to know what card is form the other side of covered card ( Actor atribute)
- You need to change animation once you click the card (On click event + change animation)
- Compare values of two uncovered cards (reffering to actor attributes+possibly on trigger events)
- Destroy actors if they have the same picture (Destroy actors)

+ Possible :
- Lists - as much as I'm thinking about it you cant escape using list for generating pairs
- Text display - to count score and display it.

Actually I'm considering making a video tutorial for this one. The problem is Stencyl community is rather small.
 
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/

ricarod

  • Posts: 8
Thank you T4U, really appreciate you guidance.  Now, like I mentioned I'm completely newbie and although seem like steps you've described are easy to follow it could take me some time to actually go over it but will certainly follow your guidance on it.

Now, when you say "I'm considering making a video tutorial for this one. The problem is Stencyl community is rather small." maybe you can explore alternative means to gather some more audience, like this maybe (just to mention an example ) http://awesomescreenshot.com/02d4k8hoae that's actually what initiated my interest on gaming.

Now, "f i helped you to do something awesome be sure to mention it in game, software or whatever you did..." actually I'd probably like to me a more active part of this project if you thing we could work something out together.

I got to admit that stencyl was not the target of course I first saw in Udemy but the one that probably gathered my interest after preliminary research.  One thing I'm concern about is that games I've seen are not graphically impressive, I assume it has to do with graphic design ability to make things better but I'll give it a try.

t4u

  • Posts: 418
Not as easy as I thought. A lot of more tricky. Article explaining how it works will come up soon.

Let me know in case of bugs.
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/

SadiQ

  • Posts: 1795
Wow. That is a complex prototype there. I am yet to figure out how you assign random numbers to those cards hehehhe.

Maybe create the cards like this: (not necessarily a better way...just showing an alternative)
I once created a few actors on the screen in a grid like position and I used 2 repeat blocks to create 64 actors  :


In a 4x4 grid you'd need 8 different card numbers, and you can populate the list with the numbers in a repeat block again (just add the numbers from 1 to 8 twice). After that simply shuffle the list and you have perfectly shuffled cards (stencyl has a shuffle function somewhere).

Then when you click on the screen, check if you actually clicked on an actor, and if you did, the actor's X and Y positions will correspond to the index of the list that stores the card number(so you can change the animation of the card to the correct number assigned to it).
The rest is easy...just hold the last dicovered card number, compare it with the new one after you click again, if they match kill them, if not continue.
All this could be done inside a single scene behavior without the use of those horrible ¨get something from some behavior¨ blocks (I'm yet to figure out how those work hehehhe).

P.S. You have a bug: Clicking on the same card a few times eventually kills that card and the whole game won´t work correctly.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

t4u

  • Posts: 418
Never thought anybody would be tricky enough to try to click the same card twice. Nice one! Ps. bug fixed.

As for gnerating random numbers for cards. It is performed mostly in "card value" trigger:
1. I create list (maze generation list) with length = number of cards/2 (If you have 12 cards on a table, you have 6 types)
2. I fill this list with 0s (maze generation list stores how much of cards of a type has been already created)
3. Randomly I pick index from list and find first value that is smaller than 2. I increase value in list by 1. And give the index to the last created card actor. The condition of smaller than 2 is because you cant have more than 2 cards of the same type.


As for your rest is simple I have mixed feelings about killing actors. But maybe it will work. I tired killing actors but it messed up my lists.
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/

SadiQ

  • Posts: 1795
My approach just uses the cards to show the value from a list. Since you get that value when you click on the card and you don´t touch the list there can´t be any problems like that , and it would (probably) make expanding the game a little easier (powerups, combos, who knows what other crazy things).
Personally I would pick the approach I described because I seem to have problems managing the code when it´s split in too many behaviors, so trying to use as few of those as possible is usually the approach I take. It also makes debugging a little less painful for me when things get a little too complex.

Btw: How will you pick those cards when you'll want to use 16 cards from a total of 56?
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

t4u

  • Posts: 418
I don't understand Btw note. Please tell me more.
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/

SadiQ

  • Posts: 1795
Can you pick any numbers instead of 0 to 5? Can you pick your cards from a range of available cards? (start at number 20 to 36).
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.