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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Devo

Pages: [1]
1
General discussions / Re: SFML Game Development by Example - 4th SFML book
« on: December 20, 2017, 02:32:57 am »
I've been working through the book with a Mac and enjoying it quite a bit. There are a few roadblocks for Mac users,  and so I thought I'd share the ones I've encountered so far to possibly spare others some pain.

- Make sure to use the ResourcePath helper function that comes with the OS X SFML installation whenever you need to load something from the file system (e.g. graphics, fonts, etc.)

- Earlier in this thread there is a discussion about errors caused by unordered_map and hashing custom objects. This applies to Xcode as well, and you will need to create and use the CustomHash header file as described.

- If you try to read in text files that come with the source code download, your code will throw a runtime error due to a null pointer (this first happens with keys.cfg in the EventManager and StateManager chapters). It took me forever to figure out that this appears to be due to the different end-of-line characters between Windows and OS X. A solution is to recreate the files on the Mac, I just typed them in using nano in a terminal window.

- More to come I'm sure!

Devo

Pages: [1]