First Demo from My New Programming Language, Elena

Show us your work, thrill and amaze us :)

Moderator: Programming Moderators

User avatar
SevenFFF
Posts: 221
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: First Demo from My New Programming Language, Elena

Post by SevenFFF » Mon May 07, 2018 10:02 pm

I've been working with 256-colour 8-bit images in Photoshop, and can assist if you need. I know nothing about GIMP though. In Photoshop you can either work with natively 8-bit indexed images, or work in full RGB24 then use colour tables to quantize them at the point you save. It seems likely the GIMP would be similar.

Image

I don't believe you'll get any off-the-shelf application to understand 9-bit colour images and do the colour quantization for you. But you can easily make a 512 colour palette and use that to draw in Photoshop or GIMP. I'm sticking to 8-bit colour for the moment, as I'm converting an existing arcade game.

It's not directly related, but this is a very interesting article:

http://danfessler.com/blog/hd-index-pai ... -photoshop

David Saphier has also written a very useful Next sprite editor, which will import any images, quantize to 256 colours, and split up into 16x16 tiles.

https://www.specnext.com/udgee-sprite-editor/

I tend to write my own image-processing code in a higher-level language if I need something specific. This is pretty straightforward. All you need to do is open the image, have a pair of nested loops for Y and X coordinates, and read the colour index or the #RRGGBB colour. You can convert #RRGGBB 24-bit <> %RRRGGGBB 8-bit <> %RRRGGGBBB 9-bit colours really easily, using bit truncation or concatenation.

It's also easy to open an animated gif, and sample colours at a fixed point in every frame. I'm using this technique to record anigifs from MAME and extract palette cycling info from them.

If you know C#, I can give some pointers for this too.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: First Demo from My New Programming Language, Elena

Post by KevB » Tue May 08, 2018 2:02 am

Interesting thread.
MrKWatkins wrote:
Mon May 07, 2018 7:55 pm
No worries. Out of interest how are you coding for the MegaDrive? Assembly or C or some other language?
If you interested, I used PSY-Q and SNASM development hardware for Megadrive - 100% assembler.
SevenFFF wrote:
Mon May 07, 2018 10:02 pm
I don't believe you'll get any off-the-shelf application to understand 9-bit colour images and do the colour quantization for you.
SevenFFF wrote:
Mon May 07, 2018 10:02 pm
I tend to write my own image-processing code in a higher-level language if I need something specific.
I'm currently working on NextPaint, a Windows tool written in x86 and skinned to look like it runs on the ZX Spectrum lol that works directly in RGB333 to aid my game development. It's a quick and dirty application that edits the game data directly so I doubt it will be available to the public as it would require too much work to provide a fully integrated operating system version. Priority is game dev. I find Photoshop hard work for pixel art especially as the Next uses 9bitcolor. I used Deluxe Paint back in the day but that's well out of date now so I needed something to bridge the gap that I could maintain and tweak to speed up my workflow.

Good luck with Elena :)
NextPaint WIP 8th May 2018.png
NextPaint WIP 8th May 2018.png (227.79 KiB) Viewed 1503 times
EDIT: The Chaos Engine graphics are being used as test data - I'm not writing a Next version lol
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
SevenFFF
Posts: 221
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: First Demo from My New Programming Language, Elena

Post by SevenFFF » Tue May 08, 2018 2:59 am

Looks great, Kev!

Also watching Selena with interest. Nice one, MrK :)
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: First Demo from My New Programming Language, Elena

Post by KevB » Tue May 08, 2018 11:10 am

Cheers *Robin*. Lots of great things are happening across the Spectrum Next community. Everyone has their own little corner :)

EDIT: Slight dyslexia on my part there - I'll get your name right next time... Steven tut tut lol
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

SamusDrake
Posts: 250
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First Demo from My New Programming Language, Elena

Post by SamusDrake » Tue May 08, 2018 6:37 pm

After trying out Gimp, I'm thinking of writing a cmd-line tool to convert a standard bitmap into a palette bmp file. Either that or a nice little java app with bells and whistles...

NextPaint looks the bees-kness. ^_^

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: First Demo from My New Programming Language, Elena

Post by KevB » Tue May 08, 2018 6:43 pm

SamusDrake wrote:
Tue May 08, 2018 6:37 pm
After trying out Gimp, I'm thinking of writing a cmd-line tool to convert a standard bitmap into a palette bmp file. Either that or a nice little java app with bells and whistles...
I started using my own command line tools back in January. TGA2NEXT did a lot of my conversion work but it became a problem in the end as I kept writing extra modules to process specific or weird data and I still had to view the output somehow by loading it back into Photoshop. A Paint Package makes life easier. If you can develop a Java app to do the work for you then that should help in the long run.

Thanks for the feedback.
Last edited by KevB on Tue May 08, 2018 6:44 pm, edited 1 time in total.
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
SevenFFF
Posts: 221
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: First Demo from My New Programming Language, Elena

Post by SevenFFF » Tue May 08, 2018 6:43 pm

KevB wrote:
Tue May 08, 2018 11:10 am
EDIT: Slight dyslexia on my part there - I'll get your name right next time... Steven tut tut lol
lol, I just thought it was a play on StevenFFF :D
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: First Demo from My New Programming Language, Elena

Post by KevB » Tue May 08, 2018 6:46 pm

SevenFFF wrote:
Tue May 08, 2018 6:43 pm
lol, I just thought it was a play on StevenFFF :D
At a quick glance, "Seven" reads like "Steven" :)
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
SevenFFF
Posts: 221
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: First Demo from My New Programming Language, Elena

Post by SevenFFF » Tue May 08, 2018 6:55 pm

I also typed Selena instead of Elena, somehow. Mercury in retrograde?!
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: First Demo from My New Programming Language, Elena

Post by KevB » Tue May 08, 2018 7:12 pm

SevenFFF wrote:
Tue May 08, 2018 6:55 pm
I also typed Selena instead of Elena
I kept quiet about that ;)
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

Post Reply