ArianeSoft Forums

ArianeSoft Forums (
-   Support (
-   -   PPL too fast? (

Mike Halliday 10-06-2009 04:18 PM

PPL too fast?
I have come across a situation where my code is too fast when run. :D

I have similar code in blitz basic that runs smooth as silk. In PPL, the screen updates happen sooo fast that you cant see what is going on.

I know I have asked Alain before about a WAIT VERTICAL BLANK command or something similar that will sync the program with the refresh of the monitor, but how? can I slow my program down to make it update at the correct speed?

I have changed the last 2 variables in the INITGameAPIEX function, but this makes it judder and jump!



kornalius 10-07-2009 12:10 AM

Re: PPL too fast?
I thought I gave you an answer already on this. I believe I added it to the pocketfrog library internally. I will have to check that again. I will add it to my todo list just in case.

kornalius 10-07-2009 12:12 AM

Re: PPL too fast?
Btw the ppl engine core as been rewritten and should be even faster. :) It's nice to hear that ppl is too fast though.

Mike Halliday 10-07-2009 06:22 AM

You are right, you have included it in 1.60 and 2.11

For some reason I did not get the eMail update for that thread ( :(

Will give it a go and see what sort of results I get! :)


Mike Halliday 10-07-2009 12:30 PM

Too much speed - Now I'm not so sure!
1 Attachment(s)
OK, so I have determined that it is not a speed issue as such;

What I think is happening is the Math in PPL is different to the Math in Blitz Basic.

Here is my code;

for (cnt$, 0, 720)
qcos$[cnt$] = cos(cnt$);
qsin$[cnt$] = sin(cnt$);

Here is the blitz basic code;

For count = 0 To 720
qcos#(count) = Cos(count)
qsin#(count) = Sin(count)

Technically there is no difference; Have a look at the attached image and you will see that the numbers generated in COS and SIN are completely different. Now my math is rubbish, but I know that COS and SIN tables are standard (Otherwise they would be no use to anyone), so how come I get different values?

PPL help states that COS "returns the cosine of parameter X as a double" where as blitz basic help states that COS "returns a number between -1 and 1. This value represents the "X" coordinate of point x,y"

It seems failry obvious that PPL handles COS and SIN differently, but what the difference is I cant seem to find out.

Can anyone shed any light on this for me? - Am I being stupid and completely missing something here?

Cheers - Mike.

Nicknack 10-07-2009 12:57 PM

are you completely missing cos360 and sin360? they return the standard values between -1 and 1 ;)

Mike Halliday 10-07-2009 01:04 PM

Holy Moly!

You da man! - thats great - works a treat!

Now why did I not think about those!

See its true. A fresh pair of eyes on the problem .. works every time.

Thanks NickNack - you are my saviour!


kornalius 10-07-2009 04:09 PM

Oh great, thanks NickNack, I did not have an answer for that one! :)

Nicknack 10-07-2009 05:33 PM

I had the same problem a long time ago, don't forget those where you really had to rack your brain over it that easily :D

Donone 10-09-2009 07:26 PM

I notice Mike that on 10-7 you comment...

You are right, you have included it in 1.60 and 2.11
Do you refer to the expected version 1.60 (to follow 1.53) and if so, has it been issued yet?


All times are GMT. The time now is 03:43 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.