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

Author Topic: SFML Game Development by Example - 4th SFML book  (Read 157017 times)

0 Members and 1 Guest are viewing this topic.

HoodedSpectre

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #165 on: December 16, 2016, 09:38:44 pm »
Awesome I did not see it on the website when I was looking the other day. I just ordered it and I look forward to read it!
« Last Edit: December 16, 2016, 09:56:28 pm by lurkerz »

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #166 on: December 17, 2016, 12:00:20 am »
remember
these are Ebooks

I have a year subscription to that site so I get everything

so I'm not positive what exactly what ebook means

I am able to download pdfs of books,
I am able to get some books on my kindle
I am able to read all books on the site as web pages 

so I'm not sure what you got for $5
I guess any of those could be considered an "ebook" 
you may get all of that for $5





HoodedSpectre

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #167 on: December 17, 2016, 01:35:52 am »
remember
these are Ebooks

I have a year subscription to that site so I get everything

so I'm not positive what exactly what ebook means

I was a member for a long time but I didn't use the site enough, between school and work. As far as the eBook only goes it's everything that isn't a physical copy if I do recall correctly.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #168 on: December 17, 2016, 10:22:11 am »
remember
these are Ebooks

I have a year subscription to that site so I get everything

so I'm not positive what exactly what ebook means

I am able to download pdfs of books,
I am able to get some books on my kindle
I am able to read all books on the site as web pages 

so I'm not sure what you got for $5
I guess any of those could be considered an "ebook" 
you may get all of that for $5

Their 5$ offer is for eBooks only, which is essentially the same content you get as a "flatrate" using the Mapt subscription. The only thing you won't get is a physical paper copy for that price.

mequint

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: SFML Game Development by Example - 4th SFML book
« Reply #169 on: December 19, 2016, 09:35:34 pm »
First off, I want to say that this has been one of the best game development books I've come across.  There are a lot of concepts that I had only heard about before that are fully implemented in this book.  That's cool!

I am having a bit of a problem.

Using Visual Studio 2015, I have tried implementing the code in Chapter 7 and I am getting a runtime error in the MainGame_State where the Character class throws an exception when attempting to get the name of the "Idle" animation in the Animate method.   It seems to happen when the AnimBase class calls the GetName() method. 

I tried comparing it to the original source code provided and I'm not seeing any problems in the code.  I also tried creating a new project and adding the complete source so that I could move on to Chapter 8 but that didn't even get past the Intro screen code...

Help!
« Last Edit: December 19, 2016, 09:39:37 pm by mequint »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10777
    • View Profile
    • development blog
    • Email
SFML Game Development by Example - 4th SFML book
« Reply #170 on: December 19, 2016, 11:04:05 pm »
Build as debug build and step in with the compiler. Then you can check if the object you're trying to access is valid and you can provide the call stack.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #171 on: December 20, 2016, 01:07:43 am »
First off, I want to say that this has been one of the best game development books I've come across.  There are a lot of concepts that I had only heard about before that are fully implemented in this book.  That's cool!

I am having a bit of a problem...
Thank you for your kind words! :)

As eXpl0it3r said, you should really provide a call-stack of the exception. It's very possible that, perhaps, some old code made its way to production stages. It's not unheard of with Packt. I ran my own version of both chapters just now and they work fine. Feel free to post the stack here and I'll try to help you out.

mequint

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: SFML Game Development by Example - 4th SFML book
« Reply #172 on: December 22, 2016, 05:54:38 am »
Well, here is the callstack:

>   Game World.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Check_offset(const unsigned int _Off) Line 2271   C++
    Game World.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right, unsigned int _Roff, unsigned int _Count) Line 1151   C++
    Game World.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right) Line 783   C++
    Game World.exe!AnimBase::GetName() Line 65   C++
    Game World.exe!Character::Animate() Line 237   C++
    Game World.exe!Character::Update(float dt) Line 195   C++
    Game World.exe!Enemy::Update(float dt) Line 38   C++
    Game World.exe!EntityManager::Update(float dt) Line 73   C++
    Game World.exe!State_Game::Update(const sf::Time & time) Line 72   C++
    Game World.exe!StateManager::Update(const sf::Time & time) Line 46   C++
    Game World.exe!Game::Update() Line 27   C++
    Game World.exe!main() Line 9   C++
    [External Code]   
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]   

