[#302]
Re: Powstawanie nowej gry w Blitz 2
@tukinem,
post #301
I'm only sharing ideas and algorithms off to help. I'm not going to write Pinball Dreams 2.
I've got my own project that I'm working on with a different platform in C and assembler (Z80). It's time consuming, so I took a break to give some formulas when you decide to tackle your project again.
Our programming techniques are different, so it might be difficult to reconcile the techniques. I tend to push a lot of algorithms to functions as it is how C programmers quite often do things. From your code I can see that you like to resolve problems in-line. There is no superior method, just differences. You've got some good code there.
I don't even have a programming environment for the Amiga, so the code that I posted is ad-hock from my working C code translated to Blitz, it may not even work properly (in Blitz).
One thing that I can say is that ATAN in Blitz seems to be like many versions of ATAN which has a weakness, it does not output the Quadrant that the slope is measured. ATAN2 was made to show the quadrant. That's ported code from Nvidia.
I'm not big on writing with Vectors as they can be troublesome by needing to calculate SQRT which can be CPU consuming unless you build a LUT. I don't think that the inverse SQRT trick
link would apply on Blitz.
Ostatnia aktualizacja: 29.01.2023 14:39:32 przez andydansby
Ostatnia aktualizacja: 29.01.2023 14:40:05 przez andydansby