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

Author Topic: Mastering SFML Game Development (n-th SFML book?)  (Read 19524 times)

0 Members and 1 Guest are viewing this topic.

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #15 on: June 13, 2017, 05:13:19 am »
Hi _Imperial_,

Sorry about the late response. I've been incredibly busy for the past couple of days. The first problem does seem strange. Are you experiencing any other types of lag? Can you debug your code and spit out some basic information about the update loop while the problem persists, such as the delta time during the update? I'd have to know more details to really draw any useful conclusions.

Second problem might be happening in cases where you don't have your OpenGL context created yet, but you're trying to call a gl function. Make sure the context is actually created beforehand, again, probably by just stepping through code while debugging and making sure. You will want to take a look at the Window::Create method and see if the context has been established. Also make sure that the sf::ContextSettings variable in there actually reflects the GL context your machine supports. By default, I believe, it's v4.5. Try to downgrade it to 3.0 and see if it works. Chances are your graphics card may not support the latest GL versions.

Let me know if it works, and give me some more details on both issues if at all possible. Preferably, the type of exception you're getting, driver versions, glew version, GL version, etc.
« Last Edit: June 13, 2017, 05:22:41 am by OrderNexus »

_Imperial_

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #16 on: June 14, 2017, 05:15:37 am »
Hi OrderNexus, thank you for the reply.

About your questions:
1. No, there was no other types of lag: just the player movement. I tried using your version of chapter 9 files, just compiled and run and I experience the same issue. This issue started happening after chapter 5 (when we cut off SFML and started using openGL).

1.1. My delta time during the update? Let me know exactly what you want me to create so I can log something for you to see.

2. GLEW version I use is the latest on their website (v 2.0.0) which supports opennGL up to 4.5. My graphics card is simple, it only supports up to 4.4, but that didn't seemed to be the problem, because I use 4.4 in the context setting inside Window::Create() and I was able to follow the entire chapter 6 (when you create a rotating 3D cube on the screen as an introduction to openGL) and it compiled and ran just fine. As a comparisson, here is the setting I am using:
void Window::Create() {
        sf::Uint32 style = sf::Style::Default;
        if (m_isFullscreen) { style = sf::Style::Fullscreen; }

        sf::ContextSettings settings;
        settings.depthBits = 24;
        settings.stencilBits = 8;
        settings.antialiasingLevel = 0;
        settings.majorVersion = 4;
        settings.minorVersion = 4;

        m_window.create(
                sf::VideoMode(m_windowSize.x, m_windowSize.y, 32), m_windowTitle, style, settings);
        ...
}
Actually, the engine with those context settings compiled every time until chapter 9. It only started throwing an exception when we created that class called "GenericFBO" and used it to create the framebuffer m_FBO. The exception is thrown in this line:
void GenericFBO::Create() {
        if (!m_FBO) { glCreateFramebuffers(1, &m_FBO); } // <-- exception throws right here!
        ...
}
and the exception message is attached to the attachments below my post, followed by my graphics card settings. Let me know what you would like me to do in order to solve this. I'm really into game programming. I love it and I don't want small stones in the path to break my motivation to keep going. I want to start the debugging tool for the engine. I also bought another C++ book to further my knowledge! (https://www.amazon.com/How-Program-10th-Paul-Deitel/dp/0134448235/ref=sr_1_1?ie=UTF8&qid=1497409561&sr=8-1&keywords=deitel+deitel+c%2B%2B) 8) Supposedly a very good one.
« Last Edit: June 14, 2017, 05:20:51 am by _Imperial_ »

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #17 on: August 11, 2017, 07:41:57 pm »
Hi _Imperial_,

Sorry I wasn't able to reply sooner, I was actually away for quite a while and was unable to really be of any assistance. Let me know if you have figured out your problem, or if it still persists and I will do my best to aid you in resolving it.

Sidious78

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #18 on: August 30, 2017, 10:17:51 am »
I am well underway with designing an mmo, having spent most of the time writing the server code, and setting up the interface on the client-side.

About the map editior: Selecting a map size that exceeds 1000x1000 seems to cause all types of problems. Certainly, memory should not be an issue.

Anyone else having this problem? I canĀ“t seem to find any size limits in the map system itself.

OrderNexus

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #19 on: August 30, 2017, 04:12:04 pm »
That would probably have to fall under the issues of optimization, given the type of project you're working with. I would go with switching back to rendering individual tiles into a buffer texture that's the size of the screen to eliminate the need of having a large texture that may not be available on certain platforms. Without any more details I can't provide a better answer.

Schorsch

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #20 on: April 08, 2018, 10:15:30 pm »
I have some problems with the code. I started to fix some bugs in it but it is much work. So i started to fix the code of the first book, SFML Game Development By Example, because there i don't need to fixall problems in one step. The engine is build slowly over the chapters. Currently i fixed the code for chapter 1 to 9 and the others will follow. After that, i will try to get the code for this book running. If some of you guys have already fixed some of the problems, please contact me :)

JermaineD

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #21 on: April 10, 2018, 05:11:36 pm »
I have some problems with the code. I started to fix some bugs in it but it is much work. So i started to fix the code of the first book, SFML Game Development By Example, because there i don't need to fixall problems in one step. The engine is build slowly over the chapters. Currently i fixed the code for chapter 1 to 9 and the others will follow. After that, i will try to get the code for this book running. If some of you guys have already fixed some of the problems, please contact me :)

Are there big problems with the code or are the problems only minor things, Schorsch? I'm just curious.
« Last Edit: November 16, 2021, 06:08:44 pm by JermaineD »

Schorsch

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Mastering SFML Game Development (n-th SFML book?)
« Reply #22 on: April 11, 2018, 02:40:26 pm »
Are there big problems with the code or are the problems only minor things, Schorsch? I'm just curious.
Most of the problems are minor. I started to fix the code from his first book, because he uses this code in the new book as a base. I am almoust done with that part.
The problems vary from "void main(int argc, void** argv[])" like stuff to missing methods or codefiles. There are even some logical mistakes, malformed configuration files the game wants to read and so on. So it is much work to solve those problems. If someone wants to have the code, you can get it here. Currently, i fixed chapter 1 to 11. So there are three more chapters left. After that, i will make the same for the current book. If someone wants to help, feel free. :)

 

anything