Shop OBEX P1 Docs P2 Docs Learn Events
Tile Studio / Hydra — Parallax Forums

Tile Studio / Hydra

DinodenDinoden Posts: 19
edited 2011-01-02 11:33 in Propeller 1
Hi.
I am new to Tile Studio and have a few questions. I have played with it and can't figure it out. First of all I can make my own 16X16 or 32X32 etc. tiles right in the propeller tool with a simple program and display then on the TV. Time consuming! I can make tiles in Tile Studio but I can't figure out how to import them to the Hydra. I don't know which code to use and the data I get seems useless. For example, how could I display the "grapes" tile example on the Tile Studio web site (http://tilestudio.sourceforge.net/drawing.htm) on my television.

What steps are involved and how do I manipulate the data to the Hydra.

Thanks,
Dennis

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-12-28 16:50
    Dennis,

    That software is a real find. I'm not sure anyone here has done work using the Propeller/Hydra and that software, however there are a couple links that might be "close" to what you have in mind.

    The OREDEMO stuff I've worked with uses a copy of the Gameboy Tile Designer (4 color).
    Info here: http://www.propellerpowered.com/gaming.html

    Also there is some interesting work being done by Potatohead & Baggers using a program called program called bmptolite.exe which will convert small BMP images to sprites which can be displayed on both TV and VGA setups.

    Info here: http://forums.parallax.com/showthread.php?127123-Full-Color-Tile-Driver-Thread

    Hope these help in your quest for easy tiles on your Hyrda. Do share what you come up with!

    OBC
  • ericballericball Posts: 774
    edited 2010-12-28 17:58
    That looks like an interesting tool. I don't know which display driver you're using, but most Propeller tile-based drivers have a 4 color palette per tile. For VGA each color is 6bpp RrGgBb00 while TV is cccceyyy where cccc is 4 bit hue, e is color enable, and yyy is luma (2-7 for e=0) (see attachment for TV code to RGB). So you'll need to figure out what your driver needs then how to communicate that to Tile Studio.
  • DinodenDinoden Posts: 19
    edited 2010-12-29 13:57
    Yes I will share.

    Thanks
  • DinodenDinoden Posts: 19
    edited 2010-12-29 14:23
    Hi I am using the HEL graphics driver that came with the Hydra game console. Yes, it's a 4 bit colour palette. I can make my own tiles right in the programming (spin), but when I use multipule tiles for larger graphics it gets nasty. Thats why I tried to use" Tile Studio" to make life easier. I can draw graphics to tiles as well with Tile Studio but thats it.

    EG.
    LONG %%0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0 'ALIEN
    LONG %%0_0_0_0_0_0_1_1_1_1_0_0_0_0_0_0
    LONG %%0_0_0_0_0_1_3_3_3_3_1_0_0_0_0_0
    LONG %%0_1_1_1_1_3_3_3_3_3_3_1_1_1_1_0
    LONG %%0_2_2_2_2_1_3_3_3_3_1_2_2_2_2_0
    LONG %%1_0_2_2_1_1_1_1_1_1_1_1_2_2_0_1
    LONG %%1_1_1_2_0_1_1_1_1_1_1_0_2_1_1_1
    LONG %%1_2_1_0_0_1_1_2_2_1_1_0_0_1_2_1
    LONG %%0_2_0_0_0_0_1_2_2_1_0_0_0_0_2_0
    LONG %%0_0_0_0_0_0_1_1_1_1_0_0_0_0_0_0
    LONG %%0_0_0_0_0_1_2_2_2_2_1_0_0_0_0_0
    LONG %%0_0_0_0_1_2_2_0_0_2_2_1_0_0_0_0
    LONG %%0_0_0_0_1_2_2_0_0_2_2_1_0_0_0_0
    LONG %%0_0_0_0_2_1_1_0_0_1_1_2_0_0_0_0
    LONG %%0_0_0_0_2_2_0_0_0_0_2_2_0_0_0_0
    LONG %%0_0_0_0_2_2_0_0_0_0_2_2_0_0_0_0

    palette_map LONG $07_EC_0C_02

    When I click the "generate code" icon I get a( .bin ) file that wants to play in VLC player (which it can't) and sometimes the the Propeller tool will open it up with one letter on the screen. So I was just wondering how to retrieve the code from Tile Studio.

    Thanks
  • potatoheadpotatohead Posts: 10,261
    edited 2010-12-29 14:38
    I suspect that bin file is the tile data in binary form.

    Instead of including it in text form, as you have in your post, just use the file operator in a DAT section. The Prop Tool will build your program, and insert the binary contents of the file you specify (which should be that BIN file). Add a label, and you are set to access the data "@tiles"

    DAT

    tiles file: mytiles.bin

    If you look in my blog, I've a similar thing going on with tile data for a different driver. What is nice about that is screen assets can be changed by re-running the conversion tool, which automatically are picked up by the Prop Tool. Open graphics program, change pixel, save file, run utility, in Prop Tool hit "F10", see pixel on screen.
  • DinodenDinoden Posts: 19
    edited 2011-01-01 20:30
    Hi Oldbitcollector.
    Happy New Year!
    I have downloaded your "ORE" documentation and played with it. I went through the demos and you are right . This is basically what I am looking for. The only question I have is how do I get my graphics from the GBTD to my dat section using the "Export" function on thr GBTD.

    I was hoping the data would come in like yours shown below. What settings do I use? I can see the relationship between your "#2" drawing (upper half of the character) with the data shown below.

    word %%33000333 ' ###...## $02
    word %%30222033 ' ##.$$$.#
    word %%02111203 ' #.$***$.
    word %%10000013 ' #*.....*
    word %%11010113 ' #**.*.**
    word %%01010103 ' #.*.*.*.
    word %%30111003 ' #..***.#
    word %%00000020 ' .$......

    When I do a simple graphic I get what is shown below.

    ; EXPORT.Z80
    ;
    ; Tile Source File.
    ;
    ; Info:
    ; Form : All tiles as one unit.
    ; Format : Gameboy 4 color.
    ; Compression : None.
    ; Counter : Tile-count as Word.
    ; Tile size : 16 x 16
    ; Tiles : 0 to 0
    ;
    ; Palette colors : None.
    ; SGB Palette : None.
    ; CGB Palette : None.
    ;
    ; Convert to metatiles : No.
    ;
    ; This file was generated by GBTD v2.2


    ; Bank of tiles.
    TileLabelBank .equ 0

    ; Start of tile array.
    TileLabel:
    .Word 1
    .byte $00,$00,$0F,$00,$04,$18,$04,$18
    .byte $04,$18,$0C,$00,$0B,$00,$0A,$00
    .byte $0A,$00,$03,$18,$00,$18,$02,$1A
    .byte $0A,$02,$12,$02,$1F,$00,$00,$00
    .byte $00,$00,$F0,$00,$20,$18,$20,$18
    .byte $20,$18,$10,$00,$D0,$00,$50,$00
    .byte $50,$00,$C0,$18,$00,$18,$40,$58
    .byte $50,$40,$48,$40,$F8,$00,$00,$00

    .end

    ; End of EXPORT.Z80

    Nothing like yours. To get this I also have to use note pad to view and cut & paste it into the DAT section of my program.

    Also is this format doable shown below? This is what I do now.

    LONG %%0_0_0_1_1_1_1_1_1_1_1_1_0_0_0_0 ' RACE CAR
    LONG %%0_0_1_1_1_1_1_1_1_1_1_1_1_0_0_0
    LONG %%0_0_3_3_1_1_1_1_1_1_1_3_3_0_0_0
    LONG %%0_0_3_3_1_1_1_1_1_1_1_3_3_0_0_0
    LONG %%0_0_3_3_1_1_1_1_1_1_1_3_3_0_0_0
    LONG %%0_0_0_0_1_1_2_2_2_1_1_0_0_0_0_0
    LONG %%0_0_0_1_1_1_2_2_2_1_1_1_0_0_0_0
    LONG %%0_0_0_1_1_1_2_2_2_1_1_1_0_0_0_0
    LONG %%0_0_0_1_1_1_2_2_2_1_1_1_0_0_0_0
    LONG %%0_0_0_1_1_1_1_1_1_1_1_1_0_0_0_0
    LONG %%0_0_3_3_1_3_1_1_1_3_1_3_3_0_0_0
    LONG %%0_0_3_3_1_3_1_1_1_3_1_3_3_0_0_0
    LONG %%0_0_3_3_1_3_1_1_1_3_1_3_3_0_0_0
    LONG %%0_0_1_1_1_3_1_1_1_3_1_1_1_0_0_0
    LONG %%0_1_1_1_1_1_1_1_1_1_1_1_1_1_0_0
    LONG %%0_1_1_1_1_1_1_1_1_1_1_1_1_1_0_0

    This is what I end up doing by hand. Not to bad but I would like to use GBTD instead because it gets really messy & tedious when I have to "connect" 4 or more tiles to create a larger tile / sprite.

    Thanks for your help!
    Dennis
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-01-01 21:00
    That Tile Studio program looks very interesting - I need to check it out when I get home. http://tilestudio.sourceforge.net/ has a very good tutorial.

    I've just coded some vb.net code yesterday that can turn a bitmap into an array of longs or bytes for C. Tile Studio looks like it can take this further and even produce the code. Sweet!

    I'm playing around with 64 color tiles in VGA using code from Kye and Baggers. Also I have some early drivers working in Catalina. Catalina runs in C, and Tile Studio looks like it can export to C. And Catalina can be run on the Hydra.

    I can seem some interesting synergies here. I've been pondering having a cog devoted to fast sprite/tile moves as they are a little slow in C (and Spin runs out of memory). I reckon we might be able to get some more games working here!
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-02 11:33
    One thing that could be done is just drop all your tiles into one larger image, or maybe a couple of images. When it's done this way, many output utilities will pack the tile data into a sequential set of tiles. Upper left might be tile 0, incrementing to the right, filling down to the last tile, say 63.

    These are imported in binary fashion. For reference during programming, I find it handy to take the source image, say it's something like a 256x128 for 16x8 tiles, and draw a grid on it with some graphics program and print it out. Then it's possible to just index the desired tiles by number, and all editing of the tile data stays in the graphics program.

    Do a few images for groups of things. Say background data is in one image, or in a few images, with sprites in another. However it makes sense.

    Then, when drawing to the screen, simple methods can be written like DrawShip(x,y,tiles). Each procedure knows the tile numbers needed to put the object on the screen. Once those are built up, the higher level program actually stays fairly short and clean.

    It's possible to mix 'n match too!

    Read in a file, with the file: in the DAT section, and label it. On the line below, or above file, it's completely possible to also key in some data, just as is shown on this thread. For small amounts of data, such as a tile list for a object that is composed of multiple tiles, or some level data, or colors, keying in data makes great sense. As soon as it gets to be more than that, learning to work from source data files is a great workflow savings, in my experience so far.
Sign In or Register to comment.