Jump to content

Hare

Game Owner
  • Content Count

    309
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by Hare

  1. I had trouble with that part because of the caching issues, but managed to figure it out! I'm glad this helps, you're welcome! There is a specific palette for Warrenz because we use modulation a lot. Other sites may not need that if they do hex edits instead. I would pick a color that looks best on the animal for the 'standard' color and then modify it for non-standard animals. We chose that specific shade of brown for the file, but then we have a brightness and saturation modulator on the realistic colors.
  2. You're welcome and I'm glad you've found it helpful!
  3. Added sections for transparency, gradients, fractals, and storing images. All done with the Imagick tutorials!
  4. Added tutorials for mendelian genetics, color swapping, cutting out markings, and marking variation. Will add more soon.
  5. STORING IMAGES - When to Render Rendering images with Imagick is easy, but it takes a while to process each time you view the pet that's being rendered. If you want players to see images instantly without having to render them each time, you can store them in a file directory. First, you'll need something to name the file. We can use the pet's unique ID for this. Put the ID variable in your display code (wherever the image will be displayed) so you can pass it to your Imagick file (img.php). <?php echo "<img src='img.php?petid=$petid'>"; ?> Now pass the GET variable to Imagick so you'll have the pet ID in your Imagick code. You'll also add a new section to your Imagick code near the end. We'll use an if statement to check if a pet with this ID has an image file already (if not, it will write a new one). <?php $path = "./img/"; $petid = $_GET["petid"]; $img = new Imagick( $path . "/base.png" ); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); if (!file_exists('img/pets/' . $petid . '.png')) { $storepath = $path . 'pets/' . $petid . '.png'; $img->writeImage($storepath); } header('Content-type: image/png'); echo $img; ?> Presto! There should now be a new file called 5.png in the img/pets directory. Now let's update your display code so it displays either the Imagick code OR the stored image based on whether the stored image is available. if (file_exists('img/pets/' . $petid . '.png')) { echo "<img src='/img/pets/$petid.png'>"; } else { echo "<img src='img.php?petid=$petid'>"; } If the file exists, bring up the image file for the pet. If the file does not exist, use Imagick to render one. When a pet's image is going to be changed, you can simply wipe their current image file. <?php unlink('img/pets/' . $petid . '.png'); ?> Then the next time the player looks at the pet, the image display code will handle things (since it's set up to check if the file exists). Image Manipulation Explots If you store the files like this, you'll need to make sure players can't cheat the system to write files for their pets. This is beyond my Imagick tutorial, but just a heads up. CACHING - Images Not Appearing 'Updated' Another important note is that if file names for a pet don't change even though the file was rewritten, some browsers will cache the old image, resulting in a player not seeing the changes they made to their pet. You can get around this by putting a timestamp in the image filename. The timestamp will have to be checked and updated appropriately.
  6. TRANSPARENCY - Another Way to Add Variation If you want to add even more color opportunities to your creatures, one thing you can do is change the level of transparency on a marking layer. Let's change the transparency of the agouti layer that is composited over the black base layer. <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $imgagouti = new Imagick( $path . "agouti.png" ); $imgagouti->evaluateImage(Imagick::EVALUATE_MULTIPLY, 0.5, Imagick::CHANNEL_ALPHA); $img->compositeImage($imgagouti, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> Now we have the agouti layer set to 50% its normal opacity, allowing for the black base to show through 50% more and resulting in a darker colored rabbit. You can still see the agouti layer, but it's half as strong. You can adjust this to whatever you want by editing the 0.5 to another number. GRADIENTS - Adding More Color You can also add gradients with Imagick using the newPseudoImage function. <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $gradient = new Imagick(); $gradient->newPseudoImage(400, 400, 'gradient:rgba(255,0,0)-none'); $img->compositeImage($gradient, Imagick::COMPOSITE_ATOP, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> Now we have a black rabbit with a red vertical gradient. Change the RBG value to whatever color you want for the gradient part. We can also add the agouti layer (as you can see, it works with markings) and have the gradient go over or under the marking depending on the order we composite the layers. Above image has no agouti marking. Above image has the agouti marking underneathe the gradient. Above image has the agouti marking above the gradient. You can also do other types of gradients such as radial with radial-gradient:rgba(255,0,0)-none. FRACTALS - Adding Even More Color You can do a lot of other nifty stuff with newPseudoImage such as fractals. <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $imgfractal = new Imagick(); $imgfractal->newPseudoImage(400,400, "plasma:fractal "); $img->compositeImage($imgfractal, Imagick::COMPOSITE_ATOP, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> Now we have fancy randomly generated colors.
  7. SPOTS - Cutouts & Variations What if you want to make a spotted animal, like this English Spot rabbit? You could draw spots on, but what if you want the spots to be the color of the animal's genotype (minus spotted factor)? AND you want variation for the spots? Step One - Prepare Layers For these layers, we'll draw where we want the spots to go. We'll have two different variations, spots0.png and spots1.png. Step Two - Add One Now let's add the spots0.png layer. If you read the tutorial above, you'll see that we created a solid white rabbit (albino) by adding a copy of the base layer that goes over the other markings. We're going to reuse this white layer for the English rabbits by cutting spots out of it. <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $imgalbino = new Imagick( $path . "base.png" ); $clut = new Imagick(); $clut->newImage(1, 1, new ImagickPixel('#FFF')); $imgalbino->clutImage($clut); $clut->destroy(); $imgspots = new Imagick( $path . "/spots0.png" ); $imgalbino->compositeImage($imgspots, Imagick::COMPOSITE_DSTOUT, 0, 0); $img->compositeImage($imgalbino, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> The spots layer composites over the albino layer with COMPOSITE_DSTOUT instead of COMPOSITE_DEFAULT, causing the spots to be cut out of the albino layer. We then composite the resulting 'updated' albino layer (with the spots cut out) onto the $img. Thus, we now have an English Spot: If we add the marking layers in, we can get any color to show where the spots are. Not just black spots. Step Three - Add Variation Variable Add a variable to the scripts like we did with genetics in the above tutoorial. <?php echo "<img src='img.php?spotnum=$spotnum'>"; ?> $spotnum will either be 0 or 1, which is in the filename for the spots. Now add the GET variable to your Imagick script like we did above. <?php $path = "./img/"; $spotnum = $_GET["spotnum"]; $img = new Imagick( $path . "/base.png" ); $imgalbino = new Imagick( $path . "base.png" ); $clut = new Imagick(); $clut->newImage(1, 1, new ImagickPixel('#FFF')); $imgalbino->clutImage($clut); $clut->destroy(); $imgspots = new Imagick( $path . "/spots" . $spotnum . ".png" ); $imgalbino->compositeImage($imgspots, Imagick::COMPOSITE_DSTOUT, 0, 0); $img->compositeImage($imgalbino, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> And now we get both variations depending on what number the animal has in their data.
  8. COLORING & MARKINGS - Mendelian Genetics There's a lot of ways you can handle markings and layers. We include semi-realistic Mendelian genetics on Warrenz, so I'll go over how to handle three different gene expressions in this part. I'm using rabbits as an example, but you can apply the same coding concepts to different species even though they have different genetics. TURNING LAYERS OFF AND ON We'll start with the basics, using the A Locus to turn layers off and on in a way that mimics real life. There's more to the genotype than just the A locus, but you don't need the entire genotype for a working code. You can add other genes later. Here' a real life agouti rabbit. ANd here's a tan pattern (same genotype aside from the A locus). And again, same genotype on this one except he's a self (A locus). So self has no markings, tan has just the cream underbelly, and agouti has cream underbelly and an additional brown layer. Let's do it! Step One In order to tell the program which genes your animal has, you need to pass the variables into your Imagick script. This can be done with $_GET. Edit your profile.php (or whenever you're displaying the image) to include the locus variable. <?php echo "<img src='img.php?alocus=$alocus'>"; ?> The $alocus variable will need to be assigned of course. I'm not going to go over scripts for genetics in this tutorial, just the Imagick parts, so I'm assuming you already have a method telling the locus what to be. In this case, it will ether be agouti, tan, or self. Step Two So back to the Imagick script, add the variable for the locus and then add some if statements to make that locus determine which layers get turned on. <?php $path = "./img/"; $alocus = $_GET["alocus"]; $img = new Imagick( $path . "/base.png" ); if ($alocus == 'agouti') { $imgagouti = new Imagick( $path . "agouti.png" ); $img->compositeImage($imgagouti, Imagick::COMPOSITE_DEFAULT, 0, 0); } if ($alocus == 'agouti' or $alocus == 'tan') { $imgotter = new Imagick( $path . "otter.png" ); $img->compositeImage($imgotter, Imagick::COMPOSITE_DEFAULT, 0, 0); } $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> Bam! Now we have a dynamic rabbit that can be either agouti, tan, or self depending on the A locus. If $alocus is self (or not specificied at all), neither marking layers will show, resulting in a self colored rabbit. If $alocus is tan, we'll get the otter layer added. And if $alocus is agout, we'll get a rabbit with both otter and agouti layers active, resulting in a true agouti color. ALBINISM - Color Change & Adding Another Locus What if we wanted to make an albino? In real life, albinism is like a white sheet masking the rabbit's true color underneathe, so I like to do the same thing with Imagick (it's easier than trying to turn every layer white). Albinism is controlled in the C locus for rabbits, so here's how to add another locus. Add it to the image display file like we did before. Separate it from the previous one with an & symbol. You can continue to add as many more variables as you want layer using & symbols like this. <?php echo "<img src='img.php?alocus=$alocus&clocus=$clocus'>"; ?> Now, add the new variable to the Imagick file. We're also going to add a new layer right under the eye layer, and above the highest possible marking. This is a copy of the base layer, but we're turning it white so it goes over all the furry parts. The white layer will be activated if the C locus is set to albino. We are also going to add a color change to the eye and pupil layers if C locus is albino, creating red eyes. <?php $path = "./img/"; $alocus = $_GET["alocus"]; $clocus = $_GET["clocus"]; $img = new Imagick( $path . "/base.png" ); if ($alocus == 'agouti') { $imgagouti = new Imagick( $path . "agouti.png" ); $img->compositeImage($imgagouti, Imagick::COMPOSITE_DEFAULT, 0, 0); } if ($alocus == 'agouti' or $alocus == 'tan') { $imgotter = new Imagick( $path . "otter.png" ); $img->compositeImage($imgotter, Imagick::COMPOSITE_DEFAULT, 0, 0); } if ($clocus == 'albino') { $imgalbino = new Imagick( $path . "base.png" ); $clut = new Imagick(); $clut->newImage(1, 1, new ImagickPixel('#FFF')); $imgalbino->clutImage($clut); $clut->destroy(); $img->compositeImage($imgalbino, Imagick::COMPOSITE_DEFAULT, 0, 0); } $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); if ($clocus == 'albino') { $imgeye->modulateImage(150, 100, 80); } $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); if ($clocus == 'albino') { $clut = new Imagick(); $clut->newImage(1, 1, new ImagickPixel('#811f32')); $imgpupil->clutImage($clut); $clut->destroy(); } $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_MULTIPLY, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> And now we have an albino rabbit. Recoloring Options This shows two different options for recoloring your image layers. 1. Change hex with clut like we did to turn the base layer white and the pupil pink. This forces the hex value over the entirety of the layer, as opposed to modulation which simply adjusts the color, so the whole layer will be one color (works fine if you don't want to retain multiple colors or shades in a single layer). 2. Modulation, as used on the eye layer to retain the shading we have inside the eye layer itself. We don't want these all turning into one color. Since we use modulation for the eyes though, we do need to make sure every bunny on the site has the same hex values used in the artwork files for the eyes (otherwise the modulator would cause inconsistent colors). You don't have to worry about inconsistent colors when forcing hexes using clut, so that's a tradeoff I've found. Here's a picture showing off the eye layer without the modulation (the way it is in the source file), and with modulation to turn it pink with albinism. There you have those. Those are some of the basics for adding markings and adjusting colors. You can see how variables are passed into Imagick from an outside script, and how to manipulate layers using those variables. This can be expanded into the rest of your script for a more fleshed out system (and you don't need to use it strictly for genotypes, you can also just make a variable for tiger stripes for example and have that in there instead). Note: I know the shading on the white rabbit is a little harsh here. It's just the file I'm using, sorry about that. I forgot to lower the opacity in the shading art file a bit for this tutorial.
  9. Hello everyone. Per request, this thread will contain tutorials on how to use ImageMagick (an image layering system) with PHP for your petsite or SIM. You can use this tutorial for pets, creatures, human avatars, etc. (it should all work with the same kind of system). I assume you know a bit of basic PHP, but you don't have to know a lot. INTRODUCTION I'm Hare, aka Lunar. I'm a coder, artist, and owner of www.warrenz.net. I'll be using Warrenz for demonstration because I use ImageMagick for the rabbits on there. I've also worked with GD library and CSS layering, but won't be going over those here. COPYRIGHT The images used in this tutorial and copyrighted and belong to me. Do not use them outside the Terms of Service of www.warrenz.net or without my expressed, written permission. Now let's get on with the basics! WHY USE IMAGEMAGICK There are good alternatives to Imagick. The benefits of ImageMagick is that it's powerful (which is why I like it), but GD Library is a fast alternative (from my experience, the processing time is less). There's also CSS layering, which may be good if you don't need anything fancy. I'm not going to go over methods of layering in this tutorial, just know that there are other options out there that may work better for your needs. INSTALLATION I'm not going to go over the installation process. This tutorial assumes that you already have Imagick (the PHP extension of ImageMagick) installed on your server. If you're not sure whether Imagick is installed, you can check your PHP info page where it should be listed. I'm also going to assume you're using version 3.4.3 or later. BASIC TUTORIAL - Getting Started With Imagick Layering I'm going to start out with the most barebones code you can use for those who have never used Imagick and want to know how to get started. We'll combine a base layer with some lineart. STEP 1 - CREATE YOUR FILES You'll need two files. One file is going to contain your Imagick code, name it img.php or whatever you want to name it. The other is going to be a page on the site that displays the image (can any page you want to display them on, such as pet profile or wherever). We'll call it profile.php. On profile.php where the image is displayed, this is all you need to get started: <?php echo "<img src='img.php'>"; ?> This will display the image created in the img.php as a <img src=''> code. Now let's get some code into the img.php file: <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> The first line of code declares your file path. We're going to put all our images for the layering system in the img file on the site. The next line of code is the first layer that starts the image off. The base layer. The next line is for the next layer that will go on top of the base layer. Lineart. I also include the shine of the eyes in the lineart layer, but you don't have to do it that way. The compositeImage function is used here. It puts the $imglines layer on TOP of the $img (which is the base layer), combining the two into a single image ($img). Then we simply declare the image headers and echo the resulting $img. Congratulations! You completed the first tutorial and now have a basic layered image. BASIC TUTORIAL #2 - All My Layers + Multiply Shading So you know how to display an Imagick image, but you're not sure how to add more layers. You're going to need markings, shading, etc. Let's do it! We're going to combine ALL these layers and make some nice shading! This may look like it's going to be a lot of work, but actually, we're just going to copy paste the lineart layer over and over again. Your new ImageMagick code (img.pgp) with all the new layers: <?php $path = "./img/"; $img = new Imagick( $path . "/base.png" ); $imgagouti = new Imagick( $path . "agouti.png" ); $img->compositeImage($imgagouti, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgotter = new Imagick( $path . "otter.png" ); $img->compositeImage($imgotter, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgdetails = new Imagick( $path . "details.png" ); $img->compositeImage($imgdetails, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgeye = new Imagick( $path . "eye.png" ); $img->compositeImage($imgeye, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgpupil = new Imagick( $path . "pupil.png" ); $img->compositeImage($imgpupil, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgshading = new Imagick( $path . "shading.png" ); $img->compositeImage($imgshading, Imagick::COMPOSITE_DEFAULT, 0, 0); $imglines = new Imagick( $path . "lines.png" ); $img->compositeImage($imglines, Imagick::COMPOSITE_DEFAULT, 0, 0); $imgwatermark = new Imagick( $path . "watermark.png" ); $img->compositeImage($imgwatermark, Imagick::COMPOSITE_DEFAULT, 0, 0); header('Content-type: image/png'); echo $img; ?> Look how we're adding one layer on top, one after another. Each one gets composited over the last, adding to the resulting $img. That's pretty much it. But wait: Why is this rabbit's shading blue? I use blue shading on Warrenz. However, we're going to switch the shading layer over to MULTIPLY. Where it says COMPOSITE_DEFAULT on the shading layer, change it to COMPOSITE_MULTIPLY. There, now we have a beautifully shaded rabbit! Multiply allows for very nice, vibrant colors. You don't have to use it, but I recommend it for more dynamic shading. That's it for now! I hope some of this is helpful and will add more later.
  10. Seeking Marketing/Manager Bunny Center, a rescue simulation browser game, is seeking marketing and basic management. This is a paid position. Contact me through private messages.
  11. Hare

    Fresh paint!

    This is looking very sharp =o
  12. What's new since June? Here are a few of the bigger updates we've made recently! BEW Czech Frosties - You can now get Czech Frosties in BEW, Vienna colors, Full Color, Full Extension, Steel, and Harlequin colors! Thriantas - You can now get Thriantas in Full Extension, non-Wideband, and Shaded colors! Continental Giants/Flemish Giants - You can now get these two breeds in Himalayan and Shaded colors! Lutino - The rare Lutino color has been added to many breeds including Mimic Lops, Rexes, Mini Rexes, Giant Angoras, Continental Giants, Flemish Giants, Dutch, Britannia Petites, and several others. Snowshoe Hares - These snowy hares now come in Himalayan and Candy colors! New plushes! - There's new art for three adorable plush lines! Mosaics - A new fancy chimeric color has been added that's unlike any other color, which is called Mosaic. It cannot be bred and is a random, rare mutation that causes the combining of two different genotypes in a unique pattern. Certain patches or spots will be one genotype, and other patches will be another (almost like having two different rabbits in one). There are two different types of Mosaics on Leporidae: one is the realistic type that can only combine realistic colors, and the other includes fantasy genes in the secondary genotype. Candy Corns - Many more breeds now come in the Candy Corn color including but not limited to Cinnamons, Checkered Giants, Coloradan Folds, Flemish Giants, Continental Giants, and Czech Frosties. CODs passed - The following breeds/colors passed their player-run certificate of development process, so they can now be entered in official GSRA shows: - Smoke Pearl Holland Lops - Chocolate Agouti Velveteen Lops - Blue Tan Belgian Hare - Blue Eyed White Velveteen Lops - Chinchilla New Zealands - Seal Satins - Sable Satins - Broken Lionheads Smaller updates: - Players with the quick dispatch feature can now send away alien creatures in bulk as well (since those species' cannot be dispatched). - The quiz feature has been updated (mainly to fix bugs). - Rabbit limit increases. - A new 'hay all' options for barns. - Faster loading rabbit and building images.
  13. Hare

    Warrenz.net

    Updates since August 1st. We're still moving right along, and in this first year, have made lots of progress between August and October. Here's some of the bigger updates since the last post on this thread. New Palms - A lot of poses now come in the Palms color. New Jays - Many poses also now come in Jay. Skunks! - We now have skunk-colored rabbits. Referal System - A referal system has been added and can give you tons of rewards in the form of giftboxes! Open them up and see what kind of rare items you get. Navigation Updates - The Explore page has been made simpler and easier to navigate, and we added a Plaza for easy access to additional features. Quizzes! - We now have some fun quizzes you can do, if you're so inclined! There's three categories: general rabbit trivia, Warrenz-related questions, and rabbit genetics questions. Each has 3 different difficulty ranks. Player Leaderboards - For those who like competition, there's a new set of player leaderboards. No prizes, this is only for the honors. New Predator - There's a new predator on Warrenz, but this creature is unlike any other. It's a predatory rabbit you can add to your warren—if you can defeat one in battle. They will be around durring September (each year). Smaller updates include: - Faster loading images - Increased space for rabbits - A locking system - Many more little things!
  14. This issue has been fixed. =D
  15. Question for anyone with feedback on the topic of user submitted artwork. How do you handle user submitted art content? Don't have to answer all these, I'm just throwing some questions out there to get the thinking juices flowing! 1. How do you prevent or deal with art theft or copyright infringement, such as players uploading an obscure anime character, OC, or logo and then staff not noticing until it's been on the site? 2. What's the ideal interface for the process? What's the best way (you think) a site could go about allowing user submitted art? What kind of templates, information, or file submission system would you want in a feature like this? 3. What rules/copyright terms are important to include in this? Copyright stuff for the images themselves, plus game rules for how the players can expect to use the art (preventing community issues that could be caused by the feature). 4. What are the best practical application? Players being able to upload a full pet image, or just markings? Any markings, or specific markings? Items? Any other ideas that stand out to you? And how are they used? 5. Exclussitivity. What uploaded stuff (if any) should be exclussive to the player, or be available to all players? 6. What kind of rewards/payment are good for this? 7. If a site has breeding, would you allow it with the user content or not? If yes, how? 8. Is it better to A) have a syustem that pays players (similar to staff) to create more content that matches the site, or B ) a system where players pay to have their own personalized uploads. Or both?
  16. The cellshading with ultra smooth lines is a definite selling point for a lot of pet games. If you're going for a more specialized audiance like in SIMs that have realistic animal genetics, your game might attract the kinds of people who want realistic art styles.
  17. Hare

    Warrenz.net

    More updates! Skvaders A new creature has descended from the heavens and can be found during the month of August (though you can also get them year-round). Sort notifications by category. This allows you to easily delete any notifications of a certain type that you don't want to see, or locate something you're looking for. It also works with the money earned and spent feature that tracks all of your in-game income. English spotting can now be found either with realistic expression or as a fantasy marking that combines with other colors. New pose! This scratchy-eared bunny is a new addition to the more realistic poses. Mushrooms are a new item type that can enhance litters when breeding. Each mushroom has its own unique effect such as increasing the litter by 1 kit, 2 kits, 3 kits, making a whole litter male or female, forcing the pose of a specific parent, allowing skills to be inherited, increased aptitude stats in offspring, increased chances of chimerism or other rarities, inherited personality, copied hidden moidfiers or genotype, and more. More updates: - You can now expand your den size. - Profiles now have a custom section that you can edit with your own text. - A new set of badges for sending rabbits to the Seekers. - Cores, new items that can cause rare expressions of a color. - Rabbit treasures. Your rabbits can now hold items for aesthetic purposes. - Night mode layout for those who like a darker theme.
  18. @Celosia thanks for the add. Yeah, I do art too.
  19. Hello all and glad to hear I'm not alone. I don't strictly work alone, granted, and have had a great time working with others off and on, but sometimes am alone in my projects and would love to have more people in the same boat to talk to sometimes. My discord is Lunar Eclipse#6855 if anyone has that and would like to add me there. Shoot me a line if you ever feel like talking about features, dev stuff, code, art, etc.
  20. Here's some more updates for Leporidae! Summer Fair - The Summer Fair is a new type of show that's open from June to September! The winning rabbits are sold for a decent price and you can win some nifty fair exclussive items. Summer Skirts - These new Skirts can be purchased with points earned from the Summer Fair shows! Californian colored Harlequins - You can now get the Harlequin breed in this gene! Pet Shows - The pet shows have received a nice update. The winner gets a much bigger jackpot and is now announced in the news! It runs every other week. Golden Time Capsule - This new credit item will turn all of your kits into adults! It's an insta-age up device for your whole rabbitry so you don't have to wait for them to age. Himalayan Rhinelanders - Similar to Harlequins, Rhinelanders now come in this gene! Summertime Plushies - There's a couple of cute new plushies you can get at the Summer Fair! Leaderboards - Rabbit leaderboards now include traits! Most Leveled and Missions Completed have also been added to the player leaderboards. Both leaderboards have been given a layout makeover to make them easier to read, better-looking, and they now list more results. Additional updates... - Shows (GSRA and Everything) now give monetary rewards to all placements, so showing is now a good way to make some money even with smaller wins. - Several CODs have passed, making the following new color/breeds officially recognized by the GSRA: for Black Gold Tipped Steel New Zealands, Red Eyed White Continental Giants, Chinchilla Giant Angoras, Chestnut Giant Angoras, Dutch New Zealands. - A referral system was added. You can now get GD (Good Deed) points for referring someone who purchases credits! GD Points can be exchanged for special and rare items. - Blowers now have a much lower chance of breaking, and various bugs have been fixed. We've also re-added the 'Reserve Stud' feature.
  21. Hare

    Warrenz.net

    Thank you, Digital. Warrenz has been getting tons of updates! Here's some updates since my last post: New layout by CarrotCube! The site is looking flashier than ever, and is easier to navigate. The first mythical creature. You can get these during the June event! Palm tree bunnies. These are also for the June event. Shop searching! This is a basic feature to go along with the player shops. NPC shops and restocking. This is a basic feature that allows you to snag items. Sometimes they have sales. Crystal Cave previewer. Allows you to preview your rabbits with various color alterating/transforming items applied. DIchromatic eyes. These are a rare mutation. New Spirit variations. The spirit markings now come in more variations than before. New pose. This fluffbutt was added as a standard pose. Preview Specs. These are a credit item that allows you to view the rabbits in explore before clicking.
  22. Hare

    Warrenz.net

    April Updates - All rabbit artwork has received a bit of an upgrade (an extra layer of shading). - Chimerism has been added. One side of a rabbit with chimerism will have completely different genetics from the other side (any combination is possible). - Rabbits can now be sorted into separate tunnels within their warrens. - Various bug fixes and minor improvements. - The very first holiday event is currently underway for the month of April! There's a special April exclussive area where you can collect eggs that may contain valuable items.
  23. Are you getting any error messages? What happens when you try to sign up? Feel free to email us at admin@leporidae.org Here are some updates since the last post! Realtime Chat You can now join the Discord chat at any time through the site! Tortoise, Sallander, Magpie, and Japanese Mimic Lops Himalayan-colored Czech Frosties Tort Polish Californian Blanc de Hotots Pointed White Dwarf Hotots Pointed White Belgian Hares Californian Lilacs Californian Checkered Giants Californian-colored American Chinchillas Martenized Sallander Czech Frosties Dutch Lionheads Customs You can now upload your very own custom rabbits! These are categorized as a fantasy color, so they cannot be shown with the official GSRA. However, they CAN be shown in Everything Shows and, best of all, they can be bred and inherited! Other New Features: Leporidae Art - Get paid to add more colors to Leporidae rabbit breeds! Kits Event - You will now get an event notification when your kits are on their last day before age-out. Egg Incubation - We're getting ready for the big Easter blast this April! To kick things off, you can now incubate your eggs to improve the stat total of potential hatchlings. CODs passed: Black Giant Angora and Magpie Satin Angora have passed the COD process and are now showable through GSRA!
  24. Hare

    Warrenz.net

    Glad to here you're loking what you see so far! Here are a few more recent updates. Gradient Colors These can now be found in some rare instances of colorful rabbits. Realtime Chat Warrenz now has an active Discord chat that can be accessed any time on the site. Wild Color This new color bridges the gap between realism and fantasy, providing a lot of fun and creative variation to all rabbit poses! Eye Colors (and many other colors) Any color is possible now including eye colors (even heterochromia in rare cases). Combine colors with wild to see some wild-looking variations! Spirit Markings Near a special area called the Spirit tree, you can find rabbits with unique glowing markings. You can also give these markings to any rabbit by fighting the spirit predators in the area (can be removed later if needed). Other New Features: Character Contest - This now runs once a week with huge payouts for category winners. The top winner is featured in the news each week. Random Daily Bonus - Once you reach a certain level, you can get a daily rabbit bonus and daily account bonus, being rewarded with stats, exp, and pts. Overcrowded Burrows - This is an extension of the Forsaken Burrows (where unwanted rabbits are sent) that has much lower prices. Seekers - A place where other warrens may request specific types of rsabbits. Fill their requests to earn pts. Auction Hollows - Where you can auction off your rabbits or place bids on others. Snowflakes - Items that can change the hidden values that control your rabbits' color and pattern (separate from genes and alleles).
  25. Edit: No longer needed! Seeking programmer who can add a simple realtime chat to leporidae.org. We have a mysql database and node.js is installed on the server. I'd also want to have permission to use the chat code for my other projects.
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Terms of Use, and Privacy Policy.