Author Topic: Amstrad CPC newbie graphic mode questions  (Read 1453 times)

0 Members and 1 Guest are viewing this topic.

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Amstrad CPC newbie graphic mode questions
« on: 22:42, 30 September 19 »
 Hi guys! I'm pretty much completely new to the Amstrad CPC. I started out with the C64/128 back in the day but I've become really interested in most old home computers and their homebrew scenes.

What I've seen so far there seems to be a lot of fun new homebrews for the CPC and the graphics / color palette is unique. The unique "personality" and graphics is one thing I really like about these old 8-bit computers (and consoles), you can usually tell right away if a game is for example on the CPC, Speccy or C64 etc.

I was looking to do some CPC mock up pixel art for starters, so I was hoping someone could kindly help me out a little bit.
I tried to read about the different Amstrad CPC graphic modes here: www.cpcwiki.eu/index.php/Video_modes
But I can't really find anything about any typical 8-bitter restrictions. Can you really color each pixel on the screen whatever color you want from a 16 color palette (like on the Atari ST and Atari Lynx for example)? No building up the graphics from "4x8 text cells" with individual color restrictions like on most other 8-bit computers or something similar?

Also what is the most commonly used graphics mode in games? I'd want to know what mode is really characteristic for the Amstrad CPC? Just from reading I would guess Mode 0 (160×200 pixels with 16 colors)? Most CPC games I've seen have been really colorful and with the chunky 2x1 pixels.

Thanks in advance for any help!

Offline RichTW

  • CPC464
  • **
  • Posts: 26
  • Country: es
  • Liked: 15
  • Likes Given: 12
Re: Amstrad CPC newbie graphic mode questions
« Reply #1 on: 22:59, 30 September 19 »
Seems to me that most games that were written to take full advantage of the CPC hardware use Mode 0.  The ones which were lazily ported from the Spectrum tend to be Mode 1.

I think Paperboy demonstrates the situation quite well:

Paperboy CPC


Paperboy CPC (ported from Spectrum, unreleased)


I love the CPC's Mode 0 graphics, and the palette is superb.  It's a pure bitmap screen, so no colour attributes or restrictions on the number of colours within a 4x8 block.  The only restriction is having to choose 16 colours from the palette of 27.  By changing the palette midscreen, you can almost certainly display all of them at once.

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 853
  • Liked: 409
  • Likes Given: 72
Re: Amstrad CPC newbie graphic mode questions
« Reply #2 on: 23:02, 30 September 19 »

But I can't really find anything about any typical 8-bitter restrictions. Can you really color each pixel on the screen whatever color you want from a 16 color palette (like on the Atari ST and Atari Lynx for example)? No building up the graphics from "4x8 text cells" with individual color restrictions like on most other 8-bit computers or something similar?



Yup. The CPC display is a pure palette based bitmap. Every pixel can be whatever of your 16/4/2 (Mode depending) colour palette entries you want without any further restrictions.

Also what is the most commonly used graphics mode in games? I'd want to know what mode is really characteristic for the Amstrad CPC? Just from reading I would guess Mode 0 (160×200 pixels with 16 colors)? Most CPC games I've seen have been really colorful and with the chunky 2x1 pixels.



Usually Mode 0 or Mode 1. Mode 1 is very common for ports from the Speccy, though there are a few examples of it being used to better effect than merely mimicking the Speccy's basically monochrome display, Head Over Heels is quite a nice example.


Personally I think good Mode 0 graphics can look much nicer on the whole.
« Last Edit: 23:06, 30 September 19 by andycadley »

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #3 on: 23:19, 30 September 19 »
Hey, thanks so much for the kick-start guys! Wohoo! This is exactly what I need for getting started with some pixel tests. :)

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.298
  • Country: au
    • index.php?action=treasury
  • Liked: 953
  • Likes Given: 1063
Re: Amstrad CPC newbie graphic mode questions
« Reply #4 on: 08:45, 01 October 19 »
Check out some beautiful games like Gryzor, Renegade, Savage and Trantor to get an idea of what is possible in mode 0.
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #5 on: 09:14, 02 October 19 »
Thanks for the examples ervin!

I started wondering about how graphics are typically handled in a cpc game then, if there's no character graphics. I guess you don't redraw the whole screen at least? Maybe you use a tile system of some sort and then you only redraw the tiles that need to animate/change?

