It is currently Fri Dec 15, 2017 9:38 pm

All times are UTC + 9:30 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Advance Wars Super HD Remix ?
PostPosted: Tue Dec 29, 2009 9:59 pm 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
While making those graphics for AHC I started thinking that the same method could be used to scale up gfx from the AW games, resulting in something that might look a bit more modern and suitable for large computer screens, while still looking like Advance Wars.

So I began experimenting.

Image

These graphics are in a size of 128x128 pixels per tile. This is too large to be used, but it's good to make graphics at a larger size than you need, since you can just scale down to whatever size is required.

The same scaled into 50% (64x64):

Image

25% (32x32):

Image

Much smaller than this and I would have to start manually retouching after scaling to keep it looking crisp. 32x32 could kinda use that already but LAZEEEEEEH

I believe 32x32 at least is supported by the new engine? I've also modified the old CW engine (the AHC branch that is) so it can support any tile size desired and I presume CW2 has been built that way.

Not sure where I'm going with this, but I think it would be nice to have an AW simulator that doesn't look like complete arse. If I can keep the steam up until I have at least the AW1 set of units and terrains, then, uh

I'm too incoherent to bring this post to a closure.


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 3:49 am 
Offline
Main Coder

Joined: Fri Apr 04, 2008 10:50 pm
Posts: 169
Indeed each plugin can have a different tile size and everything scales accordingly. It's defined in the plugin.properties file
see default and dor I try to minimize hard coding stuff.

cool images 8)


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 5:01 am 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
Can units of different armies be loaded as separate sprites? I don't suppose we can use recoloration by code if my sprites are RGBA images.

edit: I got CW2 to load graphics at a size of 64x64, which is cool, but I miss the ability to resize the window from CW1. With this size it's going to be claustrophobic if we can't play in full size window.


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 5:48 am 
Offline
Main Coder

Joined: Fri Apr 04, 2008 10:50 pm
Posts: 169
Can units of different armies be loaded as separate sprites?
not yet

I don't suppose we can use recoloration by code if my sprites are RGBA images.
recoloring data is stored in xml. I didn't recolor within the code because the recoloring code can change in the future as it already did.

Good point about the resizing I know it's possible I'll take a look @ it. For now you can add
user.display.width=1024 and user.display.height=800 or even user.display.fullscreen=true to game.properties to prevent claustrophobic attacks :lol:

Note that I haven't tested another size yet. So weird things might happen :P
Your requests are added to the growing! issues list on google code. If you find more could you add them there?


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 5:51 am 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
Umm I think I need to clarify that what I meant is that differently coloured units should be loadable separately. There is really no way that I can see you could recolour RGBA images in code so that it would look decent.

stef569 wrote:
Good point about the resizing I know it's possible I'll take a look @ it. For now you can add
user.display.width=1024 and user.display.height=800 or even user.display.fullscreen=true to game.properties to prevent claustrophobic attacks :lol:

I can get the game to start in full screen mode, but changing the display size doesn't seem to have an effect.


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 7:03 am 
Offline
Main Coder

Joined: Fri Apr 04, 2008 10:50 pm
Posts: 169
I was already wondering when I saw your images they could contain +-50 colors, where as the dor image contains maybe 10. Even then when you would write your own RGBFilter in code it would look like:

Code:
case 0x45555: // originalColor
if(yellowComet) {
    return 0x12345 // replace color
}
...


Where as the xml to archieve the above looks like:
Code:
        <originalColors>45555</originalColors>
        <replacementColor>
            <name>YELLOW</name>
            <replacementColors>12345</replacementColors>
        </replacementColor>
...

maybe a bit more verbose but it does the same thing. replacing original colors with replacement colors aka poor man's palette swap. replacing more colors improves the new recolored image. But you already knew that. I still don't understand your question 100%. The code behind the xml is like RGBFilter but faster and works with slick images(Slick uses Slick images not java.awt.images)


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 7:34 am 
Offline
User avatar

Joined: Tue May 08, 2007 6:19 am
Posts: 1363
Well the infantry graphic for one thing has around 3000 unique colours... while I could attempt to optimise and bring them down to under 256 I don't think I could get them low enough where it would be sensible to write a conversion for every shade by hand. In any case doing the recolouring in Photoshop would be much easier for me and I would have more control over the end result, so the only reason you would want to do it in code would be to save space, but this is a PC game and we're not going to save terabytes with something like this.


Top
 Profile  
 
 Post subject: Re: Advance Wars Super HD Remix ?
PostPosted: Wed Dec 30, 2009 8:56 am 
Offline
Main Coder

Joined: Fri Apr 04, 2008 10:50 pm
Posts: 169
Well that can be done, I think it's actually more work but here it goes:

  • Disable recoloring for units -> in imageLoader.txt there is the line m unit units_RED.png 32 40 true remove the true
  • Remove colors content like this(optional, but avoids confusion) from colors.xml
    Code:
             <colorFilter>
            <name>unit</name>
            <baseColor>RED</baseColor>
            <originalColors></originalColors>
            <replacementColor>
                <name>BLUE</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>GREEN</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>YELLOW</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>GRAY</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>ORANGE</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>BLACK</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>CYAN</name>
                <replacementColors></replacementColors>
            </replacementColor>
            <replacementColor>
                <name>PINK</name>
                <replacementColors></replacementColors>
            </replacementColor>
        </colorFilter>
  • Add your own recolored unit images manually both normal and darker images to imageLoader.txt for all supported colors(that are all the colors in colors.xml)

eg:
m unit_red units.png 16 24
m UNIT_red_DARKER units.png 16 24
m unit_cyan units.png 16 24
m UNIT_CYAN_DARKER units.png 16 24

and don't forget GRAY for neutral
m unit_gray units.png 16 24
m UNIT_gray_DARKER units.png 16 24
case doesn't matter, if you forgot one you'll get this:
Quote:
java.lang.IllegalArgumentException: No obj found for 'UNIT_BLUE' available keys ...

Quote:
when starting up you'll get warnings:
WARN [main] com.customwars.client.io.img.slick.RecolorManager - Cannot recolor unit to GRAY
WARN [main] com.customwars.client.io.img.slick.RecolorManager - Cannot recolor unit to YELLOW
WARN [main] com.customwars.client.io.img.slick.RecolorManager - Cannot recolor unit to RED
WARN [main] com.customwars.client.io.img.slick.RecolorManager - Cannot recolor unit to PINK

then it still won't work because I never thought that recolor would be false, so I have to add a method that disables recoloring. :) edit: I just committed that change.
Also consider that when I add unit image sets(the prefix before... I can't find a good name for it) -> army1_unit_red you have to change each line in imageLoader.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 9:30 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Blue Moon by Trent © 2007
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group