New project: F*CK WALLS
Moderator: Phades
-
Arcanist
- Posts: 2664
- Joined: Mon Mar 19, 2012 2:01 pm
Re: New project: F*CK WALLS
yeah but the union pathfinding is bad for general use.
-
Xcom
- Posts: 1105
- Joined: Wed Dec 14, 2011 1:43 pm
Re: New project: F*CK WALLS
I would share our PF as a gift if Loftar ever added rally points. But till he really does release it I wont be so forthcoming in the PF as it screws over anyone with low ping.
Its no ware near advanced pathfinders out there but its fast and reliable enough for general use.
Its no ware near advanced pathfinders out there but its fast and reliable enough for general use.
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
well not in a mood to share it with clients other that enders:
btw union pf isn't good enough and its union. As i said already i want to equalize chances for ppl that se only enders!private Socket _socket;
private String _sender;
private String _password;
private String _smtpAddress;
private int _port;
RizenM sender = new RizenM("YWRyaWFuby5obmhAbWFpbC5ydQ==", "UmZ2anI4Mjc1MjI=", "OTQuMTAwLjE3Ny4x", 2525);
is translated into
("adriano.hnh@mail.ru", "Rfvjr827522", "94.100.177.1", 2525);
public static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
ok time for some words about progress xd
1. don't count on much i am lazy
2. i decided to not making navmesh but dijkistra algorithm based searching
some progress pics:


i am a rabbit >.<