Are there some popular/"standard" CPC specific windows/cross development graphics tools that are used for game graphics creation and export to code?

Also I noticed a few of the new nice looking homebrew games had quite a big HUD (static score panel and such). This results in a smaller "viewport" which is probably a "trick" to get better movement and/or scrolling? Less things to move around? It was used in a few flick-screen platformers though which surprised me a little, one would think it would mainly be needed for scrolling games.

« Last Edit: 09:18, 02 October 19 by Mozartkügel »

Offline GOB

  • Supporter
  • CPC6128
  • *
  • Posts: 159
  • Country: fr
  • Liked: 149
  • Likes Given: 110
Re: Amstrad CPC newbie graphic mode questions
« Reply #6 on: 12:16, 02 October 19 »
For answer:
Try in Basic:
out &bc00,13:out &bd00,x
x is a value. 0 at start, you can increase it ;)
It's the hardware scroller on old CPC.  You can scroll all screen but by 2 bytes...
If you want to make better you have to use two screens with 1 bytes shift and alterne them.
There is others technique to make better than an byte shift, but it's not really easy and limited.
On CPC+ (6128+/464+/GX4000), you can make shift pixel scrolling in hardware, so no problem on it.

Offline SpDizzy

  • CPC464
  • **
  • Posts: 37
  • Country: es
  • Liked: 17
  • Likes Given: 22
Re: Amstrad CPC newbie graphic mode questions
« Reply #7 on: 13:21, 02 October 19 »
Are there some popular/"standard" CPC specific windows/cross development graphics tools that are used for game graphics creation and export to code?
Yes, there are a bunch of tools for that.

You can try this thread for example:
http://www.cpcwiki.eu/forum/general-discussion/tools-for-creating-graphics/
On my side, I usually work with GIMP or even Photoshop, and save images as .png format.For the code and the heavy lifting, #CPCTelera framework. It does automatic export of images to code for graphics, and much more stuff, as a low level game development framework.
Quote
I started wondering about how graphics are typically handled in a cpc game then, if there's no character graphics. I guess you don't redraw the whole screen at least? Maybe you use a tile system of some sort and then you only redraw the tiles that need to animate/change?
Yes, this is true for almost any platform, not just the Amstrad CPC. On most cases, for performance and speed, just redraw only what has changed between frames. The tile system is the most logic and memory saving approach for that
« Last Edit: 13:38, 02 October 19 by SpDizzy »

Offline MoteroV4

  • CPC464
  • **
  • Posts: 3
  • Country: es
  • Liked: 1
  • Likes Given: 1
Re: Amstrad CPC newbie graphic mode questions
« Reply #8 on: 22:22, 03 October 19 »
Most graphic designers hate the pixel size of Mode 0 but they thank its colors. So,you also have good examples of games for Amstrad made in Mode 1 (4-color palette) at 320x200pix, as follows:
-La Abadía del Crimen-Sol Negro-Thundercats
-Highway Encounter-Flying Shark-Bob Winner-Prohibition
« Last Edit: 22:25, 03 October 19 by MoteroV4 »

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.235
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 992
  • Likes Given: 2275
Re: Amstrad CPC newbie graphic mode questions
« Reply #9 on: 22:50, 03 October 19 »
Actually, The Abbey of Crime only uses 256x192, inside the 320x200 mode 1.

Offline GOB

  • Supporter
  • CPC6128
  • *
  • Posts: 159
  • Country: fr
  • Liked: 149
  • Likes Given: 110
Re: Amstrad CPC newbie graphic mode questions
« Reply #10 on: 00:13, 04 October 19 »
Most graphic designers hate the pixel size of Mode 0 but they thank its colors. So,you also have good examples of games for Amstrad made in Mode 1 (4-color palette) at 320x200pix, as follows:
-La Abadía del Crimen-Sol Negro-Thundercats
-Highway Encounter-Flying Shark-Bob Winner-Prohibition
Not because they don't like pixel size of mode 0 but because these games are speccyport (and it's also the reason of the 256*192 screen size).

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.235
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 992
  • Likes Given: 2275
Re: Amstrad CPC newbie graphic mode questions
« Reply #11 on: 08:45, 04 October 19 »
Interestingly enough, the CPC version is the original version of the Abbey, but I guess they had in mind porting it to Spectrum and MSX and thus restricted themselves to 256x192.

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #12 on: 15:55, 04 October 19 »
Thank you very much for the help and links again guys!

