Page 1 of 1

What causes Runrev to race?

Posted: Sun Jul 13, 2008 6:06 pm
by n.allan
I had just finished wrapping a windows SDK when the vendor had suddenly released a new version. I downloaded the new version and replaced the old dll.

Now suddenly when I initialise the new dll the CPU maxes out and causes the rev ide to "race".

I'm talking about cursor blinks at a rate of knots and, for example, when I go into Object Browser and look at the images, the animated images are "racing" and not animating at the proper speed.

I have tried IdleRate, qtIdlerate, BlinkRate, all the *rates... but the problem remains.

I have spent the last couple of nights on the SDK's forums and they all think/know I'm just crap at programming! but I swear to you all was just perfect using the old dll.

I have however noticed that they added an undocumented "feature" to do with the focus of the control so it can accept keystrokes and mouseups etc.. do you think that rev and the SDK could be fighting for focus?

Posted: Sun Jul 13, 2008 10:31 pm
by Mark
Hi n.allan,

I don't think I can answer your question without more information.

Which SDK is this? What does it do? How do you use it in Rev?

Do you use any of the *rates for any purpose other than fixing this problem, anywhere else in any script?

Do you actually use that new undocumented feature?


Best,

Mark

Posted: Mon Jul 14, 2008 12:21 am
by n.allan
It's Blitz3D SDK, I've had no luck on the Blitz Forum. I've done a foolish thing and mucked up all of my code trying to fix what I belive wasn't even broken in the first place. I'll fix it all up in the next couple of days and post a link for the external code. Of course one will need to own the SDK in order to use it fully.

I've just recived permission from BRL to post a demo stack ,demo external and media that wraps some of the functions .

Anyhoo... I simply call the first basic function. bbBeginBlitz3D() and the CPU rockets and the rev IDE goes nuts. I had big plans for this but now I'm completly sickened of the whole damn thing! :evil: :evil: :evil:

Posted: Mon Jul 14, 2008 9:36 am
by Mark
Hi Allan,

If you can put a demo on-line, I'll have a look.

Mark

Posted: Mon Jul 14, 2008 11:11 am
by malte
Hi n.allan,

please, pretty please with cream on top try to keep it up. I see this being so extremely useful and I would love to see an external around Blitz3d. That would be very very cool. As I am one of the few doing games in Rev i would really love to have such a beast. Would it be Cross Platform? Or Win only? I am sure there could be help from the mothership if desired...

All the best,

Malte

Posted: Mon Jul 14, 2008 1:14 pm
by n.allan
I will post a simple external tonight along with a good guy and bad guy dlls. I will keep it up. I've invested far too much time to give up now. I seem to remember bill from a previous post telling me I was about to climb a mountain, he was sooooooo right! And this would be considered a simple task by most programmers. The code is not pretty but it has no memory leaks that I can see. I left a terrain demo running for about two days with a weight on the keyboard to simulate input :D and never used a byte of memory :D so it's looking good.

Once I have the simple one posted i will go to work on a decent crippled demo external. I say crippled because If i were to post the full compiled external online this would allow ANY one to use the B3D.dll redistributable without paying and I dont want that at all!

I would rather post the source code for VS2008 express and people can link their own blitz3dsdk.lib that they have to purchase and compile from there.

While I'm at it can anyone tell me a better way to convert char * to float? I'm currently using:

float CameraX

if (p_argument_count = 1)
{
CameraX = atof(p_arguments[0]);
}

but I get warnings about losing information. It works well but i suspect we may run into problems in the future. I was always told to treat warnings as errors.

Posted: Mon Jul 14, 2008 7:43 pm
by n.allan
Sorry. To answer your questions, It is only win32 unfortunately Malte and mark I had no idea there was an undocumented feature, what I meant by *rates was any command ending in ->rates

Posted: Mon Jul 14, 2008 9:32 pm
by mwieder
atof() returns a double. The easiest thing to do would be to declare CameraX as a double instead of a float. If you need to use a float then you could do a simple cast:

float CameraX = (float) atof(p_arguments[0]);

Posted: Mon Jul 14, 2008 10:19 pm
by Mark
Allan,

I know what you meant by *rates, but you didn't answer my question.

So, I take it you didn't use that undocumented feature? Or you don't know? Maybe you should find out on that other forum.

Best,

Mark

Posted: Tue Jul 15, 2008 9:15 am
by n.allan
Of Course. I forgot I could cast the double to float. I've use this lots in the past. It's amazing how small things esacpe you when you are in obsession mode.

Posted: Wed Jul 16, 2008 11:09 am
by n.allan
Thanks mwieder for reminding me about the cast.

0 Warnings...
0 Errors...
Compiling....

:D