forthekill
SOC-11
So I've been working on a Javascript library for Traveller over the last few weeks and so far so good. I've mentioned this in a couple of other threads but I figured it should have its own thread.
Disclaimer: I'm not a Javascript programmer, or even a programmer by trade (though I do have a CS degree), so I'm learning as I go.
I've got the following in really good shape:
Sector Generator (Currently Megatraveller rules by and large)
World Generator
Sector Parser
Trade Route Generator (per GURPS Far Trader)
HTML5 Canvas Mapper (hexes, hex numbers, worlds, names, starport, bases, zones, routes to some degree)
Some of the code is borrowed from Joshua Bell (who's been very helpful) and I think I've credited him where appropriate, but I need to go through the JS again to make sure I'm not missing anything. Most of the code is my own, except for the parser, some of the sector gen code, and the algorithm to walk the map to find routes.
I have all the JS methods in a number of files so I can work on them easily, and at some point I will more logically organize them into a few main JS files. I am still working on streamlining methods and reusing code where possible.
Most of the methods are commented pretty well, but I still have some work to do in that area.
I've also tried to standardize objects across all the "libraries", so methods work with a sector, a world, and/or a Canvas context as parameters.
What I need still need to do:
- World name generator
- Improving the performance of the dog slow trade route calculations
- Border generation (I am very intrigued by this by Joshua Bell and am hoping he might help me get that working with what I've got )
- Subsector generation
- Taking into account adjacent sectors for routes
- Border rendering
- MSEC route rendering
- Fixing the trade route rendering so that only the highest BTN route between worlds is rendered
- Combining multiple routes between worlds that should be upgraded to a higher BTN
- Subsector rendering
- Multiple outputs besides Canvas (print, PDF, sector files, MSEC, SVG?, etc.)
Examples:
Sector parsing with Canvas map and sector data display (Chrome and Firefox only)
Sector generation with Canvas map in layers
Sector generation with Canvas map in layers with route generation and rendering IN TESTING (WARNING: Trade route calculation is intensive and you may think the page is frozen. Give it time.)
Feedback is wanted and needed!
Disclaimer: I'm not a Javascript programmer, or even a programmer by trade (though I do have a CS degree), so I'm learning as I go.
I've got the following in really good shape:
Sector Generator (Currently Megatraveller rules by and large)
World Generator
Sector Parser
Trade Route Generator (per GURPS Far Trader)
HTML5 Canvas Mapper (hexes, hex numbers, worlds, names, starport, bases, zones, routes to some degree)
Some of the code is borrowed from Joshua Bell (who's been very helpful) and I think I've credited him where appropriate, but I need to go through the JS again to make sure I'm not missing anything. Most of the code is my own, except for the parser, some of the sector gen code, and the algorithm to walk the map to find routes.
I have all the JS methods in a number of files so I can work on them easily, and at some point I will more logically organize them into a few main JS files. I am still working on streamlining methods and reusing code where possible.
Most of the methods are commented pretty well, but I still have some work to do in that area.
I've also tried to standardize objects across all the "libraries", so methods work with a sector, a world, and/or a Canvas context as parameters.
What I need still need to do:
- World name generator
- Improving the performance of the dog slow trade route calculations
- Border generation (I am very intrigued by this by Joshua Bell and am hoping he might help me get that working with what I've got )
- Subsector generation
- Taking into account adjacent sectors for routes
- Border rendering
- MSEC route rendering
- Fixing the trade route rendering so that only the highest BTN route between worlds is rendered
- Combining multiple routes between worlds that should be upgraded to a higher BTN
- Subsector rendering
- Multiple outputs besides Canvas (print, PDF, sector files, MSEC, SVG?, etc.)
Examples:
Sector parsing with Canvas map and sector data display (Chrome and Firefox only)
Sector generation with Canvas map in layers
Sector generation with Canvas map in layers with route generation and rendering IN TESTING (WARNING: Trade route calculation is intensive and you may think the page is frozen. Give it time.)
Feedback is wanted and needed!
Last edited: