Jump to content
The simFlight Network Forums

VB/FSUIPC users or Gurus, Question to ask...


Recommended Posts

I am create 2D graphic on VB platform, off from FSUIPC offset... they render O.K., kind of shutters. I would want to have it in smooth effects, but I realize that VB timer controls limit to 55ms (18FPS). So does anyone face same situation, and improve fps? does anybody have code that can make a better fps in VB and work out okay under FSUIPC structure (.BAS)module? If so, let me know.... :wink:

Link to comment
Share on other sites

Are your graphics BMP or JPG? I've had the same problem. I used GIF or TGA and the shutters got a little better. I believe the problem is VB's ability to draw the graphics. I think it sometimes takes longer than 55ms to render, which is what's causing the shutter. GIFs and TGAs I guess render a little quicker than 55ms. In addition, I believe most of the shutter is caused by the fact that VB clears the image before drawing it again. I don't know of any other solution.

Joe

Link to comment
Share on other sites

No, I m just using me.line and me.circle function in vb.. I do know obtaining .jpg, .bmp or other graphic would generate much slower. I find its funny, when I test the line, circle function using scrollbar function, it goes smooth... but when getting replacing scrollbar into timer control it get slower, a little glitch at that point. I thought perhaps it has to be timer because of it take a while for MSFS to send data through FSUIPC ,then VB platform. and when generate a picture "autoredaw" it delays more causing a glitch.

Have you ever use API such as directX? this may be much solution for it.

Link to comment
Share on other sites

Then I suppose only Mr. Dowson could help.

I created a program that had a radar scope and little symbols for various ships using nothing but lines and circles. I had the same effect your describing. In this case, I never did find a solution. Sorry.

Joe

Link to comment
Share on other sites

I find its funny, when I test the line, circle function using scrollbar function, it goes smooth... but when getting replacing scrollbar into timer control it get slower, a little glitch at that point. I thought perhaps it has to be timer because of it take a while for MSFS to send data through FSUIPC ,then VB platform. and when generate a picture "autoredaw" it delays more causing a glitch.

If you are running on the same PC as FS the "cycle time", that of making a request to FSUIPC and getting the results back will rarely be more than even a millisecond or so -- and most of that time is process-switching. Running at 55 mSecs intervals should be no problem, though you may want to try to make the interval correspond to the FS frame rate. 55 mSecs equates to 18-19 fps, so you'd set FS's frame rate limiter. If you wanted a faster smoother rate you'd decrease the interval and increase the limit.

If your processor is a Pentium with hyperthreading then your program's performance should be perfect, but this may be affected by the video card as both you and FS will be using it.

On any lesser PC your stutters may be caused by FS's takeover of the processor. Again, the frame rate limiter in FS should help.

Regards,

Pete

Link to comment
Share on other sites

Pete, that makes sense.... My FS quality doesn't fit with my laptop's video driver(8mb)Perhaps that what's probably cause shutter. I should try it on a faster computer and see what effect it has take so I could determine the best for my software that I create. Thanks for the input, duly noted now. :wink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.