playMaker

Author Topic: Generating cards  (Read 1938 times)

superpixelchris

  • Playmaker Newbie
  • *
  • Posts: 3
Generating cards
« on: December 21, 2016, 11:48:58 AM »
Hey there! I'm new to the forums and Playmaker in general. Basically I'm looking to make a very simple game as my first project

I want to make a card game where at the start of every level a random card is generated from a pre-made deck of 50 cards and the stats for each card are displayed on the UI (a picture, an attack number, a defense number, a name etc...). What is the best way of storing all this info, e.g. like a spreadsheet so that I can just call up one card and it will pull up all the stats automatically?

Sorry if this sounds stupid. It's just to stop having 50 different objects generated in the scene, rather than just having one that stores all the stats

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Generating cards
« Reply #1 on: December 21, 2016, 12:09:55 PM »
You should probably learn about Arrays in this case.
They can store a list of values from anything like Gameobject to Floats etc...
I'm also doing a card game and you really can't approach it without using arrays, so go and check it out, there are many tutorials around.

superpixelchris

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Generating cards
« Reply #2 on: December 21, 2016, 04:58:04 PM »
Awesome, I've previously had a look at arrays and was trying to work out the best way of using them to store info. I think I need to watch a few more tuts I think!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Generating cards
« Reply #3 on: December 22, 2016, 05:46:26 AM »
Hi,
you can find many user tutorials here

superpixelchris

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Generating cards
« Reply #4 on: December 22, 2016, 09:12:23 AM »
I literally had no idea that section existed. *derp* Thanks so much!!!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Generating cards
« Reply #5 on: December 23, 2016, 12:49:16 AM »
Hi,
Yes many don't know... i have send a PM to Alex if he could add a link on the tutorial page so it is easier to find.