Open World Soccer Forum Index Open World Soccer
Community Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OpenCharset

 
Post new topic   Reply to topic    Open World Soccer Forum Index -> English
View previous topic :: View next topic  
Author Message
stage7



Joined: 16 Nov 2007
Posts: 25
Location: Albacete (Spain)

PostPosted: Fri May 20, 2011 4:35 pm    Post subject: OpenCharset Reply with quote

What if making charsets for OWS was as easy as drawing a template instead of having to make each sprite one by one? What if every sprite had not only a standardized design but also looked awesome? Yeah, I wanted that too, and was fed up of drawing the whole thing again and again.

That's why I've started developing OpenCharset. Just draw your kit, input it to the script and download the resulting image with the complete sprite sheet.

It sounds neat, but it's going to take its sweet time, because I have to map each pixel and the source code I'm posting below shows the simplest way I could think of. Of course, it would not be "OpenCharset" if it wasn't open source. Here's the code as of May 20, 2011:

UPDATE: Please check the repo for the full codes and changelog.

This code also runs on my hosting via http://stg7.net/ows/ows.php (remember to add "?pic=kit.png" for it to work). Here are a few images you can use to test it (ows.php?pic=acmilan.png or ows.php?pic=clubamerica.png), but you can try your own as well using a complete URL:



It couldn't be easier and the templates speak for themselves. But this is only the first step, and there's still a lot of sprites to map. What if we try to complete this project? It will save HOURS of work for avid kitmakers!

Come on, guys! Let's make together the greatest soccer game of them all!
_________________
OpenCharset: a project to develop an easy way to create custom sprite sheets


Last edited by stage7 on Sun Jun 03, 2012 2:19 am; edited 2 times in total
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Sat May 21, 2011 10:13 am    Post subject: Re: OpenCharset v. 0.1 Reply with quote

Your idea is wonderful! Very Happy
How did you choose the size of the template? I wonder if some standard exists, so people could reuse the templates they made for other games...
Back to top
View user's profile Send private message
stage7



Joined: 16 Nov 2007
Posts: 25
Location: Albacete (Spain)

PostPosted: Sat May 21, 2011 5:30 pm    Post subject: Reply with quote

Thank you Wink

Well, I don't think a standard exists because I chose the dimensions based more or less on the number of pixels the standing front view sprite has. It is clear that the socks are 4x2 and the shorts are 10x4. I had doubts about the sleeves and shirt dimensions, but it seemed sensible (pun intended) that the shirt was 10 pixels wide and 6 or 7 high, and eventually chose 7. For the sleeves I chose 5 + 1 for the cuffs, which is more than enough for the running sprites, although some of them are 6 + 1. Then, for the back pictures, just mirroring the measures can work. Multiply everything by 8 and the script will resample everything accordingly Very Happy

Cuff + sleeve + shirt + sleeve + cuff = (1 + 5 + 10 + 5 + 1) * 8 = 22 * 8 = 176 pixels wide.
Socks + shorts + shirt + shirt + shorts + socks = (2 + 4 + 6 + 6 + 4 + 2) * 8 = 24 * 8 = 192 pixels high.

Version 0.1.1 published, it adds another sprite, fixes sprite (1,2) and adds the full shading mask. Download in http://stg7.net/ows/repository/ .
_________________
OpenCharset: a project to develop an easy way to create custom sprite sheets
Back to top
View user's profile Send private message
stage7



Joined: 16 Nov 2007
Posts: 25
Location: Albacete (Spain)

PostPosted: Sat Apr 07, 2012 6:51 pm    Post subject: Reply with quote

Good news, I've retaken this project and made myself a few scripts that will dramatically speed up the sprite mapping (at the cost of not having the coordinates in a kit-fashioned shape, but a very single line stream of numbers). Also implemented proper mask shading with alpha channel.

I will actively work on this again these days Smile URL remains the same, version is 0.2.2. Try the new kits I've uploaded or use your own.
_________________
OpenCharset: a project to develop an easy way to create custom sprite sheets
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Sat May 19, 2012 7:24 pm    Post subject: Reply with quote

stage7 wrote:
Good news, I've retaken this project and made myself a few scripts that will dramatically speed up the sprite mapping (at the cost of not having the coordinates in a kit-fashioned shape, but a very single line stream of numbers). Also implemented proper mask shading with alpha channel.

I will actively work on this again these days Smile URL remains the same, version is 0.2.2. Try the new kits I've uploaded or use your own.


Hi stage7,
sorry for late reply. This is the reason:
http://openworldsoccer.sourceforge.net/forum/viewtopic.php?p=479

First of all thank you for the update. I've tested the files generated with your script and unfortunately I've found a problem: these images don't have a palette.

The game search for the palette inside the image and then replaces the colors.
This is done in order to change the colors on the fly and generate different colors of skin.

Changing the colors of non-paletted images would require a relatively slow "pixel by pixel" search and replacement.
Back to top
View user's profile Send private message
stage7



Joined: 16 Nov 2007
Posts: 25
Location: Albacete (Spain)

PostPosted: Sun Jun 03, 2012 2:16 am    Post subject: Reply with quote

Hi Massimo,

Nicely spotted bug. So, if I've understood you, if the charsets generated would have a palette then there would be no problem using them in the game, including alpha channel etc. OK, I will take care of that, it shouldn't be hard to fix as LibGD can also generate images with palette on the fly. Is there a specific palette I should use, or using my very own will suffice, as long as I use certain colors and certain indexes?

As OWS has been on hold for a time now and the development has returned to YS, should I change the program name and put my efforts on making OpenCharset YS-compatible instead of OWS-compatible? (The charsets are identical to me, but just in case)

Regards.

Massimo32 wrote:
stage7 wrote:
Good news, I've retaken this project and made myself a few scripts that will dramatically speed up the sprite mapping (at the cost of not having the coordinates in a kit-fashioned shape, but a very single line stream of numbers). Also implemented proper mask shading with alpha channel.

I will actively work on this again these days Smile URL remains the same, version is 0.2.2. Try the new kits I've uploaded or use your own.


Hi stage7,
sorry for late reply. This is the reason:
http://openworldsoccer.sourceforge.net/forum/viewtopic.php?p=479

First of all thank you for the update. I've tested the files generated with your script and unfortunately I've found a problem: these images don't have a palette.

The game search for the palette inside the image and then replaces the colors.
This is done in order to change the colors on the fly and generate different colors of skin.

Changing the colors of non-paletted images would require a relatively slow "pixel by pixel" search and replacement.

_________________
OpenCharset: a project to develop an easy way to create custom sprite sheets
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Sun Jun 03, 2012 9:44 am    Post subject: Reply with quote

stage7 wrote:
Hi Massimo,

Nicely spotted bug. So, if I've understood you, if the charsets generated would have a palette then there would be no problem using them in the game, including alpha channel etc. OK, I will take care of that, it shouldn't be hard to fix as LibGD can also generate images with palette on the fly. Is there a specific palette I should use, or using my very own will suffice, as long as I use certain colors and certain indexes?


It should work as long as the skin colors have the same values as those in the standard kits (indexes should not matter).

stage7 wrote:

As OWS has been on hold for a time now and the development has returned to YS, should I change the program name and put my efforts on making OpenCharset YS-compatible instead of OWS-compatible? (The charsets are identical to me, but just in case)


This makes sense because OWS development will not resume soon, and Yoda will continue using these kits.
On the contrary, OWS may adopt a very different graphics in the (far) future.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open World Soccer Forum Index -> English All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Get Open World Soccer at SourceForge.net. Fast, secure and Free Open Source software downloads