Forge version 1.5.16
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Forge version 1.5.16
by Chris H. » 28 Mar 2014, 23:13
Tentative target release date: Friday April 11 2014.
-
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.5.16
by Agetian » 30 Mar 2014, 06:55
A friend of mine suggested a very good idea about how the card art on the stack can be improved: it might be a good idea to use a portion of the card art for the stack (like a crop) instead of the full card image because the text is not legible there anyway. Since Forge is not using crops but is using fulls, my friend suggests a very interesting way to extract a portion of the full card art image that would make sense in the stack view. To quote my friend:
It doesn't have to be a perfect cutout of the image box--in fact, since the end result is going to be small, you can freely crop out part of the art. Here, I attached an image of what I mean.
The width labeled "X" represents the distance from the left edge of the image to the card's art. This amount varies depending on the image/cropping.
The height marked "Y" is likewise the variable distance from the top of the image to the top of the art.
So what you can do is, start with an average-looking image, and determine what percent of the image width X occupies, and what percent of the height Y occupies. Use those two percentages as your "base case." Then assume that due to cropping, card frame variance, etc., that both of those numbers can vary by a certain amount. For example, in the attachment I'm guessing that X could vary by as much as 100% and that Y could vary by as much as 50%, to be safe (I imagine the variance probably isn't quite of that magnitude in reality).
So then just start at X+guessX, Y+guessY, and draw a cropping rectangle that is smaller by the amount of your guesses, and you end up with a conservative chunk of art that should still be more or less recognizable (on the right of the attached image is a sample "zoomed in" version of the stack entry).
Hope this helps!
- Agetian
It doesn't have to be a perfect cutout of the image box--in fact, since the end result is going to be small, you can freely crop out part of the art. Here, I attached an image of what I mean.
The width labeled "X" represents the distance from the left edge of the image to the card's art. This amount varies depending on the image/cropping.
The height marked "Y" is likewise the variable distance from the top of the image to the top of the art.
So what you can do is, start with an average-looking image, and determine what percent of the image width X occupies, and what percent of the height Y occupies. Use those two percentages as your "base case." Then assume that due to cropping, card frame variance, etc., that both of those numbers can vary by a certain amount. For example, in the attachment I'm guessing that X could vary by as much as 100% and that Y could vary by as much as 50%, to be safe (I imagine the variance probably isn't quite of that magnitude in reality).
So then just start at X+guessX, Y+guessY, and draw a cropping rectangle that is smaller by the amount of your guesses, and you end up with a conservative chunk of art that should still be more or less recognizable (on the right of the attached image is a sample "zoomed in" version of the stack entry).
Hope this helps!
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.16
by Xyx » 30 Mar 2014, 17:39
Cropped art would be cool. It'd probably be tricky to handle full art, split cards and flip cards, though.
Re: Forge version 1.5.16
by Agetian » 30 Mar 2014, 18:31
Yes, I think split cards and flip cards can be shown the way they're shown right now if worst comes to worst (since they're mostly art anyway, especially splits).Xyx wrote:Cropped art would be cool. It'd probably be tricky to handle full art, split cards and flip cards, though.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.16
by drdev » 30 Mar 2014, 18:53
The main concern I have for doing the cropped art is that it would take up even more width than the card image does now and either require a wider stack pane or the text will wrap that much more often. Plus you can already hover over the stack item to view the card details and pictures in the corresponding panes.
I'll certainly keep the idea in my back pocket though, especially for the mobile game.
I'll certainly keep the idea in my back pocket though, especially for the mobile game.
Last edited by drdev on 30 Mar 2014, 19:39, 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 version 1.5.16
by Agetian » 30 Mar 2014, 19:29
Yes, true. OK, hopefully this'll be helpful somehow!
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.16
by drdev » 06 Apr 2014, 20:33
So if anyone is currently working on anything in forge-gui, please hold off making any commits for a bit, as I'm about to start a major refactoring so that the mobile and desktop games can share some of the code I've duplicated. I want to do this now before any GUI changes start being made for the desktop game that won't get pulled into the mobile game.
Is there anything special I need to do to make sure a new project is included in the Maven build?
Is there anything special I need to do to make sure a new project is included in the Maven build?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.16
by moomarc » 07 Apr 2014, 13:06
Dan, is it alright if I commit changes to the cards folder and token-images.txt? Xitax finished his work on updating the scripts so that tokens are set-specific where possible (where the same token is produced by two different cards in different sets - I think I have an idea on how to make it work for the same card across sets, but I'll have to see when I get some time to try it). I've already uploaded the new images, so it's just waiting on the script changes that I need to upload.
-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.5.16
by drdev » 07 Apr 2014, 16:30
@moomarc - Yes, that's fine. I'm not moving anything in the res folder. It will still be in forge-gui.
It's only changes to stuff in src that I'd suggest be held off on for a day or so. I made progress yesterday on the refactoring, and hopefully will be able to commit stuff later today or tomorrow at the latest.
It's only changes to stuff in src that I'd suggest be held off on for a day or so. I made progress yesterday on the refactoring, and hopefully will be able to commit stuff later today or tomorrow at the latest.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.16
by drdev » 08 Apr 2014, 23:07
I just committed the new forge-gui-desktop module in r25373. forge.view.Main.java has been moved to this module, so you'll need to pull it into Eclipse, update Maven dependencies, and run this module as a Java Application instead of forge.gui.
I've done some basic testing, and most everything is working. There's an issue with the size of certain icons that I'm looking into, and I know Maven builds aren't going to work quite yet because they now need to be based out of forge-gui-desktop and the res/ folder remained in forge-gui.
Please let me know if you discover any functionality that isn't working. Feel free to make changes in forge-gui and forge-gui-desktop now that I'm finished with the big refactoring, as everything further will be minor tweaks and updating the mobile game.
Thanks.
-Dan
EDIT: Fixed image size issue in r25375.
I've done some basic testing, and most everything is working. There's an issue with the size of certain icons that I'm looking into, and I know Maven builds aren't going to work quite yet because they now need to be based out of forge-gui-desktop and the res/ folder remained in forge-gui.
Please let me know if you discover any functionality that isn't working. Feel free to make changes in forge-gui and forge-gui-desktop now that I'm finished with the big refactoring, as everything further will be minor tweaks and updating the mobile game.
Thanks.
-Dan
EDIT: Fixed image size issue in r25375.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.16
by friarsol » 09 Apr 2014, 02:18
Looks like I'm getting a Crash when I try to launch Forge:
- ConversionException | Open
- Code: Select all
Forge Version: SVN
Operating System: Windows 8 6.2 amd64
Java Version: 1.7.0_51 Oracle Corporation
main > Error loading Quest Data
com.thoughtworks.xstream.converters.ConversionException: null : null
---- Debugging information ----
cause-exception : java.lang.NullPointerException
cause-message : null
class : forge.util.ItemPool
required-type : forge.util.ItemPool
converter-type : forge.quest.io.QuestDataIO$ItemPoolToXml
path : /forge.quest.data.QuestData/assets/shopList/fpack
line number : 393
class[1] : forge.quest.data.QuestAssets
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : forge.quest.data.QuestData
version : not available
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1185)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1169)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1040)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1031)
at forge.quest.io.QuestDataIO.loadData(QuestDataIO.java:118)
at forge.control.FControl.initialize(FControl.java:208)
at forge.view.Main.main(Main.java:49)
Caused by: java.lang.NullPointerException
at forge.item.FatPack.<init>(FatPack.java:45)
at forge.item.FatPack$1.apply(FatPack.java:38)
at forge.item.FatPack$1.apply(FatPack.java:34)
at forge.quest.io.QuestDataIO$ItemPoolToXml.readFatPack(QuestDataIO.java:659)
at forge.quest.io.QuestDataIO$ItemPoolToXml.unmarshal(QuestDataIO.java:627)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
... 24 more
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.16
by drdev » 09 Apr 2014, 02:32
@friarsol - are you running from source or did you attempt a Maven build? And what does forge.properties location have to do with anything?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.16
by friarsol » 09 Apr 2014, 02:41
I always run from source.drdev wrote:@friarsol - are you running from source or did you attempt a Maven build? And what does forge.properties location have to do with anything?
The *forge.profile was an additional comment. After I got in I opened up a game, and none of my pictures were there. If the structure is going to be changed, and things need to change to fix them, they should be noted. The old forge.profile example is now in the wrong spot.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.16
by drdev » 10 Apr 2014, 00:12
@friarsol - I've fixed the relative paths for forge.profile.*, CHANGES.txt, LICENSE.txt, README.txt, and howto.txt in r25386-r25388.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.16
by friarsol » 10 Apr 2014, 01:19
Thanks, here's some more info regarding the crash:
I get it when I goto New/Load Quest. I've attached one of of the quests that causes the crash for me. As I mentioned, a newly created quest doesn't have this issue and I didn't have this issue before the conversion.
I get it when I goto New/Load Quest. I've attached one of of the quests that causes the crash for me. As I mentioned, a newly created quest doesn't have this issue and I didn't have this issue before the conversion.
- Attachments
-
- tre.zip
- (5.03 KiB) Downloaded 197 times
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: No registered users and 59 guests