gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > I'm working on some tile tools. Suggestions?

#23128 - tepples - Mon Jul 05, 2004 5:11 am

I'm working on some tile and palette conversion and editing tools designed for multiple target platforms, designed for use in my programming tutorials. Currently, I have plans to support at least the following tile formats:
  • 1bpp (often used for fonts)
  • nes (1bpp+1bpp)
  • gb (2bpp interleaved)
  • vb (2bpp packed)
  • ngpc (2bpp packed in a different order)
  • snes3 (gb+1bpp)
  • nhl (3bpp packed)
  • snes (gb+gb)
  • sms (4bpp interleaved)
  • genesis (4bpp packed)
  • gba (4bpp packed in a different order)
  • snes8 (gb+gb+gb+gb, used for some snes title screens)
  • 8bpp (planar, used for mode 7)
Are there any other tile formats you'd like to see?

And what about palette formats other than 5-bit BGR little, used on Super NES and GBA?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23131 - mymateo - Mon Jul 05, 2004 6:19 am

Maybe support for higher bit modes, perhaps to support the DS's fancy new hardware? I imagine that the 2D hardware, though not the main focus, will still be more impressive than any 2D we've seen on yesterday's consoles or today's handhelds. Maybe 16 and 32 bit modes, or if you're ambitious enough, have plugins to support custom bit depths, tile sizes/attributes, etc. so that you can always add to it in the future? Maybe even support writing to common PC formats such as BMP, PCX, RAW, GIF or even JPG? (Though those last two seem unlikely to be of any use)

Anyway, that's my two cents worth. The bill is in the mail. :)

#23139 - keldon - Mon Jul 05, 2004 1:34 pm

yes, I would agree to allow custom bit depths aswell

Also when reading 4 colour bitmaps conversion tools usually look at the palette in the order it appears, rather than illuminosity; giving you odd graphics.

And also an export to a *new* *standard* for tiles and maps; I'll help you define the standard if you want, but I think we do need one. Then when someone wants to make their new map editor they can choose the standard for their format :D

#23145 - tepples - Mon Jul 05, 2004 8:17 pm

keldon wrote:
Also when reading 4 colour bitmaps conversion tools usually look at the palette in the order it appears

So does mine. It ANDs each color index with e.g. 0x03 in GB mode or 0x0F in GBA 4bpp mode, assuming the artist knew what he was doing (artists who have completed my tutorial will know).

Quote:
And also an export to a *new* *standard* for tiles and maps; I'll help you define the standard if you want

Good idea. Can we take this to PM or to e-mail?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23153 - SmileyDude - Tue Jul 06, 2004 2:15 am

tepples wrote:
I'm working on some tile and palette conversion and editing tools designed for multiple target platforms, designed for use in my programming tutorials.


Does this mean that you are writing in Java? Or in C/C++ with some cross-platform toolkit?

Either way, I'd be willing to assist where/when I can -- I have a Fedora Linux box at home, and a MacOS X box at work :)
_________________
dennis

#23160 - tepples - Tue Jul 06, 2004 3:29 am

SmileyDude wrote:
tepples wrote:
I'm working on some tile and palette conversion and editing tools designed for multiple target platforms, designed for use in my programming tutorials.

Does this mean that you are writing in Java? Or in C/C++ with some cross-platform toolkit?

By "multiple target platforms" I meant that the tool can be used to manipulate graphics to be displayed on several different consoles. Use of C with the cross-platform Allegro toolkit means that the target can also run on multiple host platforms. Compare use of "host" and "target" terms in cross-compilers; for instance, DevKit Advance is MinGW hosted and GBA targeted.

Owners of machines running native GCC on a platform other than Windows can help by doing the following:
  1. downloading Allegro 4.0.3 here, and
  2. downloading Pin Eight NES Tools and trying to build the tools from source on Mac OS X and Linux host platforms.

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23167 - SmileyDude - Tue Jul 06, 2004 6:32 am

tepples wrote:
By "multiple target platforms" I meant that the tool can be used to manipulate graphics to be displayed on several different consoles.


I'm really having a grand time interpreting your posts tonight :) I had really worked my hopes up that there was going to be a good cross-platform host tool. Oh well, maybe one day I'll be motivated enough to sit down and write my own :)
_________________
dennis

#23168 - SmileyDude - Tue Jul 06, 2004 6:34 am

