Author Topic: special graphic set implementation  (Read 2342 times)

0 Members and 1 Guest are viewing this topic.

Offline EricLang

  • Posts: 464
    • View Profile
special graphic set implementation
« on: January 02, 2014, 12:13:32 AM »
Tip needed for importing a lemmings system into the new lemmix database which is arising...

Special graphic sets are not belonging to a tileset but separate entities.
Should I 'wrap' them somehow into a tileset or keep them apart and create a 'special graphics picture' dataset?

STYLE
    SOUNDS
    MUSICS
    FONTS
    PICTURES
    ANIMATIONS
    SPECIAL
    TRIBES
        LEMMINGS
    TILESETS
        TILES
        STRUCS
    PACKS
        SECTIONS
            LEVELS
                LEVELSTRUCS
                LEVELTILES
                LEVELSTEELS

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: special graphic set implementation
« Reply #1 on: January 02, 2014, 04:12:43 AM »
Wrapping the special graphics into a tileset seems preferable in that the game engine that needs to display and run the level, it wouldn't have to do special code to handle the special graphics itself, the terrain would simply be just a tile like any normal set.

Given a level using graphics set N and special graphics set M, an equivalent tileset would have the following:

- terrain: one single tile corresponding to the entire bitmap from set M
- interactive objects: same interactive objects as set N, except with a palette swap using the palette from set M's bitmap

If your database need to support exporting the level back into files formatted to be usable in the DOS game (the level DAT, vgagrN.dat and vgaspecM.dat), you may want to at least keep some information in the database to aid with the export operation, specifically the values of M and N.  This would allow the export operation to detect and therefore perform special handling of the "tileset" to properly "unwrap" it so to speak, so that you can end up with the vgaspec file.

Offline EricLang

  • Posts: 464
    • View Profile
Re: special graphic set implementation
« Reply #2 on: January 04, 2014, 05:56:41 PM »
Yes, that sounds the most 'natural' to me.

Also storing the original palette of the dos pictures is handy, I think.
Because I am using 32 bit BGRA colors the alpha channel could be used for that.