![]() |
Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
There are a couple of ways it could be done. Lioden stacks ordinary images on top of one another, Flight Rising saves a bunch of images with the pet's ID (I think), HTML5 Canvas could be an option, but dynamically generating an image from merged layers with a meta header declaring a php script as an image should also work -- I'm just not sure how I feel about the load time of this. If you don't save the "image", merely load it every time for each adopt on the page, then it's like Flight Rising but without the script storing the image afterward.
No matter which route you go you'll want to plan a folder structure ahead of time and add these attributes for your fish into the database as columns (in the table for owned adoptables). You'll want to make a new method inside of the ownedadoptables class, I named mine getLayers(). Look through the whole class and you'll find the method that's being used to call up the images in the site - find every instance where it's being called inside the framework and call your method that'll place in a generated image instead. I won't give you hints on that, though. It's very easy to call up the variables once they exist in your database! I simply made a column called "p_color" to hold my primary colors, its a SMALLINT, and holds simply numbers. They correspond to array that holds all my color names - and all of these color names are the name images in my folders. So, like... PHP Code:
You're basically just going to concatenate these variables together as a string of folders and file names. These are how your code will find the images you want to merge. I'm already storing some custom images in an /img/ folder I created, and my creatures are called Novu, so my folder structure looks like this - ![]() Obviously you need to make a folder structure that makes sense for you needs. Genders look different, things get bigger with age, that nonsense. Anyway, I've basically already successfully been able to imitate Lioden with its overlapping images (but not a dynamically generated single image). The concept is virtually the same, its just what you do with those variables once you have them ready to go. I hope its understandable, though, that I don't want a bunch of sites running around with a clone of this particular technique, at least not for free. So this is about all the help I'm willing to give. But I hope I've at least managed to push you in the right direction!
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 03-17-2015 at 02:21 PM. |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
GD images | mapleblade | Mys v1.2.x Mods | 11 | 03-04-2012 04:39 AM |
no images | RoconzaArt | Questions and Supports | 1 | 03-13-2011 10:39 AM |
More images would be nice. | RoconzaArt | Feedback and Suggestions | 12 | 01-22-2011 10:24 PM |
I cant see the images | zKaZy | Questions and Supports | 11 | 03-28-2010 11:49 AM |
Images not showing | Tequila | Questions and Supports | 22 | 03-07-2009 07:15 AM |
What's New? |
What's Hot? |
What's Popular? |