It is currently 29 Aug 2025, 11:45
   
Text Size

New quest features/changes

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: New quest features/changes

Postby DennisBergkamp » 21 May 2010, 19:23

Alright, at least that's some improvement...

What you could do, is play around with some of the BorderLayout settings. In GuiDisplay3:

Code: Select all
...
JPanel oppPanel = new JPanel();
oppPanel.setBackground(c1);
oppPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(COMPUTER_TITLE)));
oppPanel.setLayout(new BorderLayout());
oppPanel.add(oppNumbersPanel, BorderLayout.WEST);
oppPanel.add(oppIconLabel, BorderLayout.CENTER);
oppPanel.add(oppLifeLabel, BorderLayout.EAST);       <----------- try things on this line
oppPanel.add(oppPCLabel, BorderLayout.AFTER_LAST_LINE);
pane.add(new ExternalPanel(oppPanel), "compy");
...
Try changing some values in oppPanel.add(oppLifeLabel, BorderLayout.EAST);
Maybe BorderLayout.AFTER_LINE_ENDS, or BorderLayout.LINE_END?

Also, try reversing the iconlabel position with the lifelabel:

Code: Select all
oppPanel.add(oppIconLabel, BorderLayout.EAST);
oppPanel.add(oppLifeLabel, BorderLayout.CENTER);     
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby Chris H. » 22 May 2010, 01:03

I tried a few things and so far the deck icon pic remains in the same place. I read through the java docs and it was educational. There does not seem to be many options for controlling the size and placement of various objects. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby DennisBergkamp » 22 May 2010, 03:36

Really? The latter option should definitely switch the two:

oppPanel.add(oppIconLabel, BorderLayout.EAST);
oppPanel.add(oppLifeLabel, BorderLayout.CENTER);

But the image might still be obscured, I don't know.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby silly freak » 22 May 2010, 07:52

a label can display both icon and text at the same time, so why don't we just put both the icon and the life points in the east region?
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: New quest features/changes

Postby Chris H. » 22 May 2010, 12:21

I am sorry to have been overly brief. Apple just released a java update and I installed that first and discovered that this broke the links to java doc and to the jre. I went into the preferences and re-set everything and got it working again. At this point I was able to read up on BorderLayout.

When I switch the oppIconLabel with the oppLifeLabel positions the label will then cover the life number. I like Silly Freak's idea to place both in the EAST region. I guess that this would need to be handled in a fashion similar to how the oppNumberPanel is handled.

OK, I figured out how to do this, do you like the attached pic?

Granted, this appears to also move the life number in the non-quest games. As a side effect of this feature creep, this could allow a new feature. Generic computer and human avatar pics. We would include two generic pics and people could then replace them with a personalized pic. These generic pics would show up for both players and would be displayed for most games. They would be replaced with the quest deck pics when needed if these pics are available in the icons folder.

Code: Select all
        oppHandValue.setHorizontalAlignment(SwingConstants.LEADING);
        oppLibraryValue.setHorizontalAlignment(SwingConstants.LEADING);
        oppGraveValue.setHorizontalAlignment(SwingConstants.LEADING);
        oppRemovedValue.setHorizontalAlignment(SwingConstants.LEADING);
       
        JPanel oppNumbersPanel = new JPanel(new GridLayout(0, 2, 3, 1));
        oppNumbersPanel.add(oppHandLabel);
        oppNumbersPanel.add(oppHandValue);
        oppNumbersPanel.add(oppRemovedButton);
        oppNumbersPanel.add(oppRemovedValue);
        oppNumbersPanel.add(oppLibraryLabel);
        oppNumbersPanel.add(oppLibraryValue);
        oppNumbersPanel.add(gravePanel);
        oppNumbersPanel.add(oppGraveValue);
        oppNumbersPanel.setBackground(c1);
       
        oppLifeLabel.setHorizontalAlignment(SwingConstants.CENTER);
       
        JPanel oppIconLifePanel = new JPanel(new GridLayout(0, 1, 0, 0));
        oppIconLifePanel.add(oppIconLabel);
        oppIconLifePanel.add(oppLifeLabel);
        oppIconLifePanel.setBackground(c1);
       
        JPanel oppPanel = new JPanel();
        oppPanel.setBackground(c1);
        oppPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(COMPUTER_TITLE)));
        oppPanel.setLayout(new BorderLayout());
        oppPanel.add(oppNumbersPanel, BorderLayout.WEST);