i think i managed to do it twice in one thread -- looks like I'll be downloading and testing it for you later when i get the chance. I hadn't realized that Allegro was cross-platform. I must really need sleep.
_________________
dennis

#23174 - SmileyDude - Tue Jul 06, 2004 4:07 pm

ok -- builds fine on my Fedora Core 2 box at home. No problems at all. Runs fine too.

On my MacOS X box, I can't get allegro installed (tried looking for a binary install, couldn't find it, tried installing from source -- failed). I'll have another pass at it later.

Looking good so far :)
_________________
dennis

#23176 - tepples - Tue Jul 06, 2004 5:31 pm

SmileyDude wrote:
On my MacOS X box, I can't get allegro installed (tried looking for a binary install, couldn't find it, tried installing from source -- failed).

What step of these instructions did you fail on? And what were the last few error messages?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23199 - SmileyDude - Wed Jul 07, 2004 6:29 am

tepples wrote:
SmileyDude wrote:
On my MacOS X box, I can't get allegro installed (tried looking for a binary install, couldn't find it, tried installing from source -- failed).

What step of these instructions did you fail on? And what were the last few error messages?


Just did an install of Allegro 4.1.14 (seems to have better OS X support than 4.0 does), and everything compiled fine. But, when I tried to load a .gba file, it completely hung. When I hit ctrl-c at the command line, it spit out "Bus Error".

I ran it in gdb as well, and when it hung, here is where it was:

Code:
(gdb) where
#0  0x90016f48 in semaphore_wait_signal_trap ()
#1  0x900021e0 in pthread_mutex_lock ()
#2  0x300a0b9c in osx_qz_window_set_palette ()
#3  0x000038e0 in update_paled () at ted.c:817
#4  0x000049d0 in _mangled_main (argc=1, argv=0xbffffcb4) at ted.c:1306
#5  0x00005824 in +[AllegroAppDelegate app_main:] ()
#6  0x90a39b74 in forkThreadForFunction ()
#7  0x900246e8 in _pthread_body ()
(gdb)


let me know if you need anything else[/code]
_________________
dennis

#23211 - ampz - Wed Jul 07, 2004 4:33 pm

Just a tile editor or a combined tile/map editor?

In that case, support for custom shaped map objects would be great.
Often when you make a map, single objects on the map consists of several tiles. It would be great if you could just drag-and-drop entire objects to the map, each object consisting of several tiles.

I have tried several map editors, but none of them supported drag-and-drop of more than one tile at a time. Very frustrating when you work on large maps.
I'am however sure that there already are such map editors available, I have just not been able to find one.

#23218 - col - Wed Jul 07, 2004 6:34 pm

ampz wrote:
Just a tile editor or a combined tile/map editor?

In that case, support for custom shaped map objects would be great.
Often when you make a map, single objects on the map consists of several tiles. It would be great if you could just drag-and-drop entire objects to the map, each object consisting of several tiles.

I have tried several map editors, but none of them supported drag-and-drop of more than one tile at a time. Very frustrating when you work on large maps.
I'am however sure that there already are such map editors available, I have just not been able to find one.


Have you tried Nessies MapEd?
you can build up 'brushes' from your tileset that can be used for painting your objects. It also has a 'rubber stamp' mode so you can use sections of your map as brushes.

cheers

Col

#23221 - keldon - Wed Jul 07, 2004 7:08 pm

ampz wrote:
I have tried several map editors, but none of them supported drag-and-drop of more than one tile at a time. Very frustrating when you work on large maps.

Do you mean to be able to drag out tiles 1-3 from your tileset at the same time? That would be a good idea

#23223 - tepples - Wed Jul 07, 2004 8:37 pm

SmileyDude wrote:
tepples wrote:
What step of these instructions did you fail on? And what were the last few error messages?

Just did an install of Allegro 4.1.14 (seems to have better OS X support than 4.0 does)

Allegro 4.1.x is the UNSTABLE, which has some incompatible API changes. I will not switch to Allegro 4.1.x until it becomes 4.2.0.

No, I'm not working on a map editor just yet. I still have to try all the other map editors and see what features I can ste^H^H^H borrow. (8TED, the tile editor that I plan on extending, was in essence a clone of Tile Layer Pro.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23224 - ampz - Wed Jul 07, 2004 9:06 pm

col wrote:
ampz wrote:
Just a tile editor or a combined tile/map editor?

