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

Author Topic: SFML Game Development book - question  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.

slouchcouchgamer

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML Game Development book - question
« on: August 19, 2014, 10:40:36 pm »
Hi,

I've just started with the SFML Game Development book, and was working through the first chapter, but would like to ask a question or two before I commit.

Am I right in thinking that, as each new snippet of code is introduced, it is left to the reader to do "prep work" such as declaring the function correctly?

For example, as the handlePlayerInput() function is presented, I don't see any code for declaring it, or any mention of where you should do so. Nor do I see code for declaring bool mIsMoving in the the update() function.

Is all this by design? It is presumed the reader is already proficient enough to not be told this?

« Last Edit: August 19, 2014, 10:42:12 pm by slouchcouchgamer »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML Game Development book - question
« Reply #1 on: August 20, 2014, 12:06:37 am »
The code in the book is not meant to be complete, its there merely as a reference as for what lines of code the text is referring to. For the complete code examples check the following link.

https://github.com/SFML/SFML-Game-Development-Book
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

slouchcouchgamer

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML Game Development book - question
« Reply #2 on: August 20, 2014, 02:00:46 am »
Thanks zsbzsb.

That does help a lot alright.

I'm really excited to get stuck into the book, though what I'd really love to see is the source code broken down to reflect the sections within a chapter, building to the final full source at the end of the chapter.

Still, looks like it will be a fun book to study.