I at first thought that this could be a loading problem but the resources loaded fine for the rest of the project. 

I'm running through the code one more time just to make sure it wasn't a coding error.

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #173 on: December 24, 2016, 09:07:42 am »
Your current animation in the SpriteSheet class may be null for some reason. Please zip up and send me all of the code that makes up the project, along with any entity or configuration files. I'll check it out and let you know what the problem is.

mequint

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: SFML Game Development by Example - 4th SFML book
« Reply #174 on: December 27, 2016, 09:56:30 pm »
I have zipped up the code and sent it your way. 

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #175 on: December 28, 2016, 12:59:48 am »
I have zipped up the code and sent it your way.
Alright, thanks. I got your email. I'll try to get back to you about the code as soon as I can, but I'm quite busy at the moment, so it will be a day or two. Still, I'll try to find some time earlier and keep you in the loop.

HoodedSpectre

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #176 on: January 05, 2017, 10:49:51 pm »
OrderNexus this wait is killing me, do you have an estimate on how much longer until your new book comes out? I know you can't give a specific day but I'm eagerly awaiting it.

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #177 on: January 06, 2017, 10:08:09 am »
OrderNexus this wait is killing me, do you have an estimate on how much longer until your new book comes out? I know you can't give a specific day but I'm eagerly awaiting it.
I'm finishing up the last chapter tomorrow, so it will definitely be out in January. I would say probably in the next week or two.

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #178 on: January 06, 2017, 10:49:32 am »
Well, here is the callstack:
...
One really common and stupid mistake I've made that I'd like to acknowledge here is the necessity to take out line 201 in the EventManager.cpp, inside LoadBindings():
int code = std::stoi(keyval.substr(end + delimiter.length(), keyval.find(delimiter, end + delimiter.length())));
I really don't know why this line stayed in, but after all of the GUI stuff is implemented, this line needs to be removed. Outside of that, I have compiled a list of other quick things I caught with a debugger in your code that were probably just simple copying errors. Please look them over, and I also recommend you comb your code with a debugger as well. Perhaps a static-analysis tool as well, that will be useful when catching weird bugs. I'm sure you just missed an initialization somewhere, and that's what the call-stack looks like to me. AnimBase or one of the parent classes is probably nullptr.

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: SFML Game Development by Example - 4th SFML book
« Reply #179 on: January 20, 2017, 12:04:38 am »
OrderNexus this wait is killing me, do you have an estimate on how much longer until your new book comes out? I know you can't give a specific day but I'm eagerly awaiting it.
I'm finishing up the last chapter tomorrow, so it will definitely be out in January. I would say probably in the next week or two.

Amazon says
February 6, 2017
Mastering SFML Game Development Paperback 
https://www.amazon.com/Mastering-SFML-Development-Raimondas-Pupius/dp/178646988X/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1484866397&sr=8-10

packtpub says January
https://www.packtpub.com/game-development/mastering-sfml-game-development

no table of contents yet, but there's this description

"It begins by going over some of the foundational code necessary in order to make our RPG project run.

By the end of chapter 3, we will have successfully picked up and deployed a fast and efficient particle system that makes the game look much more 'alive'.

Throughout the next couple of chapters, you will be successfully editing the game maps with ease, all thanks to the custom tools we’re going to be building.

... After being introduced to the use of shaders and raw OpenGL, you will be guided through implementing dynamic scene lighting, the use of normal and specular maps, and dynamic soft shadows.

However, no project is complete without being optimized first. The very last chapter will wrap up our project by making it lightning fast and efficient."

What You Will Learn
* Build custom tools, designed to work with your specific game
* Use raw modern OpenGL and go beyond SFML
* Apply GLSL and advanced lighting techniques to really light up the screen with custom effects
* Implement a very fast and efficient particle system by using a cache-friendly design
* Use advanced lighting techniques to add that extra touch of sophistication
* Revamp your code for better structural design, faster rendering, and flashier graphics
* Utilize networking to build better software for group projects.