In that case, support for custom shaped map objects would be great.
Often when you make a map, single objects on the map consists of several tiles. It would be great if you could just drag-and-drop entire objects to the map, each object consisting of several tiles.

I have tried several map editors, but none of them supported drag-and-drop of more than one tile at a time. Very frustrating when you work on large maps.
I'am however sure that there already are such map editors available, I have just not been able to find one.


Have you tried Nessies MapEd?
you can build up 'brushes' from your tileset that can be used for painting your objects. It also has a 'rubber stamp' mode so you can use sections of your map as brushes.

cheers
Col

Sounds perfect.

#23230 - SmileyDude - Thu Jul 08, 2004 1:35 am

tepples wrote:
Allegro 4.1.x is the UNSTABLE, which has some incompatible API changes. I will not switch to Allegro 4.1.x until it becomes 4.2.0.


Yeah, I knew that -- I'm using 4.0 on the Linux box with no issues... it's just the OS X support in 4.0 is very much lacking (no sound, X server only). Honestly, I don't consider it an OS X version when it requires an X server to run. It's a Darwin port that happens to also run on OS X.

BTW, the incompatible APIs are still there in 4.1 -- it just flags them with warnings during the compile.
_________________
dennis

#23249 - tepples - Thu Jul 08, 2004 7:04 pm

I don't have a Mac to test on (unless you count my Performa 6230 with a 75 MHz CPU and a dying third hard drive), so it appears I won't be listing Mac OS X as supported for a while, at least until Allegro 4.2.0 becomes mature. I can't find a roadmap (analogous to that of FreeDOS) defining where Allegro 4.1.x will become Allegro 4.2.0.

Or should I switch the graphical tools to a different toolkit? Last time I tried, I was unable to get SDL and a few demos compiled on MinGW. Would wxWidgets work better?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23259 - keldon - Thu Jul 08, 2004 10:46 pm

wxWidgets is pretty easy to work with

#23302 - SmileyDude - Fri Jul 09, 2004 4:18 pm

tepples wrote:
Or should I switch the graphical tools to a different toolkit? Last time I tried, I was unable to get SDL and a few demos compiled on MinGW. Would wxWidgets work better?


I don't know about MinGW or wxWidgets, but I do use SDL under Linux, Windows, and MacOS X. I haven't had any problems, and it pretty much just works for what we're using it for. There are some things that I wish were better in regards to the Mac, but it's nothing that can't be solved with better build scripts.
_________________
dennis

#23349 - tepples - Sat Jul 10, 2004 6:35 am

SmileyDude wrote:
I do use SDL under Linux, Windows, and MacOS X.

With which compiler do you use SDL under Windows? Should I spend the time to download the Microsoft Visual C++ Toolkit?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#23351 - keldon - Sat Jul 10, 2004 7:35 am

You can use SDL with GCC

#23399 - SmileyDude - Sun Jul 11, 2004 10:40 pm

tepples wrote:
With which compiler do you use SDL under Windows? Should I spend the time to download the Microsoft Visual C++ Toolkit?


Kinda a sensative question there... ;)

I spent an whole morning trying to get the gcc with cygwin to work when I finally broke down any bought Visual C++ .net for $99. On all of the other platforms, I had absolutely no problems with using gcc.

To toss in another wrinkle, I'm also loading code from a DLL. The DLL code is compiled with gcc under cygwin with no problems (so far -- been working fine for 6 months now).

So, I'm pretty sure that using SDL and gcc under Windows is possible, I just haven't been able to get it working myself.
_________________
dennis

#23406 - crossraleigh - Mon Jul 12, 2004 3:55 am

tepples wrote:
Or should I switch the graphical tools to a different toolkit?

Have you looked at FLTK? It is small enough to be statically linked, so no library installation by the user is necessary. The stable branch works fine on Linux, Windows, and OS X. (I have it installed and working on all three.)

WinterMute apparently likes it as well; his Xboo Communicator uses it.

#23407 - sajiimori - Mon Jul 12, 2004 5:19 am

I've been using SDL with MinGW for a long time. Let me know if you need tips or even a binary or two.

#26207 - keldon - Thu Sep 09, 2004 5:34 pm

SDL under windows should work with any compiler that works with DLL's. For example the window assembly coders are happy using the SDL dll. For opening Jpegs there is a dll called DevIl