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 ...

Get Beginning C++ Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.