Results 1 to 7 of 7

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: New skins system

  1. #1
    Default New skins system
    Hey guys, I'm working on a new skin system that will allow graphics people to create skins (that can be downloaded via installer) that would appear as options in participating programs.

    E.g. take Garf. A 3rd party can create a skins package, changing the graphics (and perhaps sounds) of the game. In this case, they will also be able to specify the location of the buttons on the screen (by editing a text file...perhaps in XML format). All of this would be downloaded as a package on installer and installed in a subdirectory off of, let's say, the ~/Media/Skins/Garf directory. When the user runs Garf and chooses the Change theme option, he or she will be presented with a list of themes to choose from.



    I'd like for this to be an open standard...or at least I'd like apps to agree to a common skins directory (sort of like emulators agree to a common ROMs directory)...tentatively it's ~/Media/Skins/<AppName>/<SkinName>

    I'm somewhat of a rookie when it comes to Cocoa-type stuff, but in case anybody wants to reuse it, I won't place any license restrictions on the relevant portions of the Garf code, which doesn't yet exist.

    If anyone has different ideas, please let me know.
    Thanks,
    JLA

  2. #2
    well hope you like what i have done here!!!!

    ok here i let you guys have a mod version i made of the game Garf (clone simon)i think it will look more realistic!!!!

    i will edit the img more to get it perfect....

    hope you guys like it....anjoy



    idea from drunknbass site!!!!



    Icon


    Instruccions:
    just overwrite the oldones with this Mod,
    i use iPhoneBrowser or WinSCP on the Application folder (Garf.app)
    Allways back up your data to be safe!!!
    Link to my mod.....
    http://www.modmyi.com/forums/showpos...75&postcount=1
    Last edited by borax; 12-29-2007 at 12:54 AM.

  3. #3
    One thing I do in iBlackjack for my skin/theme packages is fall back to the default bundle when an image doesn't exist. It becomes really handy for when a theme developer doesn't want to change everything in the theme, but maybe just a few images.

    Here is the code I use for doing that.
    Code:
    //Setup Theme Bundle
    NSString * bundlePath = [[Preferences sharedInstance] getPref:@"theme"];		
    
    //If theme bundlepath is Default/ use the mainBundle, otherwise use the theme bundlepath
    if ([bundlePath caseInsensitiveCompare:@"Default/"]!=NSOrderedSame)
    	_bundle = [NSBundle bundleWithPath:bundlePath];
    else
    	_bundle = [NSBundle mainBundle];
    	
    NSString *chipName = [NSString stringWithFormat:@"chip%d", _value];
    NSString *chipBundlePath = [_bundle pathForResource:chipName ofType:@"png"];
    if (chipBundlePath == nil) {
    	chipBundlePath = [[NSBundle mainBundle] pathForResource:chipName ofType:@"png"];
    }	
    CGImageRef imageRef = [[UIImage imageAtPath:chipBundlePath] imageRef];
    I like your idea to change the location of images as well via a config file, that'd be interesting to see. I'd be useful in a few images I display on the Blackjack table for the game rules.
    Patrick McCarron
    iPhone Software Engineer @ Mobileage, Inc

  4. #4
    I think Blackjack et al. are other great candidates for a skin system, although your default graphics are far better than mine. I'm also thinking that theme developers could create skins to match the theme.

    I think one of the advantages of having a separate skins folder is that it allows for installing/uninstalling fairly independently of the program itself. And independent of the developer. (And it's in the media partition.) I think Borax's skins are a good example...I couldn't include it in the official release of Garfunkel due to copyright/trademark reasons, but someone might include it in a separate download on some repository somewhere. And I'm sure that's the look a lot of people want.
    JLA

  5. #5
    Quote Originally Posted by JLA View Post
    I think Blackjack et al. are other great candidates for a skin system, although your default graphics are far better than mine. I'm also thinking that theme developers could create skins to match the theme.

    I think one of the advantages of having a separate skins folder is that it allows for installing/uninstalling fairly independently of the program itself. And independent of the developer. (And it's in the media partition.) I think Borax's skins are a good example...I couldn't include it in the official release of Garfunkel due to copyright/trademark reasons, but someone might include it in a separate download on some repository somewhere. And I'm sure that's the look a lot of people want.
    JLA
    Exactly how and why I have a skin/theme system in place already. I had a lot of people wanting to skin it, so I had to give them a way. The downloads are seperately available via various repositories as well because it makes the main game download much better and smaller.

    I store my skins in:

    /var/root/Library/iBlackjack/Themes/Themename/
    Patrick McCarron
    iPhone Software Engineer @ Mobileage, Inc

  6. #6
    It seems like your setup would be a good candidate for a single folder that multiple apps use...(i.e. all sorts of different card apps). The cards could each be a graphic that all card programs could access. And a program could scale and rotate it if needed, should the cards in the apps be different sizes...maybe that's overkill.

    The fundamental tenet of the system I am thinking of is that very little is hard-coded...most constants (strings, locations, etc.) would be stored in text files of some sort. This would allow for a much greater customization. (I suppose this would be flesh, not so much skins). But I can't decide whether to go XML or a simpler form of text file...e.g.
    button.d.x=112.0
    button.d.y=100.0
    button.d.frequency=440.0

    Of course, I don't know how to parse text on the iPhone, but I hope it's not much different from how I do it in Java.

    JLA

  7. #7
    Yeah I am actually going to add support to read the themes of iSolitare and iPoker (once I'm done with it).

    I talked with Chris who made iSolitare, and our sizes are close just not the file names. So I'd need to create a function to convert filenames between iSolitare and iBlackjack/iPoker, but it's not too hard. I just haven't done it yet.
    Patrick McCarron
    iPhone Software Engineer @ Mobileage, Inc

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •