mrcheeze / botw-waypoint-map Goto Github PK
View Code? Open in Web Editor NEWMap of the 226 map waypoints that count towards 100% map completion in Breath of the Wild.
Map of the 226 map waypoints that count towards 100% map completion in Breath of the Wild.
To map.py I added the following, and for less confusion, swapped Z and Y in the code.
import numpy, pytspsa
locations = []
[...](https://github.com/MrCheeze/botw-waypoint-map/blob/gh-pages/map.py#L43)
x,y,z = float(translate.attrib['X'].rstrip('f')), float(translate.attrib['Z'].rstrip('f')), float(translate.attrib['Y'].rstrip('f'))
f2.write('{"internal_name":"%s", "display_name":"%s", "x":%g, "y":%g, "z":%g},\n' % (saveflag, name, x, y, z))
locations.append((x,y,z))
img_x = int(x/2 + 3000)
img_y = int(z/2 + 2500)
...
tspsolver = pytspsa.Tsp_sa()
locations_np = numpy.asarray(locations, dtype=numpy.float32)
tspsolver.set_num_nodes(len(locations))
tspsolver.add_by_coordinates(locations_np)
tspsolver.set_t_v_factor(200.0 / len(locations))
tspsolver.sa_auto_parameter(24)
tspsolution = tspsolver.getBestSolution()
tsproute = tspsolution.getRoute().split('-')
tsproute.pop()
past_point = None
for p in tsproute :
x,y,z = locations_np[int(p)].tolist()
if past_point != None:
map_draw.line((past_point, (x/2 + 3000, y/2 + 2500)), fill='red', width=3)
past_point = (x/2 + 3000, y/2 + 2500)
...
botw_map.save('BotW-Map-Labeled' + str(tspsolution.getlength()) + '.png',optimize=True)
Within a few seconds a nice path around the map was created, then I renamed the file and had it loaded in index.html
I did change index.html to load BotW-Map-Labeled.png and changed style of .waypoint:hover { to have opacity: 1; and .waypoint to have opacity: 0 for better display.
The solution is produced extremely quickly, even quicker if you keep it 2d.
The demo code for pytspsa has the following:
if len(c) <= 100:
solver.set_t_v_factor(min(t_v_factor, 200.0 / len(c)))
else:
solver.set_t_v_factor(min(t_v_factor, 60.0 / len(c)))
And auto parameter can be lowered to 8 and such, if the waypoints start to get into the thousands, but since most points are only a few dozen or hundred, the parameters should be fine as it stands.
Example produced map for some shrines I needed to visit with mostly convex solutions:
There is no point name the Hyrule Kingdom
and Hebra Trailhead Lodge in the north of Rito Village doesn't in the map
You tool is very useful for me
Thank U very much
The map_locations.js only has 187 locations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.