View Single Post
Old 14 August 2019, 16:34   #68
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 1,308
Quote:
Originally Posted by zero View Post
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.
Right. Problem being this is really rather hard to keep up. Most of the time, you either have more memory accesses than other instructions or the other way around and thus, the benefits from this interleaving are usually limited.

Quote:
Remember that the 020 can do shifts of any length in the same minimal (4) clock cycles if executing from cache.
...
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.
Yes, 4 cycles per shift (assuming LSL/LSR and no more than 8 bits). So two shifts, an 'and' and an 'or' will cause you to 'miss' up to 1.5 memory cycles. I simply do not agree with calling it 'free'. It absolutely isn't free. Code in the cache does take time to complete. It can and will cause you to miss memory slots. I do agree it is cheap, but cheap and free are two very different things.

As for the 68020 in general: I'm not sure sure it is really all that relevant. On an A1200, the CPU is fast enough to do plenty of collision checking as is. This stuff is far more relevant when looking at the A500/68000, where the CPU sometimes struggles to keep up.

Quote:
Super Mario Bros is famous for it's inconsistent collision detection.
No it isn't

This really is the first time I've heard anyone call it inconsistent. What I've seen and heard so far makes it out to be consistent, but with some well known glitches (that can be abused by speed runners).
Quote:
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.
IMHO, doing collisions every other frame is a far more consistent way of doing them than basing it on something as unpredictable as object X&Y mapped to a grid. It seems to me that this is partly why Super Mario Brother collision detection feels good and not really arbitrary in the general case.

The point with Super Mario Brothers is that these glitches are extremely rare in normal game play (unless sought after and abused). This is contrary to grid based systems where glitches are both far more more common and less predictable.
Quote:
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.
Yes, the grid shows off it's weakness when this happens. Whether or not this is good depends on your situation. If this happens just after you had picked up a short duration power pill, I'm sure it would not be 'exiting', but rather 'annoying'. Again, not something to try and achieve.
Quote:
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.
There's two reasons why you don't feel cheated in Pacman. The first is that you're not trying to shoot the ghosts and see half your shots fly straight through them. The second is that you can always enter part of a ghost - not just occasionally. They made the grid very small compared to the player/ghosts. So small it's impossible to die when 'just' touching a ghost. The result is that it feels deliberate that you can partly touch a ghost. The same doesn't go for Gradius as the bullets are rather small themselves. Which makes it feel a lot more random.

Essentially, the makers of Pacman took their poor collision detection and made it a gameplay feature. This clearly doesn't always work and poor collision detection certainly doesn't make games more 'exiting' in the general case.

All this just means you need to be aware of the flaws if you decide to go the grid/half frame route and handle them as well as you can.
roondar is offline  
 
Page generated in 0.05705 seconds with 11 queries