CMPS-4490 Game Dev Lab-3

Overview:

Step 1:
You may do your work on your local Desktop.

Before you leave the lab session, please copy all your
work to your Odin 4490/3/ folder.


Get the lab files from Odin at:

/home/fac/gordon/p/4490/code/lab3/*


Step 2:

You will start by building and running the program.

There should be a spinning clock face.

Press M to turn on the metronome.

Press U to apply a random pause during the game loop.

The Minus - and Equal = keys will change the clock rate.

Press U, and notice how the clock does not run at a steady pace any longer.

Your job is to make the clock run at a steady rate even while random
pauses are applied during the game loop.

Sources: high precision timer


Step 3:
To test your program...

Press X to start a second clock window.

When the child process starts, both clocks will be running with their
metronome on. Press U in one of the windows, and the clocks should
continue running at the same pace exactly.

The clocks will not look exactly the same, as one will run in a
somewhat jumpy manner, but the pace of each clock will be the same.




Step 4:
There are a few other changes to make to your program.

Some changes are documented in the comments at the top of the code.

See how many of these you can do, please.


Parent and child process starting together...

When the child clock begins, its clock hands should be synchronized with
the parent clock, not only in pace, but in position.
This may or may not happen every time.
Your instructor will describe a method to try to make this happen.


Step 5:
Apply what you learned here to the lab1.cpp program.

Run the lab1 from the Odin server.

A box goes back and forth.

Try to make the box move at a constant rate, while changing the window size.

The overhead of Odin X11 graphics forwarding will cause the frame rate to change.



What to turn in...
Gordon will find your work out on Odin.