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

Pages: [1]
1
General discussions / Re: SFML Game Development -- A book on SFML
« on: August 24, 2013, 11:06:29 pm »
Does it work if you try the GitHub code directly?

Which compiler and operating system do you use?

I found where the problem was, although I have no idea that this could cause this. In the SpriteNode class, there is an drawCurrent() method declared as this:

virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const;

but I had it like this:

virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates& states) const;

I passed the second argument as reference. I deleted the & and now it works properly.

2
General discussions / Re: SFML Game Development -- A book on SFML
« on: August 24, 2013, 08:54:23 pm »
I just finished chapter 3 and for some reason, when I try to run the game, the background isn't drawn.

I compared my code to github code they are exactly the same, apart from variable names. Did anyone else had this problem?

I don't have much experience with game programming, but I suspect it has something to do with mSceneLayers not being iterated over and drawn, but don't hold me on that.

3
General discussions / Re: SFML Game Development -- A book on SFML
« on: July 26, 2013, 11:09:57 am »
Hello, hopefully this is in the right place.

I have this book and I'm at the end of chapter 2. However I can't compile it in VS2012. I created the resource holder class almost word-for-word from the book (except for variable name and exception text) and took the code from chapter 1 and changed it so that it should work with the ResourceHolder class.

However, when I try to compile it, I get ton of errors. I have experience with C++ and to me, my code feels like it's OK, I don't see any errors with it. Instead of reposting it here, here is link to stackoverflow where I originally posted this question.

http://stackoverflow.com/questions/17876510/visual-studio-wont-compile-template-class-with-inl-implementation#17876808

If you could tell me what I'm doing wrong, I would be very glad.

Pages: [1]