mIRC Home    About    Download    Register    News    Help

Print Thread
#17301 29/03/03 07:50 AM
Joined: Dec 2002
Posts: 32
J
Jaakko Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 32
Hello,

Im drawing a game into mirc picture window. Now I use /clear @ for screen refresh, but it gets a really crappy fps when you add something more into window. Is there any way i can do it better (as in fps) ?


am a big noob
#17302 29/03/03 04:13 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
if you can use one bitmap, and not clear the window each time but redraw it mapping a different part of the image it will load faster
a test:
Code:
 
#cloud on
alias wincloud {
  window -adop @test 100 100 128 240 
  drawpic @test 1 1 0 0 128 240 c:\windows\clouds.bmp
  var %i = 1
  while (%i <= 512) {
    drawpic @test 1 1 %i 1 128 240 c:\windows\clouds.bmp
    inc %i
  }
  cloudrepeat 
}
#cloud end

alias cloudrepeat {
  if ($group(#cloud).status == on) { wincloud }
}
 

to run load that in remotes and /wincloud
to break out of the loop hold CTRL and type the BREAK key, then /disable #cloud (to make sure its locked off) or remove the code from your remotes.

#17303 30/03/03 03:40 AM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
add a picture window Menu

menu @TEST {
Clear:/clear @TEST
}




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#17304 31/03/03 04:37 AM
Joined: Dec 2002
Posts: 32
J
Jaakko Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 32
Hi,

Thanks for those, but unfortunately that didnt answer. I don't use bitmaps at all. I use just drawline, drawdot, and drawfill.


am a big noob
#17305 01/04/03 03:21 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
maybe you could post some sample code of what you are doing and then maybe we can offer a suggestion that will be more helpful.

#17306 01/04/03 06:41 AM
Joined: Feb 2003
Posts: 32
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2003
Posts: 32
I wouldnt use @clear, i would rather draw a filled rectangle over the screen, and use the -n switch on all the /draw commands until you finished updating. The -n switch is the key to flicker free graphics in picture windows.

If you just want to clear one specific area, try and do it with /drawreplace or /drawrect too. And above all, remember to use the -n switch.

If your drawing a detailed object with the /draw commands, It might be wiser to have them pre-drawn on another hidden @window (off screen, not simply -h) and /drawcopy the image from the hidden window to your window. It makes no sense to repeatedly draw the same thing.

Last edited by SaX0n; 01/04/03 06:44 AM.

Link Copied to Clipboard