PDA

Click to See Complete Forum and Search --> : A card game and ooh-err....


/\/\isanThr0p
Feb 15th, 2002, 07:17 AM
I think I would use a bunch of types and arrays rather than the recordset, maybe I am totally wrong on that because I suck in DB, but I never had to use a recordset in any small game.

Matt_T_hat
Feb 15th, 2002, 06:21 PM
Originally posted by /\/\isanThr0p
I think I would use a bunch of types and arrays rather than the recordset, maybe I am totally wrong on that because I suck in DB, but I never had to use a recordset in any small game.

I intend to use plenty of types and some fairly heavy 3+ dimensional arrays. And CLASSes as well but only if I can't think of another way.

I'm fairly happy with my DB skill (I fairly rock!) and record sets are about the most secure file format short of drilling the whole dam lot into the windows regestery (not a good idea) or incripting it (not an easy option).

What I don't want is players editing the packs in something like notepad and thus cheating. I also don't want all and sundry currupting the ballence of card types that I have invented - by makeing, for example, an unbeatable civilian Non-elimental (about the weakest card available).

The record set disign SHOULD mean that data lives in the files not hogging stacks of memory. If one player wants say 20 add on packs with about 50 to 100 cards in it that's a hell of a lot of data for one PC to remember.

ON THE OTHER HAND if you can sugest a way to me that allows 5 booleans, 6 strings, 2 integers and two varent switches per card (I have currently defined around 200) then please tell me about it. The simpler the system the less prone to pointless untraceable errors it is.

I also hate passing variables here and there and back, I grew up on spread sheets and am rather fond of look-ups.

Your view is highly apreaciated.

BTW if you would do me a massive favour: I have yet to actually use a user type in VB what is the correct sintax for diclaring and addressing one? I could probably look it up but it seems more fun to read it here.

thanx for the thought - Matt (the long winded) man in the hat.

/\/\isanThr0p
Feb 16th, 2002, 07:08 AM
well I think you really know what you are doing. Good way to start of, I should do that from time to time...

well a type is really easy
just go like

Type MyCard
Bol1 as Boolean
Bol2 as Boolean
Name as String
...
End Type

than you declare an array most likely
dim Cards(0 to Differentcards) as MyCard
than you could use another array for the users Deck like
dim Deck(0 to howmaycards_a_user_can_have) as Byte
than you can just a number specifying which card the user has...

I hope that was any understandable. This code only works if the cards can not be manipulated, otherwise you would need to actually store the whole type thing for every card the user has not just for every card available.

One thing with those swiches you have... as far as I got you there you just want to specify if there is something special available that would be stored in a string. Why don't you just store it in the string if there is something special and if not leave the string empty and save those booleans.


well I guess after reading this you will have a bunch of new questions, I know it is not quite clear and I am not sure if I understood all of you concept right, just tell me, so I can modify my answer .... :)

Matt_T_hat
Feb 16th, 2002, 09:35 AM
I've had a re-think of the varients partly because of this discussion.

They are only to indicate Eliment and shape.

So why don't I store those as a type


Type switch
Eliment as integer 'where 1=water, 2=rock etc
Shape as integer 'where 1=monster, 2=civilian etc
End type


which should tidy things up a bit. in the game at any rate.

One thought tho' - each user will have 25 cards to start with but could gain an unspecified number.

My current plan is a card selector which will act as part of a function to select the card from say BobSmithCardList and return the location to the procedure asking for a card.

one question: I have my type what is the correct way to address it?

Your answer was very clear by the way - thanx

yadda, yadda, yadda... I'd best ShutUp!

/\/\isanThr0p
Feb 16th, 2002, 01:07 PM
what do you mean with adressing a type?
if you have the following:
type MyCard
shape as integer
Element as integer
end type
dim ThisCard as MyCard

you can go like

ThisCard.Shape = 1

Matt_T_hat
Feb 18th, 2002, 02:43 PM
Thanx I knew it had to be something like that.

Now all I've ot to do is finalise the data to be used and I'm home and dry



-yeah right what's the betting 50million things don't work properly.

/\/\isanThr0p
Feb 18th, 2002, 03:10 PM
cheer up! :D

Matt_T_hat
Mar 19th, 2002, 06:35 AM
Not that I'm bitter but I have to write two entirely new programms to run accross multiservers deal with HTML pages and intranet servers and deal with user rights - I want to make games

:eek: SCREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEM!

:mad: :( :eek: