Author Topic: Hardware sprite editor for Amstrad CPC6128+  (Read 400 times)

0 Members and 1 Guest are viewing this topic.

Offline Nemo59

  • CPC464
  • **
  • Posts: 29
  • Country: fr
  • CPC6128+
  • Liked: 60
  • Likes Given: 26
Hardware sprite editor for Amstrad CPC6128+
« on: 00:34, 11 April 21 »
Hi all,

Here is the version 1.0 (edit : udpdated to v1.01 with UNDO, improved COPY, LOAD, SAVE etc.)  of TP-Sprite for Amstrad CPC+. It's in french (but not a lot of text lol) and runs under CPM+ on Amstrad CPC6128Plus only.
3" image download (cpm included) :


https://cpcrulez.fr/applications_graphic-tp-sprite.htm

Two  videos of TPSprite (in french)  :

https://youtu.be/Dd5Jzzogqdg



https://youtu.be/5E5j3V7UEPM


(and a lot of other videos  CPC, CPM, Turbo Pascal, Turbo modula on CPC, Turbo Pascal library for Amstrad CPC on my channel, Gomoku Game, Julia Set ...)
« Last Edit: 18:40, 12 April 21 by Nemo59 »
CPC 6128+ / CPM+/ Turbo PASCAL v3
https://cpcrulez.fr/auteur-nemo59.htm

Offline Nemo59

  • CPC464
  • **
  • Posts: 29
  • Country: fr
  • CPC6128+
  • Liked: 60
  • Likes Given: 26
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #1 on: 23:23, 11 April 21 »
Hi All, I pushed the version 1.01on the google drive below. It replace the v1.0.


v1.01  adds :


- Save and load file ( Ctrl S / Ctrl L)
- Improved copy rectangular block of bitmap ( Ctlr Copy / Shift Copy). Rectangular selection with RETURN and the cursor position. Shift RETURN hides the cursor mark. You can copy  between animations pictures for the same sprite or in another File 
- Improved circle
- Some cosmetics things

If someone use a mouse on CPC i'm aware to know how it works. I've no mouse on my CPC+ and just test this aspect with WINAPE.


Note that you may use ESC to exit the EDIT Sprite Windows. ESC also allows you to exit the program/
« Last Edit: 23:28, 11 April 21 by Nemo59 »
CPC 6128+ / CPM+/ Turbo PASCAL v3
https://cpcrulez.fr/auteur-nemo59.htm

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.599
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1230
  • Likes Given: 2901
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #2 on: 16:02, 13 April 21 »
use setdef c,a


BTW: Cool that you use CP/M Plus for it.  :D
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.05.24)

Offline Nemo59

  • CPC464
  • **
  • Posts: 29
  • Country: fr
  • CPC6128+
  • Liked: 60
  • Likes Given: 26
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #3 on: 16:28, 13 April 21 »
New version in progress ( one week hollidays ;D ) . I now use binaries files for load (Ctrl L) and save (Ctrl S) the sprites (new .spr format as 'native' format). Ascii files are now produced with  Import (Ctrl I) and Export (Ctrl L) commands. Binaries files are much much faster ( specialy with animated big sprites). Some other speed improvments too. I will use this new version heavily for a quick and dirty game and will publish the v1.1 as a major improvment after all these tests.


If someone has a cpc+ with a mouse, i'm very curious to know if it works fine or not on a real hardware. No mouse on my cpc+ ;D 
« Last Edit: 16:33, 13 April 21 by Nemo59 »
CPC 6128+ / CPM+/ Turbo PASCAL v3
https://cpcrulez.fr/auteur-nemo59.htm

Offline Nemo59

  • CPC464
  • **
  • Posts: 29
  • Country: fr
  • CPC6128+
  • Liked: 60
  • Likes Given: 26
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #4 on: 13:54, 16 April 21 »
Version 1.02 now available in attached file.

Improvment :
- Use binary  format .spr. Far much faster

- Export and import in ascii file (Pascal format but easy to change)


Tp-Sprite is a hardware sprite editor for CPC6128 +. It allows you to create animated sprites up to 48x48 pixels. the software works in CPM +. To launch it: TPSPRITE displays a help page (in French) and opens the "default.spr" sprite. TPSPRITE NAME creates or modifies the NAME file. SPR. To move in the menus use Control arrow, to modify values use the arrows. Ctrl L: Load binary file, Ctrl S: save binary. You can export the sprite files in ASCII mode commented with Ctrl E (export).

- 4096 couleurs
- AMX Mouse allowed
- Animated sprite
- 16x16 or mutiple of 16x16
- copy-paste in/between sprites and animations
- Fill
- Circle
- rectangle
...

Next version in progress : Export windows rectangle for usage else than hardwre sprite
« Last Edit: 15:18, 16 April 21 by Nemo59 »
CPC 6128+ / CPM+/ Turbo PASCAL v3
https://cpcrulez.fr/auteur-nemo59.htm

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 828
  • Country: gb
  • Liked: 313
  • Likes Given: 490
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #5 on: 14:13, 16 April 21 »

I believe the problem with Plus animated sprites is you need to write 256 bytes to ASIC memory to update a single sprite frame, if you use a generic sprite animation routine. So you can't update many sprites per frame - hence many games used sprites for static scenery (switchblade).

Is there an option to export an animated sprite stored as a keyframe + set of animation differences (z80 code to update only the altered pixels) for the full animation loop? Or maybe that's best left up to the programmer to get best results for particular games...

Offline Nemo59

  • CPC464
  • **
  • Posts: 29
  • Country: fr
  • CPC6128+
  • Liked: 60
  • Likes Given: 26
Re: Hardware sprite editor for Amstrad CPC6128+
« Reply #6 on: 14:30, 16 April 21 »
Hi, in my opinion, its not really a big problem in most cases.
For example, in those videos :


https://youtu.be/TICFUyjkt0U

Or this (those videos are at exact  CPC+ speed) :

https://youtu.be/iKuFmrqHIa0b


And an extreme example with a 64x64 hdw sprite (4kB)  which show the cpc6128+ memory ;D

https://youtu.be/nlcE3Jrmqa4

Those are the most defavorable cases. In most cases you need only to change few pixels between two animations and not necessery at each frame.  Change few pixels dont take much more time than change a vector.
And you can also have the animation in the ASIC (for exemple 4 hardwares sprites  16x16 pixels with each 4 animations takes quite no cpu time (and no ram space, only the ram of the Asci) , just x y positions and zomm  to change). Take Antiriad for example, how many sprites on the same screen? 4? 5? no more I think.

Quote
"Is there an option to export an animated sprite stored as a keyframe + set of animation differences (z80 code to update only the altered pixels) for the full animation loop? Or maybe that's best left up to the programmer to get best results for particular games...
"

Not at this time. My final project is an adventure text game wth graphics and animations, so it s not a priority but I will think of this. It would be interesting only if it s much faster than a LDDIR command. But it would be interesting also in the point of view of data size. Here it's not optimiszed at all. I ve the idea of line command program for this like "Compact sprite"...
« Last Edit: 16:10, 16 April 21 by Nemo59 »
CPC 6128+ / CPM+/ Turbo PASCAL v3
https://cpcrulez.fr/auteur-nemo59.htm