New sprite conversion tool: Tilificator
Moderator: Moderators
New sprite conversion tool: Tilificator
Tilificator has now reached a state where it might actually be useful for other people.
Tilificator is a sprite conversion tool I wrote to try to solve an annoying problem I've always had with sprite graphics for the NES: How to create CHR and sprite data that re-uses CHR patterns and tries to minimize the sprites per scanline, without lots of repetitive effort.
To do this for you, it uses some clever heuristics, and a lot of brute-force, trading artist time for computer time. It's a work in progress, and will still produce bad results for some seemingly obvious cases. But it'll probably do the job better for big amounts of sprite data unless you're dedicated to hand-optimizing your sprites. :)
Have a try with it, and give me your feedback!
Tilificator is a sprite conversion tool I wrote to try to solve an annoying problem I've always had with sprite graphics for the NES: How to create CHR and sprite data that re-uses CHR patterns and tries to minimize the sprites per scanline, without lots of repetitive effort.
To do this for you, it uses some clever heuristics, and a lot of brute-force, trading artist time for computer time. It's a work in progress, and will still produce bad results for some seemingly obvious cases. But it'll probably do the job better for big amounts of sprite data unless you're dedicated to hand-optimizing your sprites. :)
Have a try with it, and give me your feedback!
A long time ago, back in the first quarter of 2007, I had written a similar tool that only worked across, turning large (fighting-game-sized) characters into rows of 8x16 pixel sprites.
Andrew Davie wrote a similar tool called Objective
Andrew Davie wrote a similar tool called Objective
Seems pretty nice, gotta try it some time. I wrote something similar myself, it handles layered sprites but it's much slower and doesn't do "global optimization" of the resulting tiles.
On a side note, not sure if you're aware of this, but the .zip contains the .svn directory.
On a side note, not sure if you're aware of this, but the .zip contains the .svn directory.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Well, lack of what I would also call "global optimization" is the current limitation of Tilificator as well. While the 'TilingMethodDragQueen' is the most capable (albeit slowest) of the methods to choose from, each of the methods suffer from the limitation that they will process each image separately, and try to match it to the tile table already built. To get better results for the cases where the optimal tilification for one image actually gives a crappy match for a later one, there'd probably be a need for a pre-pass that looks for similarities in all images at once.Seems pretty nice, gotta try it some time. I wrote something similar myself, it handles layered sprites but it's much slower and doesn't do "global optimization" of the resulting tiles.
I have some ideas for how this could work, but no idea when I'd get the motivation to do so, considering how much time this "side-project" of mine has already eaten up :)
Indeed I am aware of this. I figured there'd be no point in removing it, since it means you can update your version from the trunk just by using tortoiseSVN. The release .zip was just there to provide some convenience for those that don't want to mess with versioning systems just to try it out.On a side note, not sure if you're aware of this, but the .zip contains the .svn directory.
Heh, it would be much much easier to help you out if you could tell me what that "some error" actually was... ;)Hey this looks pretty cool but unfortunately I have a problem running it.
I compiled/installed it successfully but when I try to run from the terminal I get some error.
That's what I wanted to do but this stupid terminal doesn't allow to copy/paste what is written in it and I can't dump it as text either !
Looks like I'll have to copy the error message by hand
It says :
Looks like I'll have to copy the error message by hand
It says :
Code: Select all
Taceback (most recent call last):
File "C:\[...]\tilificatorgui.py", line 23 in (module)
import gtk, gobject, cairo, pango
File "C:\python27\[...]\gtk\__init__.py", line 40, in (module)
from gtk import _gtk
ImportError : DLL load failed: La procédure spécifiée est introvable.
Useless, lumbering half-wits don't scare us.
Hmm, that shows that PyGTK (the python interface to GTK+) is being found, but that one cannot find the .DLL files of GTK+. According to Google, this is usually caused by having installed multiple versions of GTK+, missing the GTK+ directory on the %PATH% system variable (which the all-in-one installer should have done for you), and other tricky issues.Taceback (most recent call last):
File "C:\[...]\tilificatorgui.py", line 23 in (module)
import gtk, gobject, cairo, pango
File "C:\python27\[...]\gtk\__init__.py", line 40, in (module)
from gtk import _gtk
ImportError : DLL load failed: La procédure spécifiée est introvable.
Could you maybe give me some more info such as: exactly how you installed it, what your %PATH% variable is, what Windows version you're running, phase of the moon, etc?
I installed it by using the 3 installers in the page you linked in your first post, and by following the instructions to run the install scripts from the terminal.
My %path% variable is.... long (agan I can't copy it form the terminal) but I don't find any python related path I think.
I use Windows 7 professional.
The moon was full 2 or 3 nights ago I think.
My %path% variable is.... long (agan I can't copy it form the terminal) but I don't find any python related path I think.
I use Windows 7 professional.
The moon was full 2 or 3 nights ago I think.
Useless, lumbering half-wits don't scare us.
Thanks for this! Sometimes the right-click menu doesn't work on cmd.exe windows, I didn't know you could access the menu from the application menu/title bar as well.tepples wrote:Try Alt+Space E K, drag a box around what you want to copy, and press Enter. Then paste into Notepad. Does that still work in Windows 7?
I remember having the same problem with GTK some other time, not with Python though. Pretty sure it was caused by non-compatible version of GTK (libgtk*.dll) in Windows' System32/SysWOW64 directory.Bananmos wrote:Hmm, that shows that PyGTK (the python interface to GTK+) is being found, but that one cannot find the .DLL files of GTK+. According to Google, this is usually caused by having installed multiple versions of GTK+, missing the GTK+ directory on the %PATH% system variable (which the all-in-one installer should have done for you), and other tricky issues.Taceback (most recent call last):
File "C:\[...]\tilificatorgui.py", line 23 in (module)
import gtk, gobject, cairo, pango
File "C:\python27\[...]\gtk\__init__.py", line 40, in (module)
from gtk import _gtk
ImportError : DLL load failed: La procédure spécifiée est introvable.
Could you maybe give me some more info such as: exactly how you installed it, what your %PATH% variable is, what Windows version you're running, phase of the moon, etc?
Yes, that could indeed be the case... I'd suggest doing a global search for libgtk*.dll across the file system and removing those, or at least renaming them temporarily.I remember having the same problem with GTK some other time, not with Python though. Pretty sure it was caused by non-compatible version of GTK (libgtk*.dll) in Windows' System32/SysWOW64 directory.
Unless you changed this at installation, the proper .dll's should be in c:\gtk\bin, so also double check that your %PATH% environment includes this path.
The repertory c:\gtk doesn't even exist.
I have a load of libgtk-win32-2.0-0.dll files all over the place in my system though, namely in :
c:\program files\pigdin\gtk
c:\program files\common files\gtk\2.0
c:\python27\lib\site-packages\gtk2.0\runtime
I also have 2 times libgtkspell.dll in
c:\program files
c:\program files\pigdin
PS : I'm pretty sure none of those paths are in %path%
I have a load of libgtk-win32-2.0-0.dll files all over the place in my system though, namely in :
c:\program files\pigdin\gtk
c:\program files\common files\gtk\2.0
c:\python27\lib\site-packages\gtk2.0\runtime
I also have 2 times libgtkspell.dll in
c:\program files
c:\program files\pigdin
PS : I'm pretty sure none of those paths are in %path%
Useless, lumbering half-wits don't scare us.
Pardon me for leading you on the wrong path (no pun intended) in this case. I realize now that my c:\gtk\bin directory is from some old installation and is not used by PyGTK.The repertory c:\gtk doesn't even exist.
My installation of PyGTK uses the .dll files under 'C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin'. (did you just forget the '\bin' ending part in your post above?) I was also able to reproduce an error similar to yours by renaming the 'bin' directory to the dummy name 'binn':
Code: Select all
Traceback (most recent call last):
File "E:\rnb\tilificator\trunk\tilificatorgui.py", line 23, in <module>
import gtk, gobject, cairo, pango
File "C:\Python27\lib\site-packages\gtk-2.0\gtk\__init__.py", line 30, in <module>
import gobject as _gobject
File "C:\Python27\lib\site-packages\gtk-2.0\gobject\__init__.py", line 26, in <module>
from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
File "C:\Python27\lib\site-packages\gtk-2.0\glib\__init__.py", line 22, in <module>
from glib._glib import *
ImportError: DLL load failed: The specified module could not be found
Code: Select all
set PATH=C:\Python27\Lib\site-packages\gtk-2.0\runtime\binn;%PATH%
However, it's possible you must also make sure Windows cannot find any other conflicting .dlls, as specific directories (such as system,system32 etc) have priority over the ones in %PATH% in later Windows versions, IIRC...