1 Replies - 6480 Views - Last Post: 16 May 2009 - 11:07 AM Rate Topic: -----

#1 bssandeshbs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-May 09

How to implement Timer Fuction in OPENGL Game

Posted 16 May 2009 - 08:20 AM

I have written a Small Arkanoid like Game..I wanted to implement a Timer Function which will be incremented when we play and also the Time we play will be recorded as the HIGH SCORE..Can please suggest how to do it...

I have Attached the WHole game COde...It is written in openGL
Please help me out...

Attached File(s)

  • Attached File  new.txt (11.62K)
    Number of downloads: 310

Is This A Good Question/Topic? 0
  • +

Replies To: How to implement Timer Fuction in OPENGL Game

#2 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: How to implement Timer Fuction in OPENGL Game

Posted 16 May 2009 - 11:07 AM

Are you trying to implement a frame timer (to keep a consistent frame rate) or do you just want a clock in your game?

For the frame timer I would recommend using glutGet(GLUT_ELAPSED_TIME);. I can go into a little more detail if that's what you want.

For the clock you'll probably want to use time.h.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1