9 Replies - 2139 Views - Last Post: 12 September 2012 - 08:21 AM Rate Topic: -----

#1 Coover55  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-September 12

First project: trading card games.

Posted 07 September 2012 - 06:26 PM

Hey guys!

So here's what I want to do. For my first program (and my first coding experience, besides a bit of Minecraft modding), I'd like to make four simple programs that are all connected by one. The first program should be pretty obvious, and extremely easy to make: a simple main menu. I want it do nothing more than show a picture in the background, buttons with text (that, when clicked, run one of the other programs or exits the entire thing), and some music playing in the background. Like I said, that should be rather simple to make, so I don't think that will be too hard.

The next one, maybe a bit tougher, will be still pretty simple. I'd like a deck creation menu: you can search cards that you have (I'll implement a money earning system and buying cards and such later, but at first it'll just be a library of cards for the game) and put them into your deck, which is saved to a file in your game folder. Like I said, I know this will be fairly simple as well. I just need a search engine, an info writing ability (for moving cards from the library folder to the deck file / folder), a pic in the background, maybe some music, a card display on the side (reads the card file and displays the picture and .txt info file), a "Back to menu" button, and.. well, yeah, that's pretty much it.

The next program I would like to be a lobby searching / joining / creating area. This will probably not be so easy. In order to host, after all, I'm sure there's a decently-sized amount of code involved in creating a server on the computer that others can join by IP through the host list in the program. Along with the host list, option to host, and option to join, I'd like to create a deck select drop-down list, and, of course, you're standard "Back to Menu" button.

The final program is the playing program. This is (if I'm correct, of course) the second simplest part of the entire program, second only to the main menu. A chat box on the side is a given, as well as the "Surrender and go back to menu" button. Then, there's 10 slots you can place the cards on (which is going to be simply click and drag pictures onto a set place, then select another button to choose the position of the card, although really it's just putting down a different version of the pic on a slightly different set area), arranged with 5 on top and 5 on bottom. There needs to be a randomization at the beginning of each turn that changes the order of the cards, right before you draw one. (I don't know how the drawing would be done, but I'll find out.) There needs to be a way to change the background, according to what part of the turn it is, and who's turn it is. I would assume that changing the background is easier to code and easier to process then deleting a layer of colored light and putting down another one somewhere else at the same time. An HP bar (or, in the case of the game I'm using, Yu-Gi-Oh, LP. LP Stands for Life Points, if you didn't know) is, of course, needed. When a card is placed on the field with the ability to attack, you should be allowed to attack during a certain "phase" of the turn. This is nothing more than a simple arrow animation, along with a sound effect. You have the ability to send an card from the field to another area off of the field. (Which you can access during the duel at another time.) In order to reduce or add to your HP, you can type a number into a text field and select a button, "Add" or "Subtract" to add or subtract said number to your HP. Once your or your opponent's HP is reduced to zero, a sound effect will be played, the HUD will be removed, and nothing will be seen except a "Back to lobby" button and a changed background, telling you whether you won or lost.

Now, as you can probably guess, anything I've said here about "simple" or "difficult" is simply speculation on my part, as I haven't programmed a full program before, only some Minecraft modding.

So anyways, if anyone can direct me to a good java book (or, better, a good online tutorial) with possibly a template or two, than I would be very thankful. The reason I gave all my intentions is so that I know I'm getting the right stuff. Yes, I've looked online for what I need, but I can't seem to find it.. which is why I turned to this site.

Thanks ahead of time,
~Coover55~

Is This A Good Question/Topic? 0
  • +

Replies To: First project: trading card games.

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9389
  • View blog
  • Posts: 35,264
  • Joined: 12-June 08

Re: First project: trading card games.

Posted 07 September 2012 - 07:02 PM

Moving to java..
Was This Post Helpful? 0
  • +
  • -

#3 Sheph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 432
  • View blog
  • Posts: 1,020
  • Joined: 12-October 11

Re: First project: trading card games.

Posted 07 September 2012 - 07:21 PM

Welcome to DIC.

That's quite a task. It is not as simple as you speculate. In Java, you probably won't want these all to be separate programs, but all different parts of the same program. One class can be DeckEditor, one can be Game, one can be Lobby, etc. To start off, you're going to need a good foundation in object oriented design.

Also, if you're not doing this for practice or fun, the program OCTGN will be able to do exactly all of this.
Was This Post Helpful? 0
  • +
  • -

#4 Coover55  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-September 12

Re: First project: trading card games.

Posted 11 September 2012 - 02:38 PM

Well, okay then. I guess I WAS a little stupid to assume it's easy :P
Anyway, yeah, I'm just doing this for fun, so I don't really feel like using that other program.
So, can I get the real question answered? Does anyone know of a well-written tutorial or book? (Preferably online tutorial, so that I don't have to pay for anything.) A template or two would be nice, as well.

~Coover55
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9389
  • View blog
  • Posts: 35,264
  • Joined: 12-June 08

Re: First project: trading card games.

Posted 11 September 2012 - 02:46 PM

Quote

with possibly a template or two,

Template for what?

Yes.. book recommendations here:
http://www.dreaminco...beginners-book/

You can also find recent books on amazon that have a high user feedback rating, are recent, adn the indexes appear to cover what you need.
Was This Post Helpful? 0
  • +
  • -

#6 Coover55  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-September 12

Re: First project: trading card games.

Posted 11 September 2012 - 02:49 PM

View Postmodi123_1, on 11 September 2012 - 02:46 PM, said:

Template for what?


Just general templates.. kind of like a Minecraft ModLoader template. If you've ever made MC mods, you'll get it.. but that's all I can think of as an example.

~Coover55
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9389
  • View blog
  • Posts: 35,264
  • Joined: 12-June 08

Re: First project: trading card games.

Posted 11 September 2012 - 02:52 PM

No, I don't understand waht you are getting at, but that's not how normal java operates.. that is something specific to what ever modding tool that is being used with.
Was This Post Helpful? 0
  • +
  • -

#8 Coover55  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-September 12

Re: First project: trading card games.

Posted 11 September 2012 - 04:45 PM

Ah, okay, I get it.
Thanks :)
~Coover55
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,880
  • Joined: 06-March 08

Re: First project: trading card games.

Posted 11 September 2012 - 05:29 PM

Something like
http://www.dreaminco...snippet3176.htm
?
Was This Post Helpful? 0
  • +
  • -

#10 Coover55  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-September 12

Re: First project: trading card games.

Posted 12 September 2012 - 08:21 AM

View Postpbl, on 11 September 2012 - 05:29 PM, said:


Sure, but with trading cars instead of a normal deck of cards lol
~Coover55

Cards*
I couldn't find the edit button :\

Oh, well then. Hehe.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1