Jump to content


Photo

Card Game Questions


  • Please log in to reply
6 replies to this topic

#1 venom-carnage-lizard

venom-carnage-lizard

    GMC Member

  • New Member
  • 433 posts

Posted 26 July 2006 - 09:54 PM

I'm trying to make a card game again, but this is going a million times better than last time. I have some questions. I can only get up the connection and give them the fake money to buy the cards. How can I make it randomly choose 5 common cards, 4 uncommons, and 1 rare or super rare. How do I let them change the cards in their decks?
  • 0

#2 hpapillon

hpapillon

    GMC Member

  • Retired Staff
  • 3016 posts

Posted 26 July 2006 - 10:06 PM

Those sound like *really* vague, general questions.

If you want to talk theory, can you narrow it down to one particular concept you're having problems with?

If you're having a coding problem, can you show us the code you've got so far?
  • 0

#3 venom-carnage-lizard

venom-carnage-lizard

    GMC Member

  • New Member
  • 433 posts

Posted 26 July 2006 - 10:40 PM

well I don't have a general code down yet. For the boosters I'm wondering if I could like make conventional branches for each different thing (common, uncommon etc) and then I could just get it to choose randomly five times frot he commons and so fourth
  • 0

#4 paul23

paul23

    GMC Member

  • Global Moderators
  • 3355 posts
  • Version:GM8

Posted 26 July 2006 - 10:54 PM

well I think there are at least 2 easy ways you can do this.. All involve the use of data structures.

in the first way you make a different list for every type of card (common uncommon and rare). then you'll just pick a random item from the lists..
This way is the easiest one, but if you have a huge number of different types it can be very confusing..

the second way is "more general":
make 1 large map which holds from every card the right attribute as the key. Then when you need to select some from 1 type seek through the map and write every "good" item down to a temporary list.. now use that list to pick a random item.
This method is more slowly but (I think) less confusing and easier to manage.
  • 0

#5 venom-carnage-lizard

venom-carnage-lizard

    GMC Member

  • New Member
  • 433 posts

Posted 26 July 2006 - 11:16 PM

well I think there are at least 2  easy ways you can do this.. All involve the use of data structures.

in the first way you make a different list for every type of card (common uncommon and rare). then you'll just pick a random item from the lists..
This way is the easiest one, but if you have a huge number of different types it can be very confusing..

the second way is "more general":
make 1 large map which holds from every card the right attribute as the key. Then when you need to select some from 1 type seek through the map and write every "good" item down to a temporary list.. now use that list to pick a random item.
This method is more slowly but (I think) less confusing and easier to manage.

<{POST_SNAPBACK}>

hmm well how do I get the cards to their game file thing? And how do I let them change the cards n their deck
  • 0

#6 GameGeisha

GameGeisha

    GameGeisha

  • GMC Member
  • 2740 posts
  • Version:GM:Studio

Posted 26 July 2006 - 11:52 PM

Try the Dexterity Deckmaker. Get it at xekkosoft.sitesled.com, in the projects section. If that's what you wanted, feel free to PM me and I'll send you the source and explain to you what it does and how it works. Perhaps I can even have it work with your game.
  • 0

#7 venom-carnage-lizard

venom-carnage-lizard

    GMC Member

  • New Member
  • 433 posts

Posted 26 July 2006 - 11:52 PM

thank you so much!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users