View Single Post
Old 14 August 2019, 15:12   #67
Registered User

Join Date: Jun 2016
Location: UK
Posts: 335
Originally Posted by roondar View Post
If you're referring to the 68020 concurrency features, they're relatively limited in capabilities. It's true that stuff in the cache can execute while the bus is busy, but only up until the result of any memory access is needed by the CPU and it still will take time to execute code in the cache - though using fewer cycles than it normally would (notably, it is possible for some instructions to be 'free', but this is a fairly rare occurrence).
Yes, that's what pipelining refers to. You need to arrange the memory accesses so that they happen when the bus is available and use the cycles in-between for other stuff.

You don't really calculate the same. The grid is basically two shifts, one 'and' and an 'or' (plus storing the result). The Blitter is basically one multiply, one shift and an add (plus the BLTCON and register stuff).
Remember that the 020 can do shifts of any length in the same minimal (4) clock cycles if executing from cache.

You will probably want your bitplanes to be at least double the screen width to assist with scrolling. You could go to 1024 pixels wide and use shifting instead of a multiply instruction. There is no wasted memory as you can use the extra space for storing other data.

Since you are limited by memory/chipset bandwidth the extra stuff you need to do to create the grid address is basically free, as in you can still hit every single available bus access. The only additional overhead is a single 16 bit write to store the result.

I don't require pixel perfect collision detection. I generally only require consistent collision detection. And many games have that. Sure, they very occasionally might glitch (see Super Mario Brothers), but by and large you know what will happen and when.
Super Mario Bros is famous for it's inconsistent collision detection.

For example, collisions with enemies are only done every other frame. So when you jump on an enemy it's essentially random how far down you will have moved before hitting it, and thus the height of the resulting bounce is also random.

Another famous example is at the end where Bowser throws axes at you, and it's possible to jump through one of them because the game can't check collision on all of them in one frame. so you actually have a window of 3 frames where that axe can't kill you.

You've mentioned Pacman here and it is one of the few games that truly use a grid system well. It works so well because its map is highly structured and movement is restricted. This means that a checks can be done using a grid and still be fairly accurate. It's also a game where the player does not have weapons which further limits the amount of 'perceived weirdness'.
But again, Pacman is infamous for having very inaccurate and inconsistent collision detection.

The ghosts can get right on top of the player, clearly touching, and the player doesn't die. It depends on the exact timing of when the player leaves an grid square and when the ghost enters it, so it's essentially random. It's so janky you can actually pass right through ghosts by running at them sometimes, as Pacman and the ghost exchange grid squares in the same frame.

By most estimates that just makes the game more exciting. You never feel cheated because it favours the player and when you die you can be sure the ghost was on top of you, but it also allows for some element of chance and extremely close calls.
zero is offline  
Page generated in 0.04284 seconds with 11 queries