Cuberite Forum
PathFinder status - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: PathFinder status (/thread-1571.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


cPathFinder and cPath merged - LogicParrot - 04-26-2015

Regarding the code:
I merged cPathFinder and cPath into one class and called it cPath. The changes have been pushed to Github, there's still some polishing to be done but the interface and the code already feel much cleaner. Comments are welcome, especially about the interface.

Regarding code style:
  • Can I make CheckBasicStyle.lua only check a specific file? scanning the whole project is just too slow.
  • The constructor line is pretty long, I wanted to spread the parameters over several lines, but I can't seem to satisfy CheckBasicStyle.lua. What is your code convention here? Do you just keep the long line?
  • Should I indent after an #ifdef?
  • I removed most of the debugging mode bloat, only the really needed parts remain. The flag is stilled called __PATHFIND_DEBUG, better name suggestions are welcome.
  • I hope all the code convention issues are fixed, Comments are welcome.



RE: Implementing Pathfinding - worktycho - 04-26-2015

You can modify the Allfiles.lst file before running CheckBasicStyle to change which files it runs over. Then just delete Allfiles.lst afterwards so cmake regenerates it.

Also you should probably remove the two leading underscores from the PATHFIND_DEBUG macro. Names that start with two underscores are resserved for the c++ implementation.


RE: Implementing Pathfinding - xoft - 04-26-2015

Rename the macro to "COMPILING_<whatever your test program is called>" - that way the intention is much clearer, than a generic Debug. Debug what? How?


CheckBasicStyle.lua wrapper - LogicParrot - 04-26-2015

(04-26-2015, 08:28 PM)worktycho Wrote: You can modify the Allfiles.lst file before running CheckBasicStyle to change which files it runs over. Then just delete Allfiles.lst afterwards so cmake regenerates it.
Thanks. I cobbled up a script:
Code:
#!/bin/bash
#AllFiles_mine.lst is a list of files you want checked.
cd ......./MCServer/src/
mv AllFiles.lst temp.lst
mv ../../AllFiles_mine.lst AllFiles.lst
lua CheckBasicStyle.lua
mv AllFiles.lst ../../AllFiles_mine.lst
mv temp.lst AllFiles.lst



RE: Implementing Pathfinding - xoft - 04-27-2015

I was hoping to add some possibilities to the check script, so that it can be run on a single file, or on a list of files. That way, you could use it from an IDE to check the current file, and as a git pre-commit hook to check only the files being committed. Haven't got around to it yet.


RE: Implementing Pathfinding - LogicParrot - 04-27-2015

Can we consider the interface roughly complete?


World.h - LogicParrot - 04-28-2015

I am having trouble include World.h in cPath.h, it is causing some weird compilation errors all over the project. I am confused, have I missed something?


RE: Implementing Pathfinding - worktycho - 04-28-2015

Its probably Globals.h. World.h assumes it is only included from Globals.h. Its nasty in terms of modularity, but It speeds up MSVC builds.


RE: Implementing Pathfinding - LogicParrot - 04-28-2015

All blocks that I place disappear after logging out, this is also true for the master branch. What's going on?


RE: Implementing Pathfinding - NiLSPACE - 04-28-2015

Do you have the world's scheme set to Forgetful? Otherwise the chunk might be corrupted. In that case try removing the region folder.