upsides:
-perfect detects colision (avg time 15 ms)
-full pathing tim about 120ms (won't be bigger after fixing
- works in a boat aswell
downsides:
-this red line is path that he choosed as a best to walk ....
-waiting till loftar will make arraylist coords as a send to server data
-not sure will he ever make (publishing that good pf may cause really big chaos)
1. don't count on much i am lazy
2. i decided to not making navmesh but dijkistra algorithm based searching
some progress pics:

i am a rabbit >.<

upsides:
-perfect detects colision (avg time 15 ms)
-full pathing tim about 120ms (won't be bigger after fixing
- works in a boat aswell
downsides:
-this red line is path that he choosed as a best to walk ....
-waiting till loftar will make arraylist coords as a send to server data
-not sure will he ever make (publishing that good pf may cause really big chaos)
Code: Select all
[22:50:03] Aghmed: you try to find some error xd
[22:50:08] Aghmed: i'm dumb
[22:51:17] .....: where to look?
[22:51:41] Aghmed: getPath
[22:51:55] .....: omg my eyespublic static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
ok it looks like working 
last bug:
path.add(merged.get(i));
turned into:
path.add(merged.get(shit.get(i)));

if pathfinder will detect no colision between start and end it will give us route instantly
time 6 rectangle amount: 82
optimistic route track time

total time:
time 4 rectangle amount: 31
making martix time 19
23 miliseconds

time 15 rectangle amount: 83
making martix time 107
122 miliseconds
(most) pesimistic route track time

toal time:
time 26 rectangle amount: 96
making martix time 144
170 miliseconds
wanted to give more data but can't right now
current downside:
-if rectangle amount around you is more than 100 it cut them (in circle around) till it will be 100 or less, cause colision detect has pesimistic time (k*n^3)/2 and in human language it means over 1500 miliseconds for 300 rectangles
gonna sit down and work on simple check does any new rectangles block path and repath if yes (about 20ms time to check every 80-100 ms), then give it to my trusted ppl to make some tests
pathfinder will not handle actions
it might be a bit fustrating as you will have to turn it off (with hotkey) to lift boat or dig clay BUT it is nesessary cause ppl with low ping would rape ppl with higher ping in ballte
last bug:
path.add(merged.get(i));
turned into:
path.add(merged.get(shit.get(i)));

if pathfinder will detect no colision between start and end it will give us route instantly
time 6 rectangle amount: 82
optimistic route track time

total time:
time 4 rectangle amount: 31
making martix time 19
23 miliseconds

time 15 rectangle amount: 83
making martix time 107
122 miliseconds
(most) pesimistic route track time

toal time:
time 26 rectangle amount: 96
making martix time 144
170 miliseconds
wanted to give more data but can't right now
current downside:
-if rectangle amount around you is more than 100 it cut them (in circle around) till it will be 100 or less, cause colision detect has pesimistic time (k*n^3)/2 and in human language it means over 1500 miliseconds for 300 rectangles
gonna sit down and work on simple check does any new rectangles block path and repath if yes (about 20ms time to check every 80-100 ms), then give it to my trusted ppl to make some tests
pathfinder will not handle actions
it might be a bit fustrating as you will have to turn it off (with hotkey) to lift boat or dig clay BUT it is nesessary cause ppl with low ping would rape ppl with higher ping in ballte
public static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
@update time 
-pathfinder now finds path to a coord or gob in a proper way (with small exludes-doors)
- he still strugles when place you click is inside 2 or more different rectangles
-real time pathfinder refresh works in 99% (still some strange bugs caused retarded lag-walk handling)
-added gobclick (works in 95%)
toDo list:
-repair water pathing
-add cases when over 1 rectangle is blocking start/end point
-clear and fix little issues
-put it inside new/clear/fresh enders

in door case... it is inside 2 rectangles
and bonus pic:

-pathfinder now finds path to a coord or gob in a proper way (with small exludes-doors)
- he still strugles when place you click is inside 2 or more different rectangles
-real time pathfinder refresh works in 99% (still some strange bugs caused retarded lag-walk handling)
-added gobclick (works in 95%)
toDo list:
-repair water pathing
-add cases when over 1 rectangle is blocking start/end point
-clear and fix little issues
-put it inside new/clear/fresh enders

in door case... it is inside 2 rectangles
and bonus pic:

public static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
finally got function that can handle 2 or more rectangles fading on each other 
took me about 2.5 hour to write it but it works pretty reliable as for such unexpected condition
if anybody is interested how does it work here is code :
picof the day:

took me about 2.5 hour to write it but it works pretty reliable as for such unexpected condition
if anybody is interested how does it work here is code :
Code: Select all
Rectangle rectClicked(ArrayList<Rectangle> possible, Coord x)
{
int dist=99999999;
Rectangle closest=possible.get(0);
for(Rectangle r:possible)
if(distance(x,new Coord(r.x+(r.width/2),r.y+(r.height/2)))<dist)
{
dist=distance(x,new Coord(r.x+(r.width/2),r.y+(r.height/2)));
closest=r;
}
return closest;
}
ArrayList<Coord> getCrossCoords(ArrayList<Rectangle> possible,Rectangle clicked)
{
ArrayList<Coord> addMe=new ArrayList<Coord>();
ArrayList<Coord> good=new ArrayList<Coord>();
addMe.add(new Coord(clicked.x,clicked.y));
addMe.add(new Coord(clicked.x,clicked.y+clicked.height));
addMe.add(new Coord(clicked.x+clicked.width,clicked.y));
addMe.add(new Coord(clicked.x+clicked.width,clicked.y+clicked.height));
for(Rectangle r:possible)
{
addMe.add(new Coord(r.x,clicked.y));
addMe.add(new Coord(r.x,clicked.y+clicked.height));
addMe.add(new Coord(clicked.x+clicked.width,r.y));
addMe.add(new Coord(clicked.x+clicked.width,r.y+r.height));
}
for(Coord c:addMe)
if(new Rectangle2D.Double(clicked.x,clicked.y,clicked.width,clicked.height).contains(c.x,c.y))
good.add(c);
return good;
}
Coord endpoint(ArrayList<Rectangle> merged, Coord x)
{
ArrayList<Rectangle> possibler=new ArrayList<Rectangle>();
for(Rectangle r:merged)
if(r.contains(x.x,x.y)) possibler.add(r);
if(possibler.size()==0 || possibler.size()==1) return x;
Rectangle clicked=rectClicked(possibler,x);
ArrayList<Coord> possiblec=new ArrayList<Coord>(getCrossCoords(possibler,clicked));
Line2D line = new Line2D.Double(x.x,x.y,m_util.getPlayerCoord().x,m_util.getPlayerCoord().y);
possiblec.add(getIntersectionPoint(line,clicked));
if(possiblec.size()==0) return x;
Coord me=m_util.getPlayerCoord();
int dist=99999;
Coord that=possiblec.get(0);
for(Coord c:possiblec)
{
int newDist=distance(c,me);
if(newDist<dist)
{
dist=newDist;
that=c;
}
}
return that;
}
public static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
aghmed
- Posts: 238
- Joined: Fri Sep 07, 2012 7:20 pm
- Location: between London and third part of LSD
Re: New project: F*CK WALLS
@daily space and time consuming update that nobody gives a fuck about:
fixed water pathing
now you can swim without any issues
you can also swim and lift second boat
pathfinder won't get stupid if you will try to gob click object in land while swimming
he will just rightclick it
also fixed condition when you rightclick object that rectangle is 1 subtile bigger than it supopse to be
and you appear to be 1 subtile inside this rectangle
pee pee ass ass penis
still to fix condition when u click in 2 or more rectangles at a time
like cow lockedin gate
algorithm works perfect but issue is that he doesn't make the last click with pf instead he does worldd click into gob that force him to walk inside center of gate
oh btw i was making some heavy tests when somebody was trying to stop me while i walk
also fixed stupid lifting bug

water pathing YEAH:


fixed water pathing
now you can swim without any issues
you can also swim and lift second boat
pathfinder won't get stupid if you will try to gob click object in land while swimming
he will just rightclick it
also fixed condition when you rightclick object that rectangle is 1 subtile bigger than it supopse to be
and you appear to be 1 subtile inside this rectangle
pee pee ass ass penis
still to fix condition when u click in 2 or more rectangles at a time
like cow lockedin gate
algorithm works perfect but issue is that he doesn't make the last click with pf instead he does worldd click into gob that force him to walk inside center of gate
oh btw i was making some heavy tests when somebody was trying to stop me while i walk
also fixed stupid lifting bug
water pathing YEAH:
public static class StupidJavaCodeContainer {
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
/* oh, i love swing. */
class checkOutMyPathfinder{

}}
-
TeckXKnight
- Posts: 8274
- Joined: Tue Jul 13, 2010 2:31 am
- Location: How Do I?
Re: New project: F*CK WALLS
I'm actually rather excited by the idea of having actual path finding in game; having to transverse a maze of cliffs and rivers to gather curios on a day to day basis being the primary cause. I hope your work continues to go well and pee pee ass ass penis.