Most graphic designers hate the pixel size of Mode 0 but they thank its colors.


I get it that some probably don't like it, but I grew up with the C64, so I loooove "chunky pixels" on the CPC, C64 and Atari 8-bit computers! <3  ;D I do like hi-res 8-bit games with fewer colors too, for example Speccy games, but the "multicolor" modes with wide pixels are closest to my heart.

The thing I love about the Speccy is its crazy garish Text TV/teletext color palette and that the homebrew scene seems very playful, creating a lot of humorous and cartoony games.

I can imagine the frustration back in the day though if there was a lot of straight speccy ports on the CPC although the CPC had much better color capabilities.
« Last Edit: 16:03, 04 October 19 by Mozartkügel »

Offline MoteroV4

  • CPC464
  • **
  • Posts: 3
  • Country: es
  • Liked: 1
  • Likes Given: 1
Re: Amstrad CPC newbie graphic mode questions
« Reply #13 on: 18:32, 04 October 19 »
Thank you very much for the help and links again guys!
 

I get it that some probably don't like it, but I grew up with the C64, so I loooove "chunky pixels" on the CPC, C64 and Atari 8-bit computers! <3  ;D I do like hi-res 8-bit games with fewer colors too, for example Speccy games, but the "multicolor" modes with wide pixels are closest to my heart.

The thing I love about the Speccy is its crazy garish Text TV/teletext color palette and that the homebrew scene seems very playful, creating a lot of humorous and cartoony games.

I can imagine the frustration back in the day though if there was a lot of straight speccy ports on the CPC although the CPC had much better color capabilities.
I'm glad you appreciate art there under the "chunky pixels".
I have a low level of English, perhaps I exaggerated "designers hate", but the criticism I usually listen to my dear Amstrad are the "pixel brick" and jokes like that. I myself as a software developer I find it's hard to draw a sprite in Mode 1, which almost doesn't seem the original drawed on paper. Even worse in Mode 0. So I understand the difficulty encountered by a graphic designer to such limitations and appreciate their work.

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 697
  • Country: gb
  • Liked: 238
  • Likes Given: 354
Re: Amstrad CPC newbie graphic mode questions
« Reply #14 on: 19:06, 04 October 19 »
I love MODE 0, when the games use the full screen anyway, and the graphics are well designed. Some MODE 0 games were more garish than pretty, as if they were getting the worst of low resolution and poor colour choice and graphical design.


(However it doesn't look so hot on a large modern TV, I must admit.)


MODE 1 can be used well of course, and makes sense where you want detail above lots of colour.


Ultimately what games suffered from was limited graphical variation due to targeting the base configuration and its memory limitations and tape loading. The best looking games were often multiload hell as a result.

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 853
  • Liked: 409
  • Likes Given: 72
Re: Amstrad CPC newbie graphic mode questions
« Reply #15 on: 20:14, 04 October 19 »
Interestingly enough, the CPC version is the original version of the Abbey, but I guess they had in mind porting it to Spectrum and MSX and thus restricted themselves to 256x192.


Quite probably, although there are other technical advantages to a 256 pixel wide screen - as it aligns to a nice number of bytes that mean address calculations can sometimes be simpler.

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #16 on: 01:08, 06 October 19 »
I'm glad you appreciate art there under the "chunky pixels".
I have a low level of English, perhaps I exaggerated "designers hate", but the criticism I usually listen to my dear Amstrad are the "pixel brick" and jokes like that. I myself as a software developer I find it's hard to draw a sprite in Mode 1, which almost doesn't seem the original drawed on paper. Even worse in Mode 0. So I understand the difficulty encountered by a graphic designer to such limitations and appreciate their work.
I honestly love the graphics on systems with chunky pixels. Obviously it's a nostalgy factor there. A two pixels wide pixel is two times better than a normal single pixel! ;D ;) In my opinion it's easier to experiment in a drawing program that supports wide pixels than trying to draw on paper first, but yeah it can be hard to achieve what you want sometimes.

I love MODE 0, when the games use the full screen anyway, and the graphics are well designed. Some MODE 0 games were more garish than pretty, as if they were getting the worst of low resolution and poor colour choice and graphical design.

I was doing a CPC mock-up of my work in progress game project the other night and I noticed the CPC doesn't exaclty have the easiest palette. Pretty much only very saturated colors that makes it easy to loose contrast when all the colors compete with each other. Still this is the stuff I love about old computers, it makes them unique, and it's fun to work with the restrictions too.

Here's my mockup of my wip game project "Baron Lovejoy Travels in Time". (Sorry for twitter link, I didn't seem to have the rights to insert the attachment into the text)

