A sprite editor?

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
Flamore
Posts: 3
Joined: 03 Nov 2020, 11:42

A sprite editor?

Post by Flamore » 03 Nov 2020, 18:00

Greetings, is there a sprite editor?
Like i don't think guessing values from 00-40 is efficent for making sprites.

Sugarplum
Posts: 11
Joined: 30 Sep 2020, 22:19

Re: A sprite editor?

Post by Sugarplum » 03 Nov 2020, 21:42

I am not sure, but I think others are using Photoshop, reducing the palette, maybe exporting as RAW, and maybe taking a hex editor or something to dump in the values.

at67
Posts: 205
Joined: 14 May 2018, 08:29

Re: A sprite editor?

Post by at67 » 04 Nov 2020, 05:10

If you're using GCL or vCPU then you will probably need to conform to Marcel's RAW format which is explained in Python code here:
https://github.com/kervinck/gigatron-ro ... 4toraw6.py

If you are using gtBASIC then any 32bit or 24bit TGA file can be statically loaded by the compiler.

You'll need to convert or limit yourself to the Gigatron X:2 B:2 G:2 R:2 format, (that is how the pixel byte is represented with MSB to LSB being left to right. X is undefined/ignored by the underlying native code video generator, i.e. the top 2 bits of every pixel are unused and may be used by your code for data storage or per pixel logic processing.

There are a multitude of ways of doing this, the two that I use are:
1) Programmatically using ImageMagick, http://www.imagemagick.org/Usage/quantize/#od_posterize

Code: Select all

# convert using checker dither
convert test_rgb888.tga -ordered-dither o2x1,4,4,4 test_rgb222.tga

# convert using box dither
convert test_rgb888.tga -ordered-dither o2x2,4,4,4 test_rgb222.tga
2) Use a user defined palette in paint.net and then limit all drawing commands to that palette when generating/editing an image.

Code: Select all

; paint.net Palette File
; Lines that start with a semicolon are comments
; Colors are written as 8-digit hexadecimal numbers: aarrggbb
; For example, this would specify green: FF00FF00
; The alpha ('aa') value specifies how transparent a color is. FF is fully opaque, 00 is fully transparent.
; A palette usually consists of ninety six (96) colors. If there are less than this, the remaining color
; slots will be set to white (FFFFFFFF). If there are more, then the remaining colors will be ignored.
FF000000
FF550000
FFAA0000
FFFF0000
FF005500
FF555500
FFAA5500
FFFF5500
FF00AA00
FF55AA00
FFAAAA00
FFFFAA00
FF00FF00
FF55FF00
FFAAFF00
FFFFFF00
FF000055
FF550055
FFAA0055
FFFF0055
FF005555
FF555555
FFAA5555
FFFF5555
FF00AA55
FF55AA55
FFAAAA55
FFFFAA55
FF00FF55
FF55FF55
FFAAFF55
FFFFFF55
FF0000AA
FF5500AA
FFAA00AA
FFFF00AA
FF0055AA
FF5555AA
FFAA55AA
FFFF55AA
FF00AAAA
FF55AAAA
FFAAAAAA
FFFFAAAA
FF00FFAA
FF55FFAA
FFAAFFAA
FFFFFFAA
FF0000FF
FF5500FF
FFAA00FF
FFFF00FF
FF0055FF
FF5555FF
FFAA55FF
FFFF55FF
FF00AAFF
FF55AAFF
FFAAAAFF
FFFFAAFF
FF00FFFF
FF55FFFF
FFAAFFFF
FFFFFFFF

Post Reply