Simple Sprite editor (update to 0.4.1 10.11.17)

Discuss ZX Spectrum Next Games, Tools and more.
User avatar
emook
Posts: 70
Joined: Mon May 29, 2017 6:55 pm

Simple Sprite editor (update to 0.4.1 10.11.17)

Post by emook » Sat Jun 03, 2017 1:03 pm

Here is the start of a simple sprite editor I have written and some steps on how to use it with the current SPR format (and getting them into ZEsarUX emulator.)

It also allows you to convert any image to the Next256 BMP format.

Editor :

Click left to place a pixel, right to remove.
Clear to Trans will clear all sprites to the transparent colour
Clear Sprite will clear all sprites to white
Show/Hide T will toggle the transparent colour on the editor for visibility

Export Sprite - saves the current sprite to current directory as "sprite.spr"
Load Sprite Sheet - Loads either a single or multi sprites store in the SPR file
Save All Sprites - will save all sprites to a SPR file

Image Import

Load any image type, use the width and height to resize
then select number of sprites to import using the X and Y offset and width and height or 16x16 sprites
You can also use the right mouse button the the image to quickly locate the offset required

<< - Navigate back a sprite
>> - Navigate forward a sprite
Remove Sprite - Decreases the number of sprites
Add Sprite - Increases the number of sprites

The pink colour with a T is the transparent colour.

(video updated for 0.3.1)



Download here http://zxbasic.uk/files/UDGeedNext-current.rar

0.4.1 - 10.11.17

fixes

- fixed cut copy paste bug, forgot to add offset multiplier ;)
- save bmp extension should have been checked
- reworked colour pickers
- rearranged colour palette
- fixed undo bugs (again)
- adjusted button layout to be more efficient

0.4 - 09.11.17

fixes

- Fixed export to 256 BMP for layer2 (colours where mashed)
- Fixed keyboard shortcuts interfering with some bits
- Keyboard shortcuts now require CTRL+key
- Fixed undo / redo
- Many more I have forgotten about

added

- new icons from flaticons.com
- undo / redo
- Mirror and Flip for export of image to 256BMP, this is perfect for the simple esxdos load by Russ McNulty
- When picking a colour will now show selected colour picked on palette

0.3.2 - 17.06.17

fixes

- fixed copying from output panel to clipboard
- hopefully output updating now always shows

added

- right click menu on output panel, copy / generate / select all

0.3.1 - 17.06.17

fixes

- import 1 / 2 sprites cause issues and didnt correct max sprites correctly.

0.3.0 - 17.06.17

added

- animations (set frame start, and number of frames)
- added preview output, increase count and width- useful for objects more than one sprite
- added custom output asm text
- added fill
- added colour picker, also use keyboard P - left click set FG, right click set BG
- added rotate left, right, up and down - keyboard WASD
- added flip and mirror keyboard f/h
- added keybaord ADD to add a new frame
- added keyboard ctrl x/c/v for block cut / copy / paste
- added options for smooth or raw resizing
- added sliders for rescaling
- added status bar
- added requester for export single sprite
- reposition import with right click on the left hand preview

fixes

- generate output padded values to left instead of right cause blue colours in space of reds
- generate output didnt always show output
- a million other fixes

0.2.5 - 10.06.17

added

- import sprites from images, resize reposition and recolour image to Next 256!
- menu options
- keyboard shortcuts : left arror, right arror , keyboard + to add sprite

fixes

- fix x of x when clearing
- when imported adds blank sprite at end
(this is due to nextsprite )
- when import new image reset x/y offset and sizing
- asm output listing

Its still early so any bugs/suggestions are welcome until something better comes along.

Thanks!

:)

EDIT : Here is a tool for editing the tbblue.mmc file http://zxbasic.uk/files/editd169e.rar (so you can add sprites to the sd image)
Last edited by emook on Sat Jun 17, 2017 1:47 am, edited 7 times in total.
---------
ZXorDIE
http://zxbasic.uk/NextBuild NextBuild
http://zxbasic.uk ZXBD Snapshot uploader
http://zxbasic.uk/db/0 ZXBasic Online Database

User avatar
robuttley
Posts: 15
Joined: Mon May 29, 2017 7:12 pm

Re: Simple Sprite editor

Post by robuttley » Sat Jun 03, 2017 1:08 pm

