Difference between revisions of "Intermediate C++ Game Programming Tutorial 7"

From Chilipedia
Jump to: navigation, search
(Homework)
(Topics Covered)
Line 3: Line 3:
 
== Topics Covered ==
 
== Topics Covered ==
 
* C++ Steams
 
* C++ Steams
* std::cin / std::cout
+
* <code>std::cin</code> / <code>std::cout</code>
 
* Insertion / extraction operators
 
* Insertion / extraction operators
 
* <code>std::endl</code> and buffered I/O flushing
 
* <code>std::endl</code> and buffered I/O flushing
Line 12: Line 12:
 
* <code>OutputDebugString</code>
 
* <code>OutputDebugString</code>
 
* <code>std::stringstream</code>
 
* <code>std::stringstream</code>
 
  
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==

Revision as of 22:30, 27 July 2017

We finally ditch our janky makeshift chili:: routines and use some real shit here. Standard streams (std::cin / std::cout / std::fstream) are covered, and then we talk about string manipulation with std::string. We'll also cover some other less well-known dank C++ code memes, so check it out. Note that this video is more of an overview / whirlwind tour; it introduces various techniques and gives examples, but don't expect a detailed or exhaustive treatment here.

Topics Covered

  • C++ Steams
  • std::cin / std::cout
  • Insertion / extraction operators
  • std::endl and buffered I/O flushing
  • <iomanip>
  • Cleaning out an input stream
  • std::numeric_limits<>
  • std::string
  • OutputDebugString
  • std::stringstream

Video Timestamp Index

Tutorial 7

Source Code

GitHub Repo for Snek

Other Links

C++ Hardcore Reference
C++ Softcore Reference
War and Peace (warp.txt)

Homework

The homework is to modify Poison Snek so that various game settings can be configured by the user by editing a text file. The settings file should be parseable regardless of the order of the settings in the file. The following settings are recommended:

  • Tile Size
  • Board Size
  • Speedup Rate
  • Poison Amount
  • Goal Amount

See also