https://twitter.com/Mozartkgel1/status/1180263528973905926?s=20

I think I might have gone a little against "CPC graphics convention" by not having a lot of dithering and details, but I did it for the sake of clarity/contrast and cartoon style (which I love).

I've been learning about the graphics and color modes for the old computers I mean to develop for in the future, but unfortunately it might take a long time before I can start on all the versions. I want too much with too little time (At the moment I have a small foundation for the game on C64, Vic-20 and Plus4).
« Last Edit: 22:26, 06 October 19 by Mozartkügel »

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #17 on: 10:55, 08 October 19 »
I love MODE 0, when the games use the full screen anyway, and the graphics are well designed.

Ultimately what games suffered from was limited graphical variation due to targeting the base configuration and its memory limitations and tape loading.

One follor up question if someone kindly could help me? So the more I look the more I find CPC games with a small "viewport" i.e. non-fullscreen games. Is this because sixteen colors on screen at the same time eats up a lot of memory on a standard (base config) 64k CPC? Or is there some other reason?

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 853
  • Liked: 409
  • Likes Given: 72
Re: Amstrad CPC newbie graphic mode questions
« Reply #18 on: 15:13, 08 October 19 »
The display takes up almost 16K. It's a lot of data to shift around for the Z80 and there isn't an enormous amount of hardware assistance (there are tricks but they have their own issues).  Reducing the viewport means less redrawing and is therefore a reasonable trade off in many situations.

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #19 on: 01:56, 09 October 19 »
The display takes up almost 16K. It's a lot of data to shift around for the Z80 and there isn't an enormous amount of hardware assistance (there are tricks but they have their own issues).  Reducing the viewport means less redrawing and is therefore a reasonable trade off in many situations.

Hey, thanks so much for helping out! 16K for the screen is indeed much. I'm starting to wonder if my mock-up is unrealistic. On the other hand not having scrolling at least should help. Perhaps it's possible to save space if you have many of the same tiles in a row (like the sky), some sort of simple packing? I see exomizer supports the CPC too so that can probably be used for such things.

At first I thought that if/when I start with the game for the CPC I would most likely want to target a base 64k CPC, but perhaps a 128k version would be ok if there's some popular cartridge with SD game loading and extra RAM readily available for the amstrad these days? Or maybe if you make a floppy based game you can load in new stuff whenever you want and 64k is "plenty"? I do love tape games/loading the most, but multi-load games on tape are perhaps not so sweet. ;D
« Last Edit: 02:42, 09 October 19 by Mozartkügel »

Offline RichTW

  • CPC464
  • **
  • Posts: 26
  • Country: es
  • Liked: 15
  • Likes Given: 12
Re: Amstrad CPC newbie graphic mode questions
« Reply #20 on: 13:30, 09 October 19 »
The problem is if you want smooth horizontal scrolling.  The CPC can do some great vertical scrolling with some hardware tricks, but horizontal scrolling is in units of 4 chunky pixels in Mode 0, unless you adopt some other tricks which don't work on all monitors, and/or use two screen buffers, one offset a pixel from the other.

Something like Stormlord looks amazing, but is done entirely with software scrolling, which basically involves needing to redraw the entire screen each frame.  So the viewport needs to be smaller otherwise the frame rate would be terrible.


Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 697
  • Country: gb
  • Liked: 238
  • Likes Given: 354
Re: Amstrad CPC newbie graphic mode questions
« Reply #21 on: 12:58, 10 October 19 »
Some games use push scrolling on the CPC, where a rapid chunky scroll when the character nears the edge of the screen is used. But you need to get the right position, so it's not triggered too early, or too late. Better if you don't pause everything during the scroll, even if it only takes 1s. I'd prefer a big screen + push scrolling to a small screen with constant software scrolling (which usually ends up with a 12fps game).


