I didn't know you could just flip a switch for option 1...


On Mon, Apr 29, 2013 at 10:27 AM, DeeKayHT <notifications@github.com> wrote:

> In src/main.cpp:
>
> > +
> > +	while (window.IsOpened()) {
> > +		sf::Event event;
> > +
> > +		// Process any input events
> > +		while (window.GetEvent(event)) {
> > +			// Quit game if the window was closed or if the escape key was pressed
> > +			if ((event.Type == sf::Event::Closed) ||
> > +				((event.Type == sf::Event::KeyPressed) && (event.Key.Code == sf::Key::Escape)))
> > +			{
> > +				window.Close();
> > +				break;
> > +			}
> > +		}
> > +
> > +		// TODO: Limit framerate to make it easier on processors (max 60fps?)
>
> The "limit framerate" thing? There's a couple ways we could do it:
> 1) Simply turn on v-sync.
> 2) Check how long one loop/frame took to process, and just wait until we
> reach the time it takes to do 60fps, which would be around 16.66ms.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/faitswulff/pong/pull/1/files#r4000663>
> .
>