It is currently Sun Jul 05, 2020 12:59 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Computer Card Games
PostPosted: Sun Jan 01, 2012 4:35 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I'm learning how to use the Unity3D engine right now, it works for making 3D, 2.5D, and 2D games, you just need to set it up right.

My city game is going to take a while because I'm learning while I'm doing it... so I'm making some card games.

I'm almost done with my first card game...

Strategy War: It's based on the card game war, but with a twist, you are dealt half the deck and the computer gets the other half, then you get 5 cards in your hand that you can pick from.

I'm almost done programming it, I just need to finish up coding on a few things, namely what the computer does to counter your moves. also need to code what the computer does when it's "his" turn to play first. and what it does when you win or "he" wins.

I've got everything else done... graphics, shuffling, dealing, etc.

I'm going to release it maybe for free, maybe for $0.99, on the Mac App store and find somewhere I can release it for Windows.

I'm also thinking I'll make Go Fish and a couple of other card games.

It's good practice, and a lot of the code can be recycled into other projects.

I'll likely be done with the War game in a day or two, but I might spend some time going over the code, see if I can make it do what it does with a lot less code.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Sun Jan 01, 2012 11:43 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
Can only write code for a certain amount of time before going cross eyed...

I wrote about 800 lines of code today... probably more

Think I need a break.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Mon Jan 02, 2012 10:12 pm 
Offline
Site Admin

Joined: Sat Aug 14, 2010 6:33 pm
Posts: 194
I could never code, I just don't have the knack for it.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Tue Jan 03, 2012 4:22 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I just got the game to remove the items from the array of cards in hand when it's placed and put it into another array.

All I need to do now is make the played cards go into an array for the winner.
Unless it's a war then I need to move the played cards into a different array to store them until the war is decided.

I'm currently at over 3100 lines of code for this project.
I want to shorten it, but I don't know if I can.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Tue Jan 03, 2012 7:37 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I got it to replace the cards that have been played, but it only works for the first round... when I click on another card it does some weird stuff that I can't explain...

Sure I'll figure it out soon, but I need a break.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Wed Jan 04, 2012 8:29 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I figured out the problem I mentioned in the last post...

It's not replacing the cards played from the computers hand of cards... it's an easy fix, but I haven't touched it yet, there's a Canucks game on in about half an hour so I'll be watching that first.

After I get that working I only have a few more things I'll need to do and tweak.

Almost everything I've coded so far can be reused by other card games, which is going to make it a lot easier for me to make more card games after this one... A very good thing because the more I can put out there for $0.99, give or take, the more money I might be able to earn from this.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Thu Jan 05, 2012 2:19 am 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
Got it working... but hit another problem... already know how to fix it though...

It happens when the player or computers deck reaches empty.
All I have to do though is add maybe one or two lines of code that says when the deck reaches empty to copy the pile of cards won into the deck to keep going, and if both the deck and the pile are empty whoever has the empty one is the loser...

So that pretty much means I'm almost done with the game play mechanics just need to do that bit above, and make it take turns going first. After that it'll be animations and making it look prettier then I'll be done.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Thu Jan 05, 2012 6:43 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I'm rewriting a bunch of code because some of it was causing errors when refilling the player/computer decks from the stack of collected cards...

It was listing it as 2 different things... the card name for some, and the card name with a tag saying it's a texture for others, so I've been rewriting it to work properly.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Thu Jan 05, 2012 6:46 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
It's grabbing all the cards from the stack and putting them into the decks like it's supposed to, but something's going on that I have to fix.

Not sure what though.


Top
 Profile  
 
 Post subject: Re: Computer Card Games
PostPosted: Thu Jan 05, 2012 10:40 pm 
Offline
MCGI Member

Joined: Tue Aug 17, 2010 4:42 am
Posts: 445
I'm starting to see some advantages to having more screen real estate as I program more of this game...

Next computer is going to have to be a larger screen size and dual monitors if I'm going to keep doing this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© 2008 phpbbstylists.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group