Jump to content
IGNORED

160B samples in gimp


BydoEmpire

Recommended Posts

Does anyone have sample artwork for use in 160b mode?  My skill with Gimp is very basic, and I haven't been able to work out what I'm doing wrong.  If anyone has a sample xcf and png files, it'd be really helpful.  I think I have a good idea how to handle the palettes in 7800 basic, it's creating the actual pngs that I'm getting stuck on.

Link to comment
Share on other sites

39 minutes ago, BydoEmpire said:

Does anyone have sample artwork for use in 160b mode?  My skill with Gimp is very basic, and I haven't been able to work out what I'm doing wrong.  If anyone has a sample xcf and png files, it'd be really helpful.  I think I have a good idea how to handle the palettes in 7800 basic, it's creating the actual pngs that I'm getting stuck on.

In Gimp, you can set the index value of the image (how many colours to use). 

 

IMAGE-> MODE -> INDEX

 

Use this to set the number colours. so if you were using 5 colours, set it to 6 (5 colours + transparency).

 

When I line up the palettes, I usually put palette markers on the picture which makes that process easier (you can see them here )

 

If have a picture you are trying to convert or something like that, PM it over to me and I'll convert it to 160B for you and you can then use that as a template going forward.

 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

One useful thing when working with non-square pixels is to set Image → Print Size and then turn off View → Dot For Dot. eg, if you have an 8×16 px image that should be more-or-less a square on the screen, set the print size to 1cm × 1cm and when you turn off dot for dot mode, the pixels will be stretched horizontally to double width.

 

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Here's the original background tileset (160a)

tileset_test.xcf

 

Converting to 160b, 16 colors (assuming 4 are transparent)

tileset_test_160b.xcf

 

exported to png: tileset_test_160b.png.3409f9910e2c73cf37c81f559b9859f9.png

 

    displaymode 160B
...
    incgraphic gfx/tileset_test_160b.png 160b 0 1 2 3 4 5

 

 

Note that I only updated the tileset. I still have my scoredigits and font still in 160a...

 

It gets displayed like this:

160b.PNG.5e839b90e5dd3a04e6fd0db72937c170.PNG

 

Link to comment
Share on other sites

The tileset has 3 visible colours + transparency in the source file, I'm not sure what you are trying to do that's not working. Can you expand a bit on what you are trying to get to?

 

Usually with tiles, If I want "more colours" I use multiple tilesets. That's what I did with EXO, so each tileset has it's own palette. That allows the screen to look like it has more colours. I think that's a cheaper way (resource wise) than using 160B for tiles. E.X.O. world 1 has 5 different tilesets that use 4 palettes between them. I then layer into that other non-tile environmental stuff like the lava etc (which recycles the explosion palette).

 

I tend to only use 160B for static images like titles, or maybe 1 or 2 sprites as needed as it can be a bit expensive. Danger Zone uses 160B for the airplane sprites but there's nothing much else going on. Keystone uses 160B for the cop and the robber but nothing else and EXO only uses it on a couple of cutscenes, never ingame.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, Muddyfunster said:

I'm not sure what you are trying to do that's not working. Can you expand a bit on what you are trying to get to?

I guess he is trying to use the character map 160a for mode 160b.

 

@BydoEmpire in 160b mode char is 2pixel width, for example Char number 10 (in 160a) you need use 20 and 21 (160b) in map data (or 20 if you use double char mode)

Edited by Eagle
  • Like 1
Link to comment
Share on other sites

On 2/26/2022 at 6:44 AM, Muddyfunster said:

The tileset has 3 visible colours + transparency in the source file, I'm not sure what you are trying to do that's not working. Can you expand a bit on what you are trying to get to?

Thanks.  I wanted to try a background tileset with more than 4 colors. In the 160b source file, i just changed the number of colors to 16 via gimp and re-exported. I didn't change anything else. Then I incgraphic'd it as 160b and changed the graphics mode.

 

Usually with tiles, If I want "more colours" I use multiple tilesets. That's what I did with EXO, so each tileset has it's own palette. That allows the screen to look like it has more colours. I think that's a cheaper way (resource wise) than using 160B for tiles. E.X.O. world 1 has 5 different tilesets that use 4 palettes between them. I then layer into that other non-tile environmental stuff like the lava etc (which recycles the explosion palette).

That's exactly what I want! I'm guessing if you use different tilesets you just have to index them sequentially (i.e. tilest0 has tiles 0-X, tileset1 has tiles X+1 -> Y, tilset2 has tiles Y+1 -> Z)? How do you specify what palette to use for each?

On 2/26/2022 at 12:57 PM, Eagle said:

I guess he is trying to use the character map 160a for mode 160b.

 

@BydoEmpire in 160b mode char is 2pixel width, for example Char number 10 (in 160a) you need use 20 and 21 (160b) in map data (or 20 if you use double char mode)

Yeah, I didn't change any other code other than the mode & important the png as 160b, so that would explain it. In the screenshot a lot of the tiles are "half" displayed, which would make sense if I index halfway into a tile.

  • Like 2
Link to comment
Share on other sites

8 hours ago, BydoEmpire said:

That's exactly what I want! I'm guessing if you use different tilesets you just have to index them sequentially (i.e. tilest0 has tiles 0-X, tileset1 has tiles X+1 -> Y, tilset2 has tiles Y+1 -> Z)? How do you specify what palette to use for each?

For E.X.O. I used mapfiles for each screen (built using the Tiled application). The palette entry is defined at the start as that's required when using a mapfile. The tilesets are indexed sequentially. I used Tiled as it seems to be the easiest way to get multiple tilesets with different palettes on the screen efficiently, with 7800Basic doing the heavy lifting so I don't have to roll my own routine, it's also great for quick prototyping of screens.

 

Palettes are managed at the start of the bank where I'm using these tiles with the mapfile. I have the usual incgraphic to load the tileset but there is an extra number on the end, this signifies the palette to be used by the tileset in mapfile that calls it. 

incgraphic gfx/backgrounds.png 160A 0 1 2 3 3

So you have the path, file, mode and index, but in this example, it's using palette 3 (the extra 3 on the end). If you don't declare the palette, the compiler gets upset.

 

The nice thing about using a mapfile is that you can shove them all in another bank and draw them and then switch back to your execution bank where your actual tiles live. For EXO (pre the compression revolution!), each world would have 2 or 3 banks, 1 for the game code and assets that were not shared (the tiles for the level basically) and then a bank or 2 of mapfiles. If I was starting EXO today, I'd maybe consider using compression somehow for the mapfiles.

 

There is a great plotmapfile sample in the 7800Basic samples folder. I guess you could roll your own routine as different games will have different requirements. I'm a great believer of not reinventing the wheel ! :D 

 

I've broken down the anatomy of an EXO screen to show how the tile sets break down and try to illustrate a bit better what I mean with using the palettes and distribution. As we only have 8 palettes, palettes have to be shared and I always end up with a "which feature do I want to keep more" kind of colour decision.

 

Not sure if it's helpful but feel free to ask. I would recommend trying out Tiled, even if just to experiment. Being able to use Tiled files in 7800Basic is a fantastic feature (thanks @RevEng!)

 

overviews.thumb.png.44adc500dfa0c0e84078e5e379b3738d.png

 

 

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...