Moving a 2x2 pixel 'ball' around the screen

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
Morkin
Bugaboo
Posts: 3250
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Moving a 2x2 pixel 'ball' around the screen

Post by Morkin »

Yes, 2 pixel movement is so much easier, looks just as smooth.
My Speccy site: thirdharmoniser.com
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Moving a 2x2 pixel 'ball' around the screen

Post by Ralf »

I would add that in real games 1 pixel movement may be often too slow.

Actual games rarely run at 50 fps. They have smaller framerates. So let's count.

To move from left side of screen to right you need to cover 256 pixels distance. If you have 25 fps you make 25 pixels per second so moving across the screen takes 10 seconds.

If you have 12 fps which is quite often you would need 20 seconds.

So I would say (without much research, just supposing) that in most Spectrum games sprites actually move by 2 pixels.
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Moving a 2x2 pixel 'ball' around the screen

Post by R-Tape »

Ralf wrote: Thu Feb 22, 2018 10:02 am I would add that in real games 1 pixel movement may be often too slow.
Agreed. If sprites are going to move in 1 pixel steps it should ideally be at 50 fps, anything less is a bit slow for action games IMO.

Most games are 25fps so two pixels every two frames is the same, and looks smooth enough. It is ever so slightly jagged in diagonal movements, but good enough.

I think Vallation is 2pixels at 50fps, which plays well and is not too fast for a shooter.

I don’t know why but Manic Miner is okay with its 2 pixels at 12.5 fps, and Catacombs of Balachor plays great with (I think) 8 pixel jumps, I love the way you whizz around in that game.

It’s reassuring what you can get away with!
User avatar
Morkin
Bugaboo
Posts: 3250
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Moving a 2x2 pixel 'ball' around the screen

Post by Morkin »

Cheers, 50p and a pack of Rolos in the post. :lol:

The Balachor games' sprite movement is 4 pixels at a time, except the missiles you shoot which are 8, but they're supposed to go fast.

We tried varieties of 1 and 2 pixel movement with Balachor's Revenge but as already mentioned, it was either:
- too sluggish for the sprite to cross the screen in a reasonable time
- too fast to see the animations, if the sprite moved more quickly
- too 'skatey', if you keep the speed but slow the animation change down

Without overdoing the mutual dev love-in, I thought EFMB had a nice balanced mix of sprite animation and movement speed.
My Speccy site: thirdharmoniser.com
Post Reply