//      oppPanel.add(oppIconLabel, BorderLayout.CENTER);
//      oppPanel.add(oppLifeLabel, BorderLayout.EAST);
        oppPanel.add(oppIconLifePanel, BorderLayout.EAST);
        oppPanel.add(oppPCLabel, BorderLayout.AFTER_LAST_LINE);
        pane.add(new ExternalPanel(oppPanel), "compy");
    }
`
Attachments
Silly Freaks idea.jpg
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby DennisBergkamp » 22 May 2010, 16:35

Oh cool, I like the way that looks :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby Chris H. » 22 May 2010, 17:23

DennisBergkamp wrote:Oh cool, I like the way that looks :)
`
I will merge in this change later today. This will give people a chance to see it on their own machine. Granted, it does move the computer's life total somewhat even in constructed mode games. It is not too noticeable.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby Chris H. » 23 May 2010, 13:27

I am continuing my fantasy quest complete with the 65 opponent icons in place and I am having a blast. Thank you Dennis for coming up with this idea and we all are aware of the time and hard work that you have invested in this part of the project.

I visited the Raindropmemory web site last night and downloaded the Legendora Icon set. I found two that are perfect in that they could be used as a default icon. The default icon would be used in cases where there is no matching quest deck name icon.

Granted, the default icons would require additional coding … sigh, feature creep and all of that. The fantasy quest is still in development and the opponent icon ideas are still just an experiment. And the default icons are just a result of some brainstorming.

`
Attachments
computer.jpg
This would be the default computer icon
computer.jpg (8.02 KiB) Viewed 3902 times
player.jpg
This would be the default player icon
player.jpg (7.51 KiB) Viewed 3902 times
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby Chris H. » 28 May 2010, 00:33

Just a quick shout at Dennis. In the past I would play short term 10 match quests. I currently have a total of 73 matches in my current quest. The new features that you added create a reason to come back and play additional matches. I think that you have succeeded in your efforts so far.

I just won my second Ancestral Recall and I plan to sell it as soon as the proper dual land becomes available for sale at the card shop. When I reached the 50 win threshold I decided that I had enough cards to go to a three color 60 card deck.

I like the occasional special fantasy quest. When I have finished one the Quests button will become inactive for a few games. This is a nice touch and creates another reason to come back for more games. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby DennisBergkamp » 28 May 2010, 01:19

Cool, thanks Chris :) Yeah, I figured there should be some limitation in how many "Special Quests" can be played (otherwise no one would ever play a regular match anymore - the reward just isn't quite as nice in those). I will probably do something similar with Ante matches when I add those.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby Chris H. » 29 May 2010, 12:39

So far there has been a total of 32 downloads of the Quest Opponent Icon pics archive. This gives me reason to believe that the new fantasy quest mode is being tested by a number of people. People have been fairly quiet and I guess that many of the regulars are busy trying out the new fatasy quest. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby DennisBergkamp » 07 Jun 2010, 20:29

Another thing that I could implement is to have the image names that are used in quests.txt for the special quests (which we aren't really using right now), to represent the image name of the opponent's portrait. Does this sound good?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby Chris H. » 07 Jun 2010, 21:27

DennisBergkamp wrote:Another thing that I could implement is to have the image names that are used in quests.txt for the special quests (which we aren't really using right now), to represent the image name of the opponent's portrait. Does this sound good?
`
I considered having a third label on the right hand side which would include the file name for the normal quests and the deck name for the fantasy quest decks. I'm not sure how much room this would require. :-k
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New quest features/changes

Postby DennisBergkamp » 18 Jun 2010, 19:52

I'm not sure what you mean by that Chris...
Anyway, I just committed the change I originally suggested. Which means that an icon can be assigned to the computer opponent from within the quests.txt file. For example:

Code: Select all
1
Dungeon Crawling (White)
Guarded by white creatures
Medium
Repeatable
25
Three white rares
100
Bart Simpson.jpg
Should show the Bart Simpson icon when playing the white dungeon crawl quest.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: New quest features/changes

Postby Chris H. » 18 Jun 2010, 21:14

Sorry about that. What I meant would be something like this (Using your quest1 example above):

Code: Select all
Hand: 7                   Dungeon Crawling (White)
Removed: 0
Library:53                    {Bart's picture}
Grave: 0
Poison Counters: 0                   20
`
So we would add a third item to the right hand part of the panel.

OH, and BTW, I saw your commit and I am trying it out. I have not yet decided what to do about the pics themselves. Then again, google has a lot of pics to choose from. But they have CR's.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: Jamesshown and 27 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 28 users online :: 1 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: Jamesshown and 27 guests

Login Form