Trying to figure out Mode 8

What is a Uzebox? How can I get one? Check here!
Post Reply
diegzumillo
Posts: 31
Joined: Sat Apr 28, 2018 3:16 am

Trying to figure out Mode 8

Post by diegzumillo » Mon May 07, 2018 12:38 am

I'm still exploring uzebox here, and right now I'm looking at video mode 8 a little more closely. It looks quite simpler than other modes, mostly because it's a very raw approach to making graphics, so one would need to code a lot of functionality on top of it. But it looks interesting. I imagine it would limit drastically the amount of images you can have in your game, without any sort of compression. And putting pixels individually also seems computationally expensive.

Anyway, while it looks simple to read pixel, put pixel, the actual workflow to make a sprite you can read from doesn't look inviting. Looking at the sprite.raw from bitmapdemo, it looks like it came from a similar exporter to Gimp's raw data (.data) format. The include (sprite.inc) however seems to have been generated by some other means (hopefully not by hand!). I tried other export options from gimp; there are some bitmap that output an almost usable result. I tried using that bin2hex tool but doesn't seem relevant here. I can't seem to force Gimp to output 2 bits for each color, even in indexed mode with only 4 colors in the palette.

Are there any tools out there made for this mode that I'm not seeing? Has anyone used this mode before and would like to share some hints? :D

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Trying to figure out Mode 8

Post by Jubatian » Mon May 07, 2018 5:17 am

I don't know about tools for this, however it isn't something difficult to handle.

Using Gimp's export to header feature (which can generate 8 bits per pixel output), you can write simple programs to convert into an appropriate format. Modes which I designed typically have such tools, for example a simple one is in Mode 40 ( https://github.com/Uzebox/uzebox/blob/m ... /tilegen.c ) which generates 1 bit per pixel tiles. So really, you are just some 50 or so lines of code away from having your images in the right format! (I can not point you to a functional converter as I didn't need one this far for plain 2bpp, hope the example above can help you writing one).

diegzumillo
Posts: 31
Joined: Sat Apr 28, 2018 3:16 am

Re: Trying to figure out Mode 8

Post by diegzumillo » Tue May 08, 2018 7:14 pm

Hey Jubatian, thanks for pointing that out! I'm sure it will be useful. It'll have to wait for the weekend (of the next week, probably) for me to get back to this. My work is getting in the way of my videogames..

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests