Diving into the ZX Spectrum?

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
User avatar
Alp
Posts: 223
Joined: Mon Oct 06, 2014 12:37 am

Re: Diving into the ZX Spectrum?

Post by Alp »

tokumaru wrote:I'm interested! :P

I think the Atari 2600 has a lot of charisma too. It was often badly underused back in the day, but its limitations can be really fun to get around, and the results can look very impressive if you know what you're doing.
Agreed! My demo is only 267/4096 bytes so far, and I only need to add a few more features, before I'm satisfied with the results.
I haven't coded the status bar at all, yet. It's just an empty kernel, waiting for 16 lines.

It's somewhat of a port of my cancelled Cat Quest game for the NES. I figured I'd make the NES scene look like a bunch of chumps, by making a superior game, on "inferior" hardware! :P

This is the planned title screen, using a sprite-based kernel, in several separate loops:
Image

I have a decent handful of sprites made, too:
Image

...and, I've experimented with scanline coloring: (I haven't decided if I like it, yet)
Image

A concept for the dragon boss:
Image

My playfield kernel has 2 layers (1 tile block, every 2nd line), so a complex scene like this, is easily possible:
Image
tokumaru wrote:Best looking Intellivision game ever.

Sorry if I'm sounding a little negative when talking about the Spectrum. It's not my intention to bash it or dissuade anyone from coding for it. I just think that there are way more interesting designs out there. But hey, people fall in love with consoles and computers for different reasons, so if you really feel a connection with the Spectrum for whatever reason, go for it. I mean, most people in the real world think that all of these machines are worthless, but that doesn't stop us from working with them.
Well, that's funny, that honor actually went to the Intellivision game that recycled some of my art assets! :P
(I opted out of receiving credit for my work, so I won't bother linking to that particular game.)

I'm not trying to be negative about the Spectrum, either. It's just as a programmer with a fascination with creating visuals on older hardware, the color clash just feels like it's too much. There's similar consoles, that simply handle the colors better.
Drag wrote:Also, while we're talking about the MSX, I shared this screenshot a long time ago, but there's something I did that nobody noticed (probably because nobody had any reason to look for it):
[attachment MOTOMODO-3.png]
The background is MSX compatible, it just needs colors from the MSX palette.

[attachment motomodo_tiles.png]
It was a fun exercise, and I did it because I wanted to eventually test out if these "1bpp" graphics would compress better than the same graphics done in proper 2bpp, but I never got that far.
Those tiles look pretty good! I forget the MSX restrictions exactly-- but can't you switch the two colors, for every 8x1 slice?
It'd be interesting to see some extra color thrown into these tiles, to show off the hardware's abilities!
OmegaMax wrote:Not trying to derail this thread but Alp do you have anymore screen/mockups for intellivision?
Oh, sure I have a few! A port of my (cancelled) Cat Quest game, and a Dragon Quest-like RPG.
I did have a Mario-like platformer too, but I can't seem to find it? Oh well...

Both of these are rough, and unpolished, because I settled with developing the other game, shown above. (which was scrapped anyways, but whatever.)
TjvqC4I.png
TjvqC4I.png (16.47 KiB) Viewed 297 times
CKrzdid.png
CKrzdid.png (15.16 KiB) Viewed 297 times
[moderator: attached images from local cache]
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by Drag »

There are a couple of different modes you can use in the character mode, but the one everyone thinks of is the one with the highest resolution; Each row of a character can only have 2 colors, but they can be any two colors out of the entire TMS9918 palette. Therefore, there's no attributes or anything, color is tied to the characters themselves. However, sprites are strictly single-color 1bpp, and there's no ability to flip tiles. You can create multi-colored sprites by overlaying several sprites on top of each other, but each sprite counts towards the scanline limit of 4 sprites. 4 sprites per scanline might not sound like much, but sprites are 16x16 only, so it's not much different from the NES. It'll really hurt if you do a multicolored player sprite though, but it's not terrible.

Anyway, the other character modes are things like 6x8 monochrome mode (text mode), and a mode where the whole of each character can only have 2 colors, and then modes where entire groups of characters can only have 2 colors, all of this takes up variable amounts of memory.

ZX Spectrum limits are interesting too; it's similar to a character map, except instead of having a bank of characters and then a nametable, you define the graphics of each character right in the map itself. The end result is a strangely-laid-out framebuffer: out of 13 bits, bits 0-7 determine the character position, 8-10 determine which of the 8 rows inside that character, 11 and 12 determine which third of the screen to draw on (the top, middle, or bottom; remember, there's more than 256 tiles on a screen), and the remainder is the infamous attribute table; 3 bits (BRG) for foreground color, 3 bits (BRG) for background color, 1 bit for "bright" (FG and BG have the same "bright" always), and 1 bit for blink (FG and BG colors swap at a regular interval), and each byte represents one 8x8 character on the screen.

Atari computer graphics are unlike any system I've ever seen before; you determine what goes on each scanline of the screen. Your kernel consists of commands like "read 32 bytes and output 256 pixels (or 128 4-color "fat" pixels) for this scanline", "read 16 bytes and output two scanlines of 128 2x2-sized pixels", "read 32 bytes and output 32 8x8 characters using graphics from the table at [address]", and so on until you've constructed an entire screen. I don't know if you also have branches and loops, but you basically customize the exact way you want to use the video memory. Considering the way you have to drive the 2600's TIA, just imagine that there's a DMA-style secondary circuit that automatically writes to the TIA's registers every scanline, and you've basically got the idea behind Atari computer graphics. Another fun note is that each sprite is actually a column that spans the entire height of the screen, so moving your player sprite left and right is a simple register write, but moving up and down requires redrawing the whole sprite.

I could go on and on because I did loads of this kind of research a couple of years ago. :D With all the information I've run across, I can say that programmers of the NES had it well off, with all of the features it makes available.

Also, don't worry about derailing, as long as we're all geeking out about this kind of stuff, I'm fine with it. :D After all, it is relevant.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Diving into the ZX Spectrum?

Post by tokumaru »

Alp wrote:I haven't coded the status bar at all, yet. It's just an empty kernel, waiting for 16 lines.
The good thing about status bars is that you can go a little wild, changing patterns and colors mid-scanline and the like.
It's somewhat of a port of my cancelled Cat Quest game for the NES.
Looks great! I remember seeing a little of it over at AtariAge. I'm not so sure about it being superior to the NES version though... :wink:
...and, I've experimented with scanline coloring: (I haven't decided if I like it, yet)
I personally prefer colored sprites... flat sprites look to me like stand-ins or placeholders for the game objects rather than actual objects.
It's just as a programmer with a fascination with creating visuals on older hardware, the color clash just feels like it's too much. There's similar consoles, that simply handle the colors better.
I'm the exact same.
I forget the MSX restrictions exactly-- but can't you switch the two colors, for every 8x1 slice?
It'd be interesting to see some extra color thrown into these tiles, to show off the hardware's abilities!
If I understood correctly, these are actually NES graphics, mimicking MSX graphics, which means they have to abide by the limitations of both machines, a common denominator between the TMS9918 and the 2C02.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by Drag »

You're correct, those are NES graphics but also with the MSX's 1bpp limitation thrown in. Instead of having 16 colors to choose from for each row, I only had 4, plus the NES's attributes.

I differ from you two because the color clash seems like it's an interesting thing to work around, and there's plenty of examples of good graphics on the Speccy, so there's enough inspiration to draw from. The big thing I'd be after is the community; there's so many people that hold the ZX dear to their hearts, and I actually agree with the original intent behind the ZX series: to introduce computing and programming (to some degree) to the mainstream. Without all of the "heart" behind the machine, it really is just a lump of old plastic with nasty graphical limitations (and the same can be said of the NES). ;)

I enjoy nice visuals too, but I also have a fair amount of left-brain activity whenever I do something graphics related, which might've come from all of the research I did on my palette generator, but basically, you don't have an expansive palette to work with on the ZX. You don't even have a good gray, it's just white and bright white. Therefore, you've got to find some other way to convey your idea. You can look at the colors and take them at face value, or you can look past them and figure out what else they can help you achieve, if not just plain color. :P

And then it can get all smeary and gross when the player walks past as attribute clash takes over. :D But you know, there were countless other developers who went through that pain as well and don't seem worse off for it.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Diving into the ZX Spectrum?

Post by tokumaru »

Drag wrote:And then it can get all smeary and gross when the player walks past as attribute clash takes over. :D
Yeah, that's what kills it for me. I don't mind a little color clash on the background, there actually are some decent static Spectrum graphics out there. The problem is how you just can't have objects moving around without affecting the colors of their surroundings, or looking somewhat transparent because they assume the background colors. These things screw up our depth perception and are terribly distracting. If anyone knows of other techniques to make object movement less awkward on the Spectrum, I'd love to hear about it and see some screenshots/videos.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Diving into the ZX Spectrum?

Post by thefox »

I think some homebrew ZX Spectrum games look pretty nice considering the limitations:

MultiDude: https://www.youtube.com/watch?v=HAe2OWNocRI
DreamWalker: https://www.youtube.com/watch?v=uyGYBkxbnmI (you might recognize this one)

Attribute clash used to bother me too, but after watching a bunch of ZX Spectrum stuff on YouTube I've grown to appreciate the platform, with all its quirks and clashes. Never tried to develop anything for it (so far).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Diving into the ZX Spectrum?

Post by rainwarrior »

I remember seeing a ZX game that just put a wide black outline around all its sprites to cover the attribute clash. (Can't remember the name.) That technique has its own limitations though.

Stormlord got around attribute clash just by not really having decorative backgrounds (instead filling that space with some stars) and some very rigid grid collision. Aside from the "stars" effect, it seems really straightforward how it keeps things mostly clean looking.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by Drag »

thefox wrote:I think some homebrew ZX Spectrum games look pretty nice considering the limitations:

MultiDude: https://www.youtube.com/watch?v=HAe2OWNocRI
DreamWalker: https://www.youtube.com/watch?v=uyGYBkxbnmI (you might recognize this one)

Attribute clash used to bother me too, but after watching a bunch of ZX Spectrum stuff on YouTube I've grown to appreciate the platform, with all its quirks and clashes. Never tried to develop anything for it (so far).
Both of these games use a trick similar to what the MMC5 does to get 8x8 attributes: The video circuit re-reads each attribute byte every scanline, so if you overwrite the attribute byte every scanline, you can bypass the 8x8 limit and cut it down to 8x1. These games are overwriting an entire row of attribute bytes over the course of 2 scanlines. On 128k models and later, there's a shadow screen which is basically like a second framebuffer you can switch back and forth from, so it's preparing the updated scanline offscreen and then flipping to it for a clean screen split. I don't know how this is being done on the 48k model, it might just be chasing the beam (like on a 2600). Either way, since this is one huge cycle-timed raster effect, it ties the CPU up for most of the frame. :\ It looks very impressive though.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by Dwedit »

We should split this thread since the Intellivision mockups look seriously amazing.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
joezx
Posts: 2
Joined: Tue Mar 12, 2019 2:31 am

Re: Diving into the ZX Spectrum?

Post by joezx »

Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by Drag »

Sorry it's taken me so long to respond, but unghhhh, I'm super interested in those techniques, thank you for sharing! :D

I don't have the sudden urge to go out and impulse-buy a ZX Spectrum anymore, but it's still in the back of my head as something I'm interested in, if I could somehow put myself into the position where I have lots of free time to tinker around with things like this, like how I was back in college.
User avatar
greatkreator
Posts: 49
Joined: Wed Dec 09, 2015 2:18 pm

Re: Diving into the ZX Spectrum?

Post by greatkreator »

Even Sir Clive Marles Sinclair against it!
Sorry I can't find the exact words.
Someone asked him about his regrets and he answered that Spectrum hasn't been designed for gaming at all.
"It was intended to be a computer for useful work but not useless gaming."
That's why it has such terrible graphics.
Its video system was intended to display text graphics and maybe some graphs, charts, diagrams at most.
It seems someone in the UK didn't have another option how to play games and started to use a wrong tool for that.
It's hard to find another computer/video game console that produced such disgusting graphics.
Acid colours, disgusting contagious 8x8 colour attributes, low frame rate. No sound as well.
It was just a mistake.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Diving into the ZX Spectrum?

Post by nocash »

Low frame rate?
homepage - patreon - you can think of a bit as a bottle that is either half full or half empty
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Diving into the ZX Spectrum?

Post by tepples »

As I understand it, the ZX Spectrum's video memory is a dumb frame buffer, with no tilemap, scrolling, or sprite functionality. Needing to do all these in software tends to reduce frame rate compared to platforms that have these features, such as Commodore 64 and MSX.
User avatar
greatkreator
Posts: 49
Joined: Wed Dec 09, 2015 2:18 pm

Re: Diving into the ZX Spectrum?

Post by greatkreator »

Exactly! The effective frame rate is very low because everything is done in software.
And that's actually another tip from Speccy telling you: it's the wrong tool.
At the end of the day you can't even blame Speccy for its ugly graphics! Because (once again) it wasn't made to be used for gaming at all.

By the way it was my first computer.
I can't forget the feeling when I saw NES along with Speccy for the first time. It was an epic jaw drop.
I don't have any positive retro feelings for Speccy. It was just ugly. I used it because I didn't have any other option.
Post Reply