O'Reilly logo

Beginning C++ Game Programming by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting to code the game

Open up Visual Studio if it isn't already, open up the Timber project (if it isn't already open) by left-clicking it from the Recent list on the main Visual Studio window.

The first thing we will do is to rename our main code file. It is currently called HelloSFML.cpp and we will rename it to the more appropriate Timber.cpp. The .cpp stands for C plus plus.

  1. Find the Solution Explorer window on the right-hand side.
  2. Locate the HelloSFML.cpp file under the Source Files folder.
  3. Right-click HelloSFML.cpp and choose Rename.
  4. Edit the filename to Timber.cpp and press Enter.

Make some minor edits in the code window so that you have exactly the same code as shown next. You can do so in exactly the same way that you would with any text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required