This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Builderboy
Pages: 1 ... 50 51 [52] 53 54 ... 375
766
« on: November 07, 2011, 06:48:26 pm »
Well lets say one object is 10 pixels away from another. So XY = (0,0) and CD = (2560,0) (since we are in x256 format). We then start the math: Sqrt(abs(X-C)/256^2+(abs(Y-D)/256^2))->L Sqrt(abs(0-2560)/256^2+(abs(0-0)/256^2))->L Sqrt(10^2 + 0^2)->L 10->L So now we have the distance in pixels between the two objects X-C//L->A 0-2560//L->A -2560//10->A -256->A So A = -256 which is a velocity of -1 pixels per frame. If we multiplied L by 256, we would get A as a value of -1, which is much too slow to have any precision. Since A is operating on a position that is in x256 format, it all works out in the end.
767
« on: November 07, 2011, 06:40:36 pm »
Yeah because if your bullets are in x1 format, you won't have enough precision for them to move in many directions smoothly
768
« on: November 07, 2011, 06:32:14 pm »
If there is no inflation, your bullets won't be able to move with enough precision. Unless, do your bullets have x256 precision and your positions are just in regular x1 precision?
769
« on: November 07, 2011, 06:27:22 pm »
That is a good point, i shall modify code now
770
« on: November 07, 2011, 06:20:42 pm »
Indeed, since square roots only return positive numbers, you only need an unsigned division in the first line ^^
771
« on: November 07, 2011, 05:41:16 pm »
There is also a custom map floating around that replicates the new units of HOTS so you can try them out I am very much liking the new Protoss units, especially the tempest when it comes to going against mass Zerg Air
772
« on: November 07, 2011, 02:53:22 pm »
The level editor isn't finished yet, it will be released when the final game is released, as well as to a couple users to help make some more levels.
773
« on: November 07, 2011, 02:21:51 pm »
If X,Y is your own position, and C,D is the objects position, and A,B is the velocity of your object:
sqrt(abs(X-C)/256^2+(abs(Y-D)/256^2))->L C-X//L->A D-Y//L->B If your position variables are in x256 style.
774
« on: November 06, 2011, 10:12:39 pm »
Is the object you are trying to hit moving?
775
« on: November 06, 2011, 09:03:47 pm »
Ah Always remember to backup frequently ^^
776
« on: November 06, 2011, 08:07:30 pm »
If it is an older version of Doors (or even a newer version) the STOP token might be the issue. Try changing it to a return and see if that fixes things
777
« on: November 06, 2011, 02:30:24 pm »
Hmmm so Portal Prelude has been using Fcdf()r this entire time without a hitch, but just recently to increase compatibility I switched to the slightly larger Fcdf(), and now I simply get a RAM clear upon starting the program. Ideas?
778
« on: November 06, 2011, 02:24:33 pm »
Ah that is tricky! That might be faster after all!
779
« on: November 06, 2011, 04:31:48 am »
It would use the low byte (which i don't remember which one it is, you should test it out)
780
« on: November 06, 2011, 04:21:07 am »
Don't forget the 'e' operator. It accesses the Nth bit of a number. Its been around for a long time now...
Syntax?
It's all in the commands index You should check it out, it has all the Axe commands ever, you may find some you never new existed ^^. AeB accesses the Bth bit of A
Pages: 1 ... 50 51 [52] 53 54 ... 375
|