2D Timer GFX Effect
Community Forums/General Help/2D Timer GFX Effect
| ||
Hi all, Not sure if you guys know what I mean by this, but what I'm trying to achieve is thus: An in-game timer for a game I am working on is depicted as a mini-dartboard. I want it to be 'eaten up' as the time (for arguments sake: 60 seconds) counts down. So with 0 seconds elapsed, there would be a complete circle, 30 seconds elapsed would show a semicircle and it would be gone completely when 60 seconds have passed. Here's a 'jerky' example, although I guess the principle is the same. Surely I wouldn't have to create 60 different images, each with a 'slice' removed from the dartboard-clock? If I did, how would I go about that in Photoshop? ![]() Any thoughts? (Using BMax for the code-side of things). Last edited 2010 |
| ||
look up gl_triangle_fan. Cheers Charlie |
| ||
Or something like:Graphics 640,480,0,60 Local time:Int=0 Local disp_time:Int=0 While Not KeyHit(key_escape) time:+1 If time Mod 60=0 disp_time:+1 SetColor 200,200,200 DrawOval 50,50,100,100 SetColor 0,0,0 DrawOval 55,55,90,90 SetColor 200,200,200 DrawOval 70,70,60,60 SetColor 0,0,0 DrawOval 75,75,50,50 SetColor 200,200,200 DrawLine 100,50,100,150 DrawLine 50,100,150,100 DrawLine 100,100,50*Cos(-90+(time*6))+100,50*Sin(-90+(time*6))+100 SetColor 255,255,255 SetScale 5,5 Local offx:Float=(TextWidth(disp_time)*5)/2 Local offy:Float=(TextHeight(disp_time)*5)/2 DrawText disp_time,100-offx,110-offy SetScale 1,1 Flip Cls Wend Cheers Charlie |
| ||
Heh, like the example code, cheers! I'm afraid I don't understand much that I can find re: gl_triangle_fan. I have an image underneath that needs to be gradually revealed too, so it literally needs to be a 'disappearing image'. Thanks for your help and time though. :0) |