Jump to content


Photo

>>>timer Lib<<<


  • Please log in to reply
41 replies to this topic

#1 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 05 March 2007 - 01:44 AM

Version 2.5

Posted ImagePosted Image

This lib is for anyone who needs a timer(such as a racing game).
This timer can start anywhere(non-negative) and count up or down!
This can also get the windows clock so the game can be played in the real time of the player!
You can draw a dark rectangle over the screen according to the time like night and day, now in any view!

Update! Version 2.5 out now!


*Big Updates
set a variable equal to the time in seconds or HH:MM:SS

Additional features:

The functions:
Initialize timer
Run timer
Draw timer
If timer is at position
Set timer position
Stop Timer
Start Timer
Set a variable equal to time
Get Windows Clock
Draw Windows Clock
Draw Light by Clock

File info:
Fully Unregistered!
Version 2.5
Zipped, 13kb

Folder has an example in version 6.1 so it will also work in v7
the example shows how to start, run, draw, and set the timer. It also includes 1 scenario of when to use the "if timer is at position" tile, has stop timer and start timer uses as well. It draws the windows clock as well, and has the draw light by clock as well.Now also has the set variable to time.

Download:
Timers
Need new mirror, old one wouldnt upload so i dont think it would download well...
Coming soon:
(any requests?)

Response appreciated
~Isaacqwerty

Edited by isaacqwerty, 24 February 2008 - 03:42 AM.

  • 0

#2 beedy

beedy

    GMC Member

  • New Member
  • 241 posts

Posted 05 March 2007 - 02:41 AM

this is a great idea! this is exacly what i have bean looking for for my racing game!
thank you!

Edited by beedy, 05 March 2007 - 02:42 AM.

  • 0

#3 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 05 March 2007 - 12:11 PM

Next time you should consider using prefixes for your variables.
For example: tlib_timer (tlib = timerlib)
Of course no one will ever name the variables as you do, but it will be easier for you to code if you pre- or suffix them next time.

Sorry for not testing the lib, but the display driver doesn't work on this so I can't run GM.
  • 0

#4 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 05 March 2007 - 12:51 PM

Next time you should consider using prefixes for your variables.
For example: tlib_timer (tlib = timerlib)
Of course no one will ever name the variables as you do, but it will be easier for you to code if you pre- or suffix them next time.

Sorry for not testing the lib, but the display driver doesn't work on this so I can't run GM.

<{POST_SNAPBACK}>

@Daniel-Dane:i originally had very easy to understand and well defined names, then i lengthened some, while mixing up the upper/lower case, but thanks for looking anyway!

Edited by isaacqwerty, 06 March 2007 - 03:14 PM.

  • 0

#5 beedy

beedy

    GMC Member

  • New Member
  • 241 posts

Posted 05 March 2007 - 04:17 PM

:D more people should download this lib! :D

Edited by beedy, 13 March 2007 - 08:48 PM.

  • 0

#6 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 05 March 2007 - 06:45 PM

ya, i think you may have gotten a beta version that had a bug in it but its fixed now

Edited by isaacqwerty, 22 March 2007 - 09:27 PM.

  • 0

#7 beedy

beedy

    GMC Member

  • New Member
  • 241 posts

Posted 05 March 2007 - 07:25 PM

isaacqwerty, maybe you could try to upgrade it? just an idea

Edited by beedy, 13 March 2007 - 08:46 PM.

  • 0

#8 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 06 March 2007 - 03:12 AM

@Beedy, try re-downloading it

Edit: yes, now i remember, i had a version up but forgot to put the tile sprites in, so I re uploaded after a double check and that was one thing that i changed

Edited by isaacqwerty, 06 March 2007 - 03:14 AM.

  • 0

#9 beedy

beedy

    GMC Member

  • New Member
  • 241 posts

Posted 08 March 2007 - 01:34 PM

thanks, version 1:2 is better

Edited by beedy, 13 March 2007 - 08:57 PM.

  • 0

#10 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 12 March 2007 - 10:46 PM

Update! new version 1.2!

Edited by isaacqwerty, 13 March 2007 - 12:09 AM.

  • 0

#11 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 12 March 2007 - 10:47 PM

Double post by accident, read above

Edited by isaacqwerty, 13 March 2007 - 12:08 AM.

  • 0

#12 beedy

beedy

    GMC Member

  • New Member
  • 241 posts

Posted 13 March 2007 - 09:00 PM

nothing i just dont think that some of the images match what they acually are.
  • 0

#13 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 15 March 2007 - 09:22 PM

New versions 1.3, 2, and 2.1 today!!! check above for more info!

Edited by isaacqwerty, 16 March 2007 - 12:02 AM.

  • 0

#14 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 21 March 2007 - 10:02 PM

new update! 2.2 is now out!
now you can draw lighting by the clock in a view!
now, bug fixed, draw clock in normal time, not army time!
bug fixed, now when draw in view is set with no view, the entire screen is set, no matter what the room size!

i feel hated, only two people have replied

Edited by isaacqwerty, 23 March 2007 - 12:37 PM.

  • 0

#15 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 01 April 2007 - 01:53 PM

___________________________________________
FATAL ERROR in
action number 3
of Draw Event
for object object0:

COMPILATION ERROR in code action
Error in code at line 26:
    {draw_rectangle(view_xview[argument2-1],view_yview[argument2-1],view_xview[argument2-1]+view_wview[argument2-1],view_yview[argument2-1+view_hview[argument2-1],0);}

at position 163: Symbol , or ] expected.

I get that error in gm7 but not gm6
  • 0

#16 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 01 April 2007 - 07:05 PM

thx for pointing that out, ill change it because i dont think its the same in each version. soon new update for each version
and thx for replying, finally someone!
  • 0

#17 muslim power

muslim power

    GMC Member

  • New Member
  • 540 posts

Posted 04 April 2007 - 06:07 PM

very nice
  • 0

#18 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 04 April 2007 - 11:52 PM

thanks for the reply!
ok, now i figured out the problem, hockeyflyers, in the code, 4th argument, the "view_yview[argument2-1+view_hview[argument2-1]" should have a brace on the other side or [argument2-1], i havent heard of any others having trouble with this, if you have, please tell me!

EDIT: fixed the bug, so now its all good. i dont get why it didnt flare in gm7... hmm...

Edited by isaacqwerty, 04 April 2007 - 11:58 PM.

  • 0

#19 isaacqwerty

isaacqwerty

    GMC Member

  • New Member
  • 343 posts

Posted 08 June 2007 - 07:48 PM

new version!
version 2.3,
bug fixes as mentioned above:
mistype coding bug
draw color bug
double "am" or "pm" bug
all fixed now
  • 0

#20 Darkpinochio

Darkpinochio

    GMC Member

  • New Member
  • 37 posts

Posted 08 June 2007 - 08:17 PM

looks nice
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users