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

Show Posts

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.


Topics - msteve

Pages: [1]
1
SFML projects / AStar Pathfinding with Compass
« on: November 03, 2014, 03:22:01 pm »
Hello all,

I was developing a little game when I was faced with the problem of pathfinding. So I share my experience for this kind of problems with a small lib that I created. I implemented a function that uses the algorithm AStar.

https://github.com/smagras/Compass

Here a little tutorial, but in french^^"  (More explained than on github)
http://idevlog.atspace.eu/magrasSteve/a-pathfinding-avec-compass/

And here you can see how to use the lib (we have 2d map, start point and a end point):

Quote
// Load map from file
Compass::PCore::Matrix<int> mapi = getMapFromFile("mapInput.txt"); // Just to init matrix, do your own code here

// Config parameters for the algorithm
Compass::PPathfinding::AStar  astar;
astar.smoothPath(true); //To have smooth path
astar.init(&mapi);

// Find the path from pend to pstart
Compass::PCore::Point pend(2,2);
Compass::PCore::Point pstart(8,8);
std::list<Compass::PCore::Point> res = astar.run(pstart,pend);

// Save result in file
savePathInFile("outFile.txt",mapi,res); // just show the result

I hope, it could help some peoples =)
(There is no many test for the moment, performances problems could exist :P )

2
General discussions / SFMLEasy - Compile the lib quickly
« on: July 20, 2014, 11:11:39 pm »
Hello everyone,

I created a small program to help people to easily compile SMFL. I created it because when i began to use sfml i was very discouraged because of the recompil.

So this small program can help you if you want to compil the sfml.
At the beginning you must set paths for Mingw, master, cmake and start the compilation.

You must provide the path to of your minGW and if you dont have cmake or master, just type "auto" and the sofware will download it for you.

Then you type "easy install" for compilation.
Note: On my computer I have to disable antivirus to run this command.

If you want to reconfigure type "easy config".
And using type "help"

You just need to download on github: https://github.com/smagras/SFMLEasy
And run the .bat (which launches the .jar)  because i have code this in java.

If you use the auto config, the lib will be in the download folder in master.


I hope it will please you and it will help some people because I love sfml but it's so painfull to install when you don't know ^ ^ "

Tell me if you have problems and I'm trying to fix them. I will try to add features soon and if you have any idea you can participate =)

PS: I'm french, i'm sorry for the langague.

Steve.

Pages: [1]