6th of March Commutative law…

It seems I had forgotten about the commutative law – or more precise – the absence.

See:

(x-a)*y != x*(y-a)

That bastard made my thoughts about collision detection (or rather testing against an illformed circle aka polynom) rather – how may I phrase that – yes – FALSE.

With vectrex, the “coordinates” on screen are

strength * scale_factor

And what I actually did with the adjustments of the coordinates was an adjustment of only the scale (while checking for collisions) like:

strength * (scale_factor – polygon_correction)

That produced different results depending on the scale of the polygon – and especially the outer and inner regions were way “out of bounds”.

I updated the calculation for the collision detection to reflect that – I think it is much better now – but perhaps time will show other errors.

To actually SEE the wrong collision detection I added a testroutine, that outputs a dot on every position (outer and inner shield) that is the boundary of the collision. Screen updates with that routine switched on are about 2 Hz (haha!) – but I could actually SEE how wrong I was.

But I can’t well show a screenshot of that – neither the vectrex nor any emulator supports screenshots of 2 Hz – one would only be a partially drawn screen…

Regards

Malban

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.