Image Generator help

Talk about game designs and what goes behind designing games.
Post Reply
jwoolman0
Posts: 10
Joined: Sun Feb 03, 2013 2:51 am

Image Generator help

Post by jwoolman0 »

Hope this is the right thread for this scatter-brained mess of words. EDIT: (This is a question/help post...so if it would receive more feedback or just belongs in the advanced help section that's fine too.)

I've been fiddling with several game concepts for some time now...creating them one after the other..different elements of gameplay etc and scrapping them because I want something more. I'm sure most of you who have been creating or have created a text-based or even just played one and find yourself wanting something more..
Well I'm not interested in spending large amounts of time developing all the components of a 3d game (and ofc more time learning how to do so) but I do want more from my creations. Perhaps visual stimulation would add a little more flavor.

Scrolling through this page ( http://facepunch.com/showthread.php?t=1194115 ) <---a massive list of text based games. (I took the time to play some of them...)
I found ( http://equine-ranch.com/ )

This game intrigued me (not because it's about horses) but because of "the extra" bit of flavor it has in it.
Every horse in game has it's own uniqueness which is shown through it's generated image and it's genetics...

I'm very interested in how the images are generated etc in this game. Every picture is based off the same outline. How is the color added?
I'm not experienced enough in game design to know how images are randomly generated.
I'm guessing the horse pictures are created with layers and codes change the layers based on ancestry/genetics/randomness...?

This would be very helpful with a lot of the ideas I have in mind..(like random flag generation etc and for my "Jurassic Park" game..)
If someone could inform me of what I should be googling etc I would appreciate it.
Also wondering how to get that many color patterns etc..
Quote from main page "3,370 possible color and pattern combinations with thousands of shades possible and multiple variations of patterns.
A sophisticated dynamic image generation system. Each horse is born looking very unique."

TLDR: In short I'm lost...What do I need to do/read to code a similar image generator. Any information would be greatly appreciated. (Any guides/links appreciated as well)
To understand what I'm talking about simply visit Equine Ranch using the link I provided...refresh the page and the horse image will change.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Image Generator help

Post by a_bertrand »

All depends how you want to do it:
You could start with vector (2d or 3D) images, and then simply morph the base parts, mix them and of course change the colors of some fill areas.
You could start with bitmap images, and blend them, mix them to produce the image you want.

As an example of something similar I did some time ago:
http://www.nebularider.com/helmet_demo/

It has quiet a few base images, in 3 colors and then mix all those.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Renavoid
Posts: 60
Joined: Sat Feb 23, 2013 7:48 pm

Re: Image Generator help

Post by Renavoid »

One game that I've seen which does something similar does the color selection entirely from hex which is overlayed on swapped image bases to create the final product. I haven't seen the server code to know exactly how the image is rendered, but I can tell it's a combination of color overlays and base part swapping, as a_bertrand suggests.

http://www.sylestia.com
The winds of change are blowing; will you heed their call?
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Image Generator help

Post by Chris »

Before you get started all you need to know is what an image really is. It's a big list of colours. No more no less. Depending on the compression or format of course, but in the end it is always rendered back into an array of pixels when it is to be projected on the screen.

You can use technologies like SVG which helps the computer mathmatically generate images by calculating lines curves and colours and shit. But in the end the screen is only made up of a load of little pixels.

If you want to do it server side they have PHP GD and a load of other cool stuff you can use.
Fighting for peace is declaring war on war. If you want peace be peaceful.
jwoolman0
Posts: 10
Joined: Sun Feb 03, 2013 2:51 am

Re: Image Generator help

Post by jwoolman0 »

Awesome links. Both were exactly what I'm talking about...
I basically want to use a background image and overlap sections (or replace) with different colors. The sylestia game is basically what I'm going for but the helmet link illustrates the color overlapping as well. To elaborate more If I'm using php I'd like to use a function or if statement etc to alter the coloring in the picture. So IF red dog...picture of dog is red...else dog is blue..Obviously much more in depth (like Sylestia) but I think you all get the idea...

Honestly I don't think it's all that complex to do...but I'm at that point where you don't know what your doing and you don't know what it is you need to know lol.
Currently I'm only working with PHP but if it requires javascript etc that's not a problem.

I also like that in Sylestia it takes it a step further and adds to the image (for example...dragon with no wings...evolves into dragon with wings...Assuming that's how the game works).
jwoolman0
Posts: 10
Joined: Sun Feb 03, 2013 2:51 am

Re: Image Generator help

Post by jwoolman0 »

Any helpful information that you guys know about would be appreciated. Regarding really anything to do with adding an image to a page...
As far as I currently understand I need to learn how to use hex strings...and get a basic understanding of what exactly images are and how images are rendered.
The link below was rather helpful for some basic concepts...
http://blog.art21.org/2011/09/13/how-to ... -stencils/

I still don't quite understand how these game designers are creating an entirely unique image (with the exception of the background).
Just over my head atm. ;)
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Image Generator help

Post by a_bertrand »

To do it via PHP you must use GD:
http://php.net/manual/en/book.image.php

Have a look at the functions there and tell us if you need more info.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Image Generator help

Post by Jackolantern »

Oroton wrote:id be more interested in learning how something like 'living avatar' saves their images..
http://www.livingavatars.com
Probably just absolutely-positioned divs over an image. That is what I would guess from the way their editor interface looks on their website.
The indelible lord of tl;dr
Post Reply

Return to “Game Design”