Jump to content
IGNORED

Tiny Sprite Editor for Lynx


jum
 Share

Recommended Posts

I have modified the online "Tiny Sprite Editor" ( http://tmtg.net/tinyspriteeditor/) made by Boris van Schooten, so that you can use it to create sprites for Atari Lynx.

 

Double-click the .html file in the attached zip to run it.

 

Currently you can export the sprite data as C code or ASM code (literal sprites only for now, can add RLE compressed sprites later).

 

Usage:

1. Run the .html file in Chrome (may work in other browsers too).

2. Set the "Palette" drop down to "Atari Lynx" BEFORE you draw anything.

3. Draw a pretty picture (background must be pen 0 (black))

4. In the "Text Format" dropdown, select "Lynx C code (literal)"

5. Click the "Export" button.

6. The C code will appear in the textbox at the bottom of the page.

 

Note: you cannot import C code at this stage. If you want to "Save" your sprites to work on later, then export as "Data URL".

 

Let me know how it works for you. I am sure many improvements can be made.

 

The main purpose is to make it easier to create Lynx sprites for your projects, without having to hassle with Gimp and PCX and sprpck/sp65 and bin2c...

 

Have fun!

 

Also have added to github as a fork of the original: https://github.com/j...inyspriteeditor

tinyspriteeditor_lynx_V1.1.zip

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

Such a nice editor. The literal sprites are ok for most purposes.

 

It works in Firefox too.

Thanks for testing Karri. Has some impressive features for a "Tiny" editor (Copy/Paste/Sprite sheets/Animation preview).

Link to comment
Share on other sites

Looks pretty cool but I haven't figure out how to modify the palette yet... or is it even possible? (having black for pen 0 is not optimal since pen 0 is also the transparent color).

You can modify the palette in the HTML source code, or add your own palette. You can change pen 0 to pink if you prefer.

 

Probably would be nice to be able to import a Lynx palette, either from C file data or from .gpl palette file. Let me know what format(s) would be most useful.

 

Also have added to github as a fork of the original: https://github.com/james7780/tinyspriteeditor

Edited by jum
Link to comment
Share on other sites

  • 8 months later...

The tiny sprite exports the bitmap as bytes.

 

unsigned char sprite_0_0[] = {
0x7,   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x7,   0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 
0x7,   0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 
0x7,   0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 
0x7,   0x0, 0xff, 0xff, 0xf0, 0x0, 0x0, 
0x7,   0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 
0x7,   0x0, 0xf0, 0xff, 0xff, 0x0, 0x0, 
0x7,   0x0, 0xf, 0xff, 0xff, 0x0, 0x0, 
0x7,   0x0, 0xff, 0xff, 0xf, 0x0, 0x0, 
0x7,   0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 
0x7,   0x0, 0x0, 0xf, 0xf, 0xf, 0xf0, 
0x7,   0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x00
}
In the cc65 library _suzy.h you have different type of sprite structs like:
typedef struct SCB_REHVST_PAL {             // SCB with all attributes
  unsigned char sprctl0;
  unsigned char sprctl1;
  unsigned char sprcoll;
  char *next;
  unsigned char *data;
  signed int hpos;
  signed int vpos;
  unsigned int hsize;
  unsigned int vsize;
  unsigned int stretch;
  unsigned int tilt;
  unsigned char penpal[8];
} SCB_REHVST_PAL;
static SCB_REHVST_PAL Sastonmartin = {
    BPP_4 | TYPE_NORMAL,REHVST|LITERAL,NO_COLLIDE,
    0,
    sprite_0_0,
    80, 100,
    0x100, 0x100,
    0x000, 0x000,
    {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}
};
Then you can paint this on screen with:
tgi_sprite(&Sastonmartin);
tgi_updatedisplay()
Link to comment
Share on other sites

  • 1 year later...

Hi All,

 

Currently I use the tiny sprite editor PNG export, and then imagemagick (see below) to convert to BMP so it can be processed by sprpck.

 

convert image.png -colors 16 -type palette image.bmp

The problem, of course, is that the palette gets scrambled by the conversion but at least it generates an image that can be used by sprpck.

 

I cannot get any of the export to text to generate anything visible (including Karri's above example.) How do you use the exported text to work properly?

Link to comment
Share on other sites

  • 1 year later...
On 12/29/2019 at 1:46 AM, karri said:

I just checked the latest version of tinysprite-lynx and it seems to be broken. I was not able to get any sprites out of it.

The latest version from Jan 2018 works fine for me.  All you need is the tinyspriteeditor_lynx.html file, set the palette to Lynx, don't draw with black (erase with black), set the text format to Lynx whatever, and hit Export to see the output text.

 

If I ever get bored enough, I'll take the last open-source version of Aseprite (or similar) and do something similar but with palette generation too (using a palette of 16+4096 colors - the colors you copy to the first 16 slots set it).  But... that's not likely unless I get around to launching a Lynx project too.

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.

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...
 Share

  • Recently Browsing   0 members

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