It is currently 21 May 2024, 10:50
   
Text Size

Forge Android App

Post MTG Forge Related Programming Questions Here

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

Re: Forge Android App

Postby drdev » 09 Mar 2014, 04:24

I just got the logic hooked up to show/hide the panel for the Hand for each player. By default, the game will be set up to only show the Hand panel for Human players (see first screenshot below).

CardSizes.png

As mentioned, you can click on the Hand tab to hide your Hand panel, or click on your opponent's Hand tab to show their hand. If there's no effect in place that allows you to view their hand, the cards would simply be displayed face down. This also means discard effects that make your opponent reveal their hand and have you pick a card will simply open this panel and turn the cards face up temporarily.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 09 Mar 2014, 22:01

Well, I guess the previous layout screenshots weren't exciting enough. Perhaps this screenshot will prove more effective at eliciting a response. :)

GameInProgress.png

As you can see, I've managed to hook up all the input and display logic with the actual game logic, so now you can actually play a game!!!

Now before you get too excited, I still haven't implemented a zoom view, cards can't tap or stack, you can't select from multiple abilities, and anything that would result in a dialog isn't going to work. But it's a good start.

Feel free to try this out and let me know what you think. Just run Main.java in forge-m-desktop.

Thanks.
-Dan

P.S. Max, since I haven't heard from you regarding creating a shared gui module, I ended up just copying and tweaking many of the input and utility files from forge-gui into forge-m-base to get all this working. I'd still like to go back later and refactor the duplicate code into a shared module, using interfaces as needed to allow two-way communication before the shared code and the specific gui implementations. Is that something you could still help me with?
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby squee1968 » 10 Mar 2014, 00:21

Looking pretty good so far, although I hope those icons will be skinnable. IMHO, the "YES" or "OK" button on the prompt panel should be on the right side (configurable?) since most people are right handed. Will the panels be resizable? Movable? Will a tablet need to be rooted on order to run this? What are the system requirements? File size? What versions of android will be needed? Are there plans to support older versions?
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Forge Android App

Postby drdev » 10 Mar 2014, 02:14

Everything is already skinned using the same skins available to the desktop application. You can change the skin in Settings.

I chose to have the buttons one on each side to make it harder to misclick one when you meant to click the other, as well as for symmetry. I could certainly add a setting to adjust that though. Or are you just saying the buttons should be swapped so No/Cancel is on the Left and Ok/Yes is on the right?

I have no immediate plans to make panels resizable or movable, although as mentioned the hand area can be hidden to make the field larger. There will also be a zoom view to make the cards easier to read.

I don't think rooting will be required. I'm pretty sure you just need to disable a setting that would otherwise prevent installing apps not from Google Play. At the moment you can only run from source anyway.

I don't have answers to your other questions, but I'm doing what I can to make it work on devices with lower specs. As mentioned, these screenshots are from a 320x480 display, and most smart phones and tablets offer better resolution than that.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 10 Mar 2014, 04:18

As an update, I made the OK and Cancel buttons wider and improved their appearance to look better in the corners, particularly with longer captions like "Cancel". I also fixed it so the disabled appearance applies an alpha composite.

Here's a sampling of the Match screen for 6 different themes so you can get a sense of what the result looks like:

MatchThemeSamples.png

I'd still love to hear more feedback on this screen. I want to make sure I'm building something people will enjoy.

Thanks.
-Dan
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby Agetian » 10 Mar 2014, 05:51

Wow, Dan, I'm really impressed by the progress thus far! The match screen looks very tidy and intuitive! I think this is going to be the best mobile MTG ever! :) Keep it up!

- Agetian
Agetian
Programmer
 
Posts: 3474
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 563 times

Re: Forge Android App

Postby squee1968 » 10 Mar 2014, 11:26

I didn't realize the icons in the skin you've been showing us were so ugly, the others look much better, thanks for the pics of the other skins. Yes, I was saying the buttons should be swapped, not both on the same side. The buttons look much better, and are more functional, too, esp. for people like me with fat and clumsy fingers. This is gonna be pretty freaking sweet! I will primarily be playing this on my new tablet, but I'd like to be able to play on my older phone as a backup.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Forge Android App

Postby drdev » 10 Mar 2014, 14:07

@squee1968 - I'll add a setting to swap the OK and Cancel buttons, but I'm going to leave the OK button on the left by default since that matches the order on the desktop version.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 11 Mar 2014, 04:49

So I've got an early version of card zoom working. Check it out:

CardZoom.png

The idea is that when you tap on a card, you'll be presented with a zoomed view with all the currently available options for that card as clickable list items, based on the current Input. For example, for the default pass priority input, the options will consist of all SpellAbility instances available to the card. For the attack input, the options would consist of declaring or removing as an attacker, as well as potentially other options for banding. The ability to offer multiple choices here will allow getting around the lack of a right-click trigger for certain things.

