AutoIt Forums: ProSpeed problem with .png flickering - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ProSpeed problem with .png flickering Using Buffer and paintnew makes sprites flickering :/

#1 User is offline   Uriziel01 

  • Spammer!
  • PipPipPip
  • Group: Full Members
  • Posts: 273
  • Joined: 20-May 07
  • Location:Poland *PL

Posted 03 November 2009 - 11:15 PM

Hello :) Im making some "little" project, It will be a port of old "Tank" game (hmmm, better to say CLONE not port :P ). Im using a ProSpeed library to graphic engine, i have maked a map editor/reader system of tilesets and mooooore. But im still having problem (I had it from the beggining, yesterday :P) with moving sprites over my map, because i created them using .png tiles( it was much simplier and look alot better) my sprites are flickering when they are moving, it is connected with the fact that im making it thais way:
(x: -line number in source)
[ code='text' ]    ( Popup )
70:CreateBuffer(800, 600) 71:SetBuffer($hdc) ....... 93:sleep($FPS_SLEEP) 94:PaintNew() 95:PaintPng(6, $hdc, 29 + $loop, $y1, $clouds1,0)  

And in moment when I had already used a PaintNew and before function PaintPng() it is few ms interval, and the engine is rendering only the image from buffer (which was created with map creation anddont contain my sprite). Only solution I can see in this moment is having two Buffers but I'm not sure how to make this work. Im Attaching a youtube vide of my problem :)
(The low framerate is result of my HyperCam problems, not game itself)
http://www.youtube.com/watch?v=LZZhcE-pJnY

http://img519.imageshack.us/img519/6791/screentz.jpg

#2 User is offline   jpam 

  • Mass Spammer!
  • PipPipPipPip
  • Group: Full Members
  • Posts: 435
  • Joined: 25-April 05
  • Gender:Male
  • Location:Netherlands

Posted 04 November 2009 - 05:57 PM

As far i can see it's not a wm_Paint issue.
I think the sprite function wants to render a frame that not exist in your png.

Sprite($S_Spriteplane, $S_Destination, $S_offsetX, $S_offsetY, $S_WIDTH, $S_HEIGHT, $S_FRAMES, $S_START_FRAME, $S_FRAME_SPEED, $S_posX, $S_posY)

make sure if you are using a static png as sprite, that the $S_FRAMES para is 1 and $S_START_FRAME is allso 1

Regards
jpam

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users