1
General / Re: SFML+CLION +CMAKE (Windows10) configuration
« on: August 16, 2017, 09:04:56 pm »
I have Windows 8.1 and am currently using CLion with SFML. So, I'll see if I can help you with you problem.
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.
Is there a reason why you don't use state-of-the-art algorithms for pathfinding? Breadth-first search is highly inefficient for shortest paths, because it exhaustively checks all possible paths. The Dijkstra algorithm improves on this by taking into account the distance from the start, and A* achieves even better results through heuristics that estimate the distance to the target from any node.
There are existing implementations of graph algorithms in the LEMON library. A* is currently not in the main branch, but available as an external contribution. But already Dijkstra's algorithm (which is a part of LEMON) is better than BFS.
The "fixed time step" that people are (I hope) referring to is the one seen in the part of that article labelled "Free The Physics" (not "Fixed Delta Time"). This creates a time-step that is fixed and regular which effectively means that you always use the same time-step and the results are the same on all machines (and is identically repeatable).Would this (fixed time step) not be the preferred method of choice for all applications? For a simple platformer game like Super Mario Bros. would this method be the ideal? I may be misunderstanding, as I am new to certain aspects of game development.
The first project (snake) uses a fixed timestep, unlike the last two that rely on a variable timestep. The first bouncing mushroom example actually wasn't capped or adjusted in any way, and was later used to underline the issue of different execution times between varying systems. It was then adjusted to use delta time in order to run at a constant speed near the end of Chapter 2, so if you noticed that behavior before, you were absolutely correct.So, the platformer game and the RPG-styled game both run in variable timestep, correct? I ask because I'm currently trying to make a platformer game following your example. Could you explain your reason for using a variable timestep method for your platformer example over the other methods (fixed timestep, minimum timestep)?
That's really odd. I just tested it myself, and it seems to be working fine. Please feel free to send me your code through either the PM function on these forums, or directly to my email address: order.nexus.dev@gmail.com. I would be happy to help you out!
Edit: One thing you should check is the order in which data members of the classes are declared. Since they're allocated on the stack, the destruction of these objects will follow in the reverse order of declaration. Make sure to consult the code that came with the book, and if that doesn't work, please feel free to contact me!