You may notice that more than one card is being displayed. I decided for usability to allow scrolling through all cards in order within the same zone as the originally tapped card. This way you can stay in zoomed view while quickly analyzing your hand or all your creatures on the field for example. For certain inputs, such as paying mana, the zoom view will stay open and auto-select the next card after selecting a mana ability for instance, allowing you to quick tap multiple mana sources. Also, for certain inputs, the zoom view will filter out cards that have no applicable options, such as cards without mana sources in the case of the mana payment input.

Note that due to space constraints, only the first option is displayed by default, however if there's more than option, the More button will become enabled and tapping it will cause all options to display by making them cover up part or all of the card display as needed. Tapping that button again (which will at that point have the caption "Less") will go back down to just one option. The Back button will hide the zoomed view as you'd expect, as will tapping the selected card a second time.

Eventually, I will display a card detail panel above the zoomed card images, with the ability to tap it to expand if it's cut off at all.

I'm curious to hear people's reaction to this. I know it will add more taps to gameplay as playing a land will require two taps instead of one click for instance, but I felt that without being able to view a legible version of a card or see card details, it'd be hard to make informed decisions about what to do anyway. Plus, single tap to zoom seems a necessary ease of use requirement when cards start off so small. That said, I'm open to suggestions if there's anything I can do to make this more user friendly.

Thanks.
-Dan
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby silly freak » 11 Mar 2014, 07:32

How about a long tap for the detail view? For cards with unambiguous actions, this would remove a tap. but I also like this idea. The scrolling is a really good and necessary feature, and zooming in before performing an action prevents the player from accidentally using the wrong card.
___

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: Forge Android App

Postby friarsol » 11 Mar 2014, 12:14

drdev wrote:So I've got an early version of card zoom working. Check it out:

CardZoom.png

The idea is that when you tap on a card, you'll be presented with a zoomed view with all the currently available options for that card as clickable list items, based on the current Input. For example, for the default pass priority input, the options will consist of all SpellAbility instances available to the card. For the attack input, the options would consist of declaring or removing as an attacker, as well as potentially other options for banding. The ability to offer multiple choices here will allow getting around the lack of a right-click trigger for certain things.
I think selection of SpellAbility should be ok this way. I still haven't had a chance to actually try it out yet, so aside from conjecture of screenshots I can't tell how it feels. In this case, does the back button cancel you out of zoomed in mode? So if I have a creature like Morphling and I click next to see all the SAs, then I get to the last one and I realize I wanted the second to last, do I have to scroll ALL the way back around? Or is there a way to goto the previous one?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge Android App

Postby drdev » 11 Mar 2014, 14:55

@friarsol - Let me clarify. Back will take you out of zoomed in mode, but there is no Next button. The More button in the bottom right, if it's enabled, will make all options visible by covering as much of the card as needed, and can be tapped again (with the text "Less") to go back to seeing only the first option and all of the card.

Should I use a different word than "Back" to make this more clear? Maybe "Done" or "Close"? I chose "Back" to make it clear that the Back key on Android devices would close Zoom mode.
Last edited by drdev on 11 Mar 2014, 15:14, edited 1 time in total.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 11 Mar 2014, 15:10

silly freak wrote:How about a long tap for the detail view? For cards with unambiguous actions, this would remove a tap. but I also like this idea. The scrolling is a really good and necessary feature, and zooming in before performing an action prevents the player from accidentally using the wrong card.
I was thinking that long press would eventually be used to start a card drag drop for reordering your cards in hand, for example.

What I could do instead is make it so a quick double-tap auto-selects the first ability without bringing up card zoom. I'd just add a short delay to opening the zoom view to allow for that second tap.

Also, I could make it so tapping the selected card in zoom view selects the first ability instead of just hiding the zoom view, thus making the tappable region much larger to select the ability. Since there's a Back button in the bottom left and a Back key on Android devices, it would still be easy to hide the zoom view without selecting an ability. If a card with no available options is selected in the zoom view, tapping it would just hide the zoom view as before.

How do these ideas sound?
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 12 Mar 2014, 23:16

@silly freak - I took your thanks as a green light, so I went ahead and made those two changes. You can now double-tap to activate the first ability without the zoom view opening. You can also know click the selected card at the front of the zoom view to auto-activate the first option, instead of having to click the single list item below the card image, though that item is still clickable.

@friarsol - I decided per your confusion to change the word "Back" to "Hide". I also made it's more obvious when there are no options by showing through your player info panel, like this:

CardZoom2.png

Note that tapping in any transparent area of the screen will hide the zoom view now, in addition to the Hide button itself.

Thanks for the feedback guys. Keep it coming. :D
-Dan
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge Android App

Postby drdev » 15 Mar 2014, 03:50

I've now added mana pool support.

ManaPool.png

As you can see, instead of having 6 mana icons always visible, a single icon is present in each player's tab row which displays the total mana count in that player's pool, and then if you select that tab, it displays 6 larger clickable mana icons and counts for each individual color (and colorless). Tapping on these icons will allow paying mana costs when an InputPayMana is active, the same as in desktop Forge.

Does this behavior seem reasonable to everyone?

Thanks.
-Dan
Last edited by drdev on 15 Mar 2014, 04:23, edited 1 time in total.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 38 guests


Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 38 guests

Login Form