Forge version 1.2.16
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
70 posts
• Page 2 of 5 • 1, 2, 3, 4, 5
Re: Forge version 1.2.16
by Max mtg » 09 Oct 2012, 10:36
More changes to come:
Players - I want them instantiated at the beginning of game. (Will need a method to notify views somehow)
While out of game (or between games in a match) only a light class will exist (think of it as how cardprinted is related to card) - this class is going to be a key to get (from a map) player's performance in each match and statistics (to develop it futher up into achievements). That lightweight players should someday evolve into players connected to the game table (server)
Hope this will help eliminate AllZone.getHuman/ComputerPlayer near calls to newGame() so that an arbitrary set of players can start the game.
About current AI.
It was developed to play against humanPlayer. I added final Player ai to a lot of AI methods so that the whole system will play for ai player passed as parameter against whoever ai.getOpponent() returns.
I have no idea on how to advance it to multiplayer environment... maybe ai.getOpponent() should return a most hated player? (given an aggro list is managed by AiPlayer)
Players - I want them instantiated at the beginning of game. (Will need a method to notify views somehow)
While out of game (or between games in a match) only a light class will exist (think of it as how cardprinted is related to card) - this class is going to be a key to get (from a map) player's performance in each match and statistics (to develop it futher up into achievements). That lightweight players should someday evolve into players connected to the game table (server)
Hope this will help eliminate AllZone.getHuman/ComputerPlayer near calls to newGame() so that an arbitrary set of players can start the game.
About current AI.
It was developed to play against humanPlayer. I added final Player ai to a lot of AI methods so that the whole system will play for ai player passed as parameter against whoever ai.getOpponent() returns.
I have no idea on how to advance it to multiplayer environment... maybe ai.getOpponent() should return a most hated player? (given an aggro list is managed by AiPlayer)
Last edited by Max mtg on 09 Oct 2012, 10:41, edited 1 time in total.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Forge version 1.2.16
by Chris H. » 09 Oct 2012, 10:39
Doublestrike wrote:@moomarc, mostly - would people mind if the specially styled button pictures were removed?
I'm talking about the ones like on the win/lose screen, the "continue", etc. They'll be replaced by a more button-y button, throughout the UI.
Is anyone strongly in favor of keeping that look?
I can live without the stylized buttons.
-

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: Forge version 1.2.16
by RumbleBBU » 09 Oct 2012, 11:07
Strongly? No. Like Chris, I could live without them.Doublestrike wrote:Is anyone strongly in favor of keeping that look?
But I do think they look classy. They make the game look more...professional.
Re: Forge version 1.2.16
by moomarc » 09 Oct 2012, 12:21
Like the other's before me, I can live without them, although I do feel that they sometimes brought a skin together. The Simpsons skin for instance will likely look a bit silly with regular buttons, but then again I haven't seen what you have in mind.Doublestrike wrote:@moomarc, mostly - would people mind if the specially styled button pictures were removed?
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Forge version 1.2.16
by friarsol » 09 Oct 2012, 14:29
Thanks Doublestrike.Doublestrike wrote:OK all finished. I think it's working properly but there are probably some corner cases I may have missed (hopefully not).
I'll do some testing with it and see how things go. Just glancing at the code, I think some of the logic may be off (specific example, lethal damage is never assigned to everyone first. It's only done one combatant at a time). But now that it looks prettier, I should just be able to fix the logic back to how I setup the popup a few releases ago.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.2.16
by Sloth » 09 Oct 2012, 15:21
Even a random opponent should be fine for the start. I'm willing to go through the AI functions once testing is possible.Max mtg wrote:About current AI.
It was developed to play against humanPlayer. I added final Player ai to a lot of AI methods so that the whole system will play for ai player passed as parameter against whoever ai.getOpponent() returns.
I have no idea on how to advance it to multiplayer environment... maybe ai.getOpponent() should return a most hated player? (given an aggro list is managed by AiPlayer)
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge version 1.2.16
by Doublestrike » 10 Oct 2012, 01:48
Hopefully a simple question - how can I tell from a Card object if it is under the influence of a global artifact (e.g. Meekstone)?
Same question for a global enchantment (e.g. Propaganda).
Alternatively, is there a way to do it going the other direction - that is, Meekstone "is enchanting" [card, card, card]?
Card.getEnchantedBy() only works for local enchantments.
Can someone who knows the card API help me out a bit here?
Same question for a global enchantment (e.g. Propaganda).
Alternatively, is there a way to do it going the other direction - that is, Meekstone "is enchanting" [card, card, card]?
Card.getEnchantedBy() only works for local enchantments.
Can someone who knows the card API help me out a bit here?
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Sloth » 10 Oct 2012, 05:32
You can access continuous static effects with "AllZone.getStaticEffects()", they store a list of affected cards but they don't have a source card yet (because the game rules do not care). It would be easy to add one though.Doublestrike wrote:Hopefully a simple question - how can I tell from a Card object if it is under the influence of a global artifact (e.g. Meekstone)?
Same question for a global enchantment (e.g. Propaganda).
Alternatively, is there a way to do it going the other direction - that is, Meekstone "is enchanting" [card, card, card]?
Card.getEnchantedBy() only works for local enchantments.
Can someone who knows the card API help me out a bit here?
Propaganda is not a continuous static effect and does not need to create a list of affected cards.
EDIT: Done. If you have a static effect se use "se.getAffectedCards()" and "se.getSource()" to get the information you want.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge version 1.2.16
by Doublestrike » 10 Oct 2012, 08:30
Thanks Sloth, but I must be doing something wrong. I test with meekstone and getStaticEffects().getStateBasedMap() but there's nothing in the list...
What I'm trying to do is finish off the targeting arcs code. To draw an arc, of course, I need a pair of interacting cards.
Perhaps the better question is, what effects and abilities can this be used on? So far, single target enchantments and combat is all I've found. I'd like to include global stuff...possible?
What I'm trying to do is finish off the targeting arcs code. To draw an arc, of course, I need a pair of interacting cards.
Perhaps the better question is, what effects and abilities can this be used on? So far, single target enchantments and combat is all I've found. I'd like to include global stuff...possible?
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Sloth » 10 Oct 2012, 10:52
Try the new AllZone.getStaticEffects().getStaticEffects().Doublestrike wrote:Thanks Sloth, but I must be doing something wrong. I test with meekstone and getStaticEffects().getStateBasedMap() but there's nothing in the list...
NOTE: Some sources of static effects will not be on the battlefield.
A lot of static effects only affect the source itself.
Most auras and equipments have static effects affecting the card they are attached to.
EDIT: And don't use Meekstone for testing. Use Crusade or something.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge version 1.2.16
by Doublestrike » 10 Oct 2012, 11:21
OK thanks, will implement tomorrow morning.
It sounds like a lot of what I'm calling "global" effects can't be traced via targeting arcs for now, so I'll stick with what I got.
It sounds like a lot of what I'm calling "global" effects can't be traced via targeting arcs for now, so I'll stick with what I got.
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Doublestrike » 15 Oct 2012, 05:34
I'll be making some aesthetic updates here and there to the view portions of the game. Control is separated so this shouldn't cause (m)any gameplay bugs.
Shouldn't break anyone's build but cross-platform painting has a lot of gotchas, so I'll post changes here to help nail down the issues.
====
First up is the home screen menu, r17504. I had to slightly adjust a few skins for readability (default, firebloom, rebel) but not very noticeably.
Known problem: on small screens if all menus are expanded, overflows off screen. Trying to avoid an ugly scrollbar, looking for better solution (open to suggestions, hopefully with a picture).
Shouldn't break anyone's build but cross-platform painting has a lot of gotchas, so I'll post changes here to help nail down the issues.
====
First up is the home screen menu, r17504. I had to slightly adjust a few skins for readability (default, firebloom, rebel) but not very noticeably.
Known problem: on small screens if all menus are expanded, overflows off screen. Trying to avoid an ugly scrollbar, looking for better solution (open to suggestions, hopefully with a picture).
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Doublestrike » 15 Oct 2012, 05:42
Just noticed this. The method to notify a view is found in its controller and is called update().Max mtg wrote:More changes to come:
Players - I want them instantiated at the beginning of game. (Will need a method to notify views somehow)
You can access any controller directly using its singleton, or via any view using getLayoutControl().
These methods are documented in IVDoc and ICDoc (interface for doc view, interface for doc control).
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Doublestrike » 15 Oct 2012, 08:41
Next aesthetic update: a new button style.
Can be seen/tested in the Constructed submenu. Hopefully no strange behavior.
Can be seen/tested in the Constructed submenu. Hopefully no strange behavior.
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Forge version 1.2.16
by Chris H. » 15 Oct 2012, 11:43
Doublestrike wrote:Next aesthetic update: a new button style.
Can be seen/tested in the Constructed submenu. Hopefully no strange behavior.
Looks good from what I can tell. Appears to be more buttony in appearance.
Doublestrike wrote:I'll be making some aesthetic updates here and there to the view portions of the game. Control is separated so this shouldn't cause (m)any gameplay bugs.
Shouldn't break anyone's build but cross-platform painting has a lot of gotchas, so I'll post changes here to help nail down the issues.
Thank you and it looks good on my Mac for the most part. The title label for the views look off. The Exit Forge button did not work and I had to quit forge using a different method.
-

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
70 posts
• Page 2 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 39 guests