Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Screenway - a racing game  (Read 12026 times)

0 Members and 1 Guest are viewing this topic.

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
Screenway - a racing game
« Reply #15 on: April 23, 2010, 09:53:45 pm »
Hey, just a question : how do you get that zoom effect?  :D
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

kolofsson

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Screenway - a racing game
« Reply #16 on: April 24, 2010, 10:25:05 am »
Quote from: "pierreyoda"
Hey, just a question : how do you get that zoom effect?  :D


Code: [Select]
dt = window.GetFrameTime();
if (window.GetInput().IsKeyDown(sf::Key::Add)) view.Zoom(1.f - dt);
if (window.GetInput().IsKeyDown(sf::Key::Subtract)) view.Zoom(1.f + dt);

kolofsson

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Screenway - a racing game
« Reply #17 on: April 24, 2010, 10:38:08 am »
I uploaded revision 8. Now you can race against time. The timer starts when you start moving. It stops when you cross the finish line. My record time without going out of track was 64.0 seconds. Try to beat that!  8)

 

anything