Yes, floppy really gives you 360KB of hassle-free game storage to play around with (which when combined with compression is a decent amount). But tape multi-load is less desirable! There are now some 'cart' systems for the old CPC but they're not so common as disk drives. For the plus of course you've got 512KB of directly mapped storage.


What is hard to do on the CPC is large screen + lots of background animation (unless you can use palette changing effects). But most background animation only needs to occur a few times a second, not every frame, so careful splitting of the animation workload over multiple frames can help a lot if you want spot animations (but it would look weird on (eg) a large waterfall if different water blocks fell on different frames, but still probably better than a static waterfall).


Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #22 on: 16:27, 15 October 19 »
Thanks again guys for helping me understand the CPC more clearly!

Some games use push scrolling on the CPC, where a rapid chunky scroll when the character nears the edge of the screen is used. But you need to get the right position, so it's not triggered too early, or too late. Better if you don't pause everything during the scroll, even if it only takes 1s. I'd prefer a big screen + push scrolling to a small screen with constant software scrolling (which usually ends up with a 12fps game).
I agree here, always nice with a big screen. Luckily I'm not going to do scrolling at all in this / my first game!  ;D


Yes, floppy really gives you 360KB of hassle-free game storage to play around with (which when combined with compression is a decent amount). But tape multi-load is less desirable! There are now some 'cart' systems for the old CPC but they're not so common as disk drives. For the plus of course you've got 512KB of directly mapped storage.

I realise targeting the plus would make sense in a lot of ways, but I'm kind of travelling backwards in time, loving the old 8-bitters, so targeting the base 64k system speaks to me the most after all. Also I just bought a 464 CPC partly because I really like its appearance the most of the CPC's. "Feeling" is big part of the "retro-experience" for me ;D I think I will save the CPC plus for later.

Also I realised that a physical release would still be one of the most fun goals (for me at least) if I manage a CPC version, so that kind of makes me think that a one-load tape version would make most sense, because C cassettes are readily available, and I love tape games. (I wonder how polyplay sourced disks for Magica for example?)

What is hard to do on the CPC is large screen + lots of background animation (unless you can use palette changing effects). But most background animation only needs to occur a few times a second, not every frame, so careful splitting of the animation workload over multiple frames can help a lot if you want spot animations (but it would look weird on (eg) a large waterfall if different water blocks fell on different frames, but still probably better than a static waterfall).

Hey thanks for the hints. I'm hoping that a full screen game would be possible if I use static screens and only move around a couple of things (player and a couple of "enemies"). Obviously things look more alive if you have a few "ambience" background stuff moving a little bit.

One thing that popped into my head is that how is it possible that there's no color clash on the cpc, since there's no hardware sprites? :o Is there some hardware feature for it, or is there some complicated programming involved?

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 697
  • Country: gb
  • Liked: 238
  • Likes Given: 354
Re: Amstrad CPC newbie graphic mode questions
« Reply #23 on: 17:29, 15 October 19 »
No colour clash because any pixel being displayed can be any colour within the palette and resolution constraints.


So 16 colours in MODE 0 can be in any pixel, no 'character' restrictions.


This costs memory, and rendering time.


You can increase colours with raster effects that does introduce restrictions, but I guess you won't need these initially. Usually used between play area and score area, and impressive static image display in MODE 1 with >4 colours.

Offline Mozartkügel

  • CPC464
  • **
  • Posts: 18
  • Country: fi
    • My Retro gamedev Twitter
  • Liked: 11
  • Likes Given: 18
Re: Amstrad CPC newbie graphic mode questions
« Reply #24 on: 16:47, 16 October 19 »
Hey thanks again man!

No colour clash because any pixel being displayed can be any colour within the palette and resolution constraints.

So 16 colours in MODE 0 can be in any pixel, no 'character' restrictions.

Nnngh, of course! :doh: Still I don't see it before me how to solve it in code. I guess I will find some examples or solutions when I get there.

This costs memory, and rendering time.
I can imagine that.

You can increase colours with raster effects that does introduce restrictions, but I guess you won't need these initially. Usually used between play area and score area, and impressive static image display in MODE 1 with >4 colours.

Yes I think 16 colors is pretty much the absolute maximum amount of colors any pixel art game really would ever need (because of the eye-catching "graphic design" possibilities of a limited palette).  ;D