God bless you sir. That's wrapped up my sunday evening :-)

User avatar
emook
Posts: 70
Joined: Mon May 29, 2017 6:55 pm

Re: Simple Sprite editor

Post by emook » Sat Jun 03, 2017 1:15 pm

robuttley wrote:
Sat Jun 03, 2017 1:08 pm
God bless you sir. That's wrapped up my sunday evening :-)
You're welcome! :D
---------
ZXorDIE
http://zxbasic.uk/NextBuild NextBuild
http://zxbasic.uk ZXBD Snapshot uploader
http://zxbasic.uk/db/0 ZXBasic Online Database

User avatar
HeX
Posts: 40
Joined: Tue May 30, 2017 8:02 am

Re: Simple Sprite editor

Post by HeX » Sat Jun 03, 2017 6:52 pm

nice.. cheers for sharing =)
Spell of ZX roguelike, You cant unthink it now....

User avatar
emook
Posts: 70
Joined: Mon May 29, 2017 6:55 pm

Re: Simple Sprite editor

Post by emook » Sun Jun 04, 2017 2:53 am

0.2.3 - 04.06.17

fixes

- doesnt double up the file extension when saving
- remove sprite / clear sprite shows warning

added

- ability to export sprites as asm data out put (db 0,0, etc)
(go to output tab, click generate)
---------
ZXorDIE
http://zxbasic.uk/NextBuild NextBuild
http://zxbasic.uk ZXBD Snapshot uploader
http://zxbasic.uk/db/0 ZXBasic Online Database

User avatar
robpearmain
Posts: 59
Joined: Tue May 30, 2017 5:35 pm
Location: York
Contact:

Re: Simple Sprite editor

Post by robpearmain » Sun Jun 04, 2017 6:11 am

This is fantastic, especially the export for asm, I see in another thread they are busy putting code together to load the sprites etc.

For the editor, as a roadmap, it would be good to see functions like:

Animation test (cycle from frame x to y at z speed)
Rotate by 45 degrees (there must be libraries out there to assist)
Export asm option to include sample loader and display to screen

I can see this becoming the de facto sprite editor 😀

Is it in Gaia, happy to contribute if so (.NET?)
Rob Pearmain
Bipboi (Zx Spectrum 48k), Harry Hedgehog (ZX Spectrum [1K]), Luna C (PC), Turbotoons (PC)

ZX Spectrum 48k, +, 128k, Next (board)

User avatar
emook
Posts: 70
Joined: Mon May 29, 2017 6:55 pm

Re: Simple Sprite editor

Post by emook » Sun Jun 04, 2017 11:24 am

Thanks. It's written in Purebasic, so it requires no external libs or DLLs and it's super tiny (currently only ~170k).

I can the extra features relatively easily, including the 45 degree rotate. I'm at a wedding today but will add some other bits tomorrow.

Cheers
---------
ZXorDIE
http://zxbasic.uk/NextBuild NextBuild
http://zxbasic.uk ZXBD Snapshot uploader
http://zxbasic.uk/db/0 ZXBasic Online Database

User avatar
robpearmain
Posts: 59
Joined: Tue May 30, 2017 5:35 pm
Location: York
Contact:

Re: Simple Sprite editor

Post by robpearmain » Sun Jun 04, 2017 2:20 pm

By Gaia I meant GIT 😀

I really should proof read

Awesome
Rob Pearmain
Bipboi (Zx Spectrum 48k), Harry Hedgehog (ZX Spectrum [1K]), Luna C (PC), Turbotoons (PC)

ZX Spectrum 48k, +, 128k, Next (board)

User avatar
emook
Posts: 70
Joined: Mon May 29, 2017 6:55 pm

Re: Simple Sprite editor (update to 0.2.5 10/7/17)

Post by emook » Sat Jun 10, 2017 1:00 am

Updated to 0.2.5
---------
ZXorDIE
http://zxbasic.uk/NextBuild NextBuild
http://zxbasic.uk ZXBD Snapshot uploader
http://zxbasic.uk/db/0 ZXBasic Online Database

hillelr
Posts: 3
Joined: Thu Jun 08, 2017 5:01 pm

Re: Simple Sprite editor (update to 0.2.5 10/6/17)

Post by hillelr » Sun Jun 11, 2017 5:58 am

Great program :)

Post Reply