CPCWiki forum

General Category => Other retro => Topic started by: DanyPPC on 08:52, 19 February 25

Title: [CPC vs ZX] Game speed
Post by: DanyPPC on 08:52, 19 February 25
Sorry if this object has already been treated, but I have a simple question:

Why CPC versions of ZX Spectrum games are a little slower ?

For example, Yesterday evening I played Flying Shark and it's slower than the ZX Spectrum version.

Thanks for your your time.
Title: Re: [CPC vs ZX] Game speed
Post by: pelrun on 09:13, 19 February 25
Because you have to write a lot more data to update a CPC pixel.

The spectrum can only have two colours in each character cell, because the graphics buffer is still monochrome. The CPC is full bitmapped colour, so each pixel can be anything. No "colour clash", but also updating a pixel requires writing 2 or 4x the number of bits.

Speccy ports don't take advantage of the better colour resolution, and they're hobbled by the need to spend more time updating pixels. And the programmers were rarely given the time or money to optimise the port, it was a case of "do the bare minimum to make it work and get the game out the door".
Title: Re: [CPC vs ZX] Game speed
Post by: overange on 09:17, 19 February 25
Quote from: DanyPPC on 08:52, 19 February 25Sorry if this object has already been treated, but I have a simple question:
Why CPC versions of ZX Spectrum games are a little slower ?
For example, Yesterday evening I played Flying Shark and it's slower than the ZX Spectrum version.
Thanks for your your time.


Many Amstrad CPC games were essentially direct ports from the ZX Spectrum, rather than being optimized for the CPC's hardware. Since the Spectrum used a more straightforward memory architecture and screen layout, games designed for it didn't always run efficiently on the CPC. Instead of rewriting the code, developers often took shortcuts to save development time.

During the 8-bit era, the ZX Spectrum was often the primary development platform because of its popularity. The CPC was seen as a secondary platform, and developers didn't always take the time to optimize performance when porting games over.

If developers had taken more time to optimize CPC ports, they could have performed better, but tight deadlines and budget constraints usually led to simple, unoptimized conversions.

Title: Re: [CPC vs ZX] Game speed
Post by: eto on 09:35, 19 February 25
Quote from: DanyPPC on 08:52, 19 February 25Why CPC versions of ZX Spectrum games are a little slower ?
There's a whole Wiki article dedicated to the problems of Speccy ports. I can highly recommend reading it: 

https://www.cpcwiki.eu/index.php/Speccy_Port
Title: Re: [CPC vs ZX] Game speed
Post by: arnoldemu on 09:43, 19 February 25
Perhaps the following doc I made when I converted Mayhem might give an idea:

https://www.cpc-power.com/index.php?page=detail&onglet=notices&num=18884

It is heavy in detail but the main one is often there are more bytes to draw to the screen. It also highlights that I couldn't use the same approach in some places and had to re-write parts for the CPC (one of these is the HUD where the attribute bytes were changed to colour the HUD, here I had to draw more bytes for the CPCs representation.

The approach I took here is comparable to an independent conversion from zx to cpc. This approach is different to many game companies where the same coder was working on both the Spectrum and CPC versions with the game play code shared and the drawing functions were changed to suit each. With this approach they would have their own code library of functions to use and often use common methods for e.g. random numbers.

Title: Re: [CPC vs ZX] Game speed
Post by: arnoldemu on 09:49, 19 February 25
Adding to this. A common approach on the spectrum is to have a copy of the screen which is not visible and to draw all the graphics to this, then you copy either part of it (the changed bits) or the entire lot to the display.

On the spectrum with it's 6KB screen you can copy this fairly quickly and keep a decent frame rate, but on the cpc where this method has been used in some games it's ~12KB and now it takes a lot longer to copy and the game runs slower.

Thankfully a lot of game companies used hardware double buffer which is better on cpc . Here you need a coder that can do both methods potentially if they are to write a decent spectrum and amstrad version.

It is therefore all about spending the time and effort to use the right method on each platform to get the best performance.
Title: Re: [CPC vs ZX] Game speed
Post by: DanyPPC on 10:05, 19 February 25
Quote from: arnoldemu on 09:43, 19 February 25Perhaps the following doc I made when I converted Mayhem might give an idea:

https://www.cpc-power.com/index.php?page=detail&onglet=notices&num=18884


Thanks for the link, very useful. 
But I read that Amstrad has hardware scrolling, but for what I know only the PLUS series have hardware scrolling (in order to hardware sprites, 32 colors out of 4096, etc...).
So, is there  a mistake here ?
Title: Re: [CPC vs ZX] Game speed
Post by: eto on 10:11, 19 February 25
Quote from: DanyPPC on 10:05, 19 February 25But I read that Amstrad has hardware scrolling, but for what I know only the PLUS series have hardware scrolling (in order to hardware sprites, 32 colors out of 4096, etc...).
So, is there  a mistake here ?
Plus has 1 pixel smooth scrolling. 
CPC has 1 character (Mode 1) scrolling - but can be made smooth with advanced programming techniques.

https://www.cpcwiki.eu/index.php/Programming:Hardware_scrolling
Title: Re: [CPC vs ZX] Game speed
Post by: DanyPPC on 10:19, 19 February 25
Ah, ok, thanks for the clarification.

MSX has also hardware 1 character scrolling.
Title: Re: [CPC vs ZX] Game speed
Post by: ZorrO on 00:36, 21 February 25
Dear colleagues, you are all wrong. Amstrad is a computer for retirees. Its zodiac sign is a snail, and its philosophy of life is - if you do something fast, you do it wrong.  :P
Title: Re: [CPC vs ZX] Game speed
Post by: GUNHED on 00:39, 21 February 25
Eventually it all depends on the programming code. The CPC can do 50 fps scrolling with 32 KB Video-RAM. No problem.  :) :) :)
Powered by SMFPacks Menu Editor Mod