1
SFML projects / Re: 2D Game Engine Made Using SFML 2.1 - Open Source
« on: June 03, 2017, 02:03:23 pm »
Yes,
I totally agree with you on the keyboard and const reference, especially const reference. Even if the github says 10 months, this code is older than that, 10-11 months ago was when I decided to create a public repository for the project. At that time I was not worried about const reference, which now I totally am right now. But because I never used the engine again I never revisited this code.
For the static variables, as far as I remember those are implemented like that because I wanted to allow access to some functionalities without the need to instantiate that, I will try to revisit this code with another eyes.
As in the proposal of the final project I put to many items I had to implement those like I specified.
There is another point where I want to improve performance, which is the pathfind, as it manages objects with different sizes, but the initialization process of the vector is poorly implemented. Because I calculate for each tile how many tiles around it are free, so if this tile have 4 free neighbors this means that I can pass an element 4 times bigger then it on that tile (or node as it becomes later), the process to analise the neighbors are not well implemented.
Also agreed that I should use fstream, and initializers list (which for the time when I implemented this project it was an experience to use c++11, so a lot of move, initializer list, smart pointers and other nice features were left behind).
Thanks for the feedback
I totally agree with you on the keyboard and const reference, especially const reference. Even if the github says 10 months, this code is older than that, 10-11 months ago was when I decided to create a public repository for the project. At that time I was not worried about const reference, which now I totally am right now. But because I never used the engine again I never revisited this code.
For the static variables, as far as I remember those are implemented like that because I wanted to allow access to some functionalities without the need to instantiate that, I will try to revisit this code with another eyes.
As in the proposal of the final project I put to many items I had to implement those like I specified.
There is another point where I want to improve performance, which is the pathfind, as it manages objects with different sizes, but the initialization process of the vector is poorly implemented. Because I calculate for each tile how many tiles around it are free, so if this tile have 4 free neighbors this means that I can pass an element 4 times bigger then it on that tile (or node as it becomes later), the process to analise the neighbors are not well implemented.
Also agreed that I should use fstream, and initializers list (which for the time when I implemented this project it was an experience to use c++11, so a lot of move, initializer list, smart pointers and other nice features were left behind).
Thanks for the feedback
