Yeah, went ahead and started a new repo & project using stuff I've actually learned at work. Yeah - even after writing code all this time you still need to keep learning new things. I have the basic schema so that we can create subsectors, systems in the subsector, and planets within the system. You may note that planets can point to other planets: this is how moons work as they are just planets. Or the case of Regina being in orbit around its gas giant (and I am too lazy to even go to the wiki to see what that name is!)
And I've created those tables as models with repositories and all that, as I am using dependency injection for this project (which means for some things it will be a lot simpler to maintain and update, but that is neither here nor there for you).
It uses a SQLite DB, and will create it on start up. I've added the automatic migrations, so that updates will automatically update your DB as I know I've left a few things out. What this really means is that when you run it, it will keep the database up to date automatically.
And then, of course, the question is how to run it. This is a website but not published anywhere. You can go to the repo here (MIT license which I think is the most open, but I've not checked recently), you can download the source code as a zip file:
Unzip and go to the project level in a terminal (Windows you can use terminal or powershell, Mac bash or whatever APple has "updated" its shell to: I stick with the classic bash as it works the same on other platforms I deal with. And I am stubborn!) Then you can just do "dotnet run" and it will start up. You then need to open a browser to that local host and *poof* there it is. Localhost is just your local machine. Unlike older MS web software, this does not require their IIS server and can run on a Mac, Windows or Linux box. You may have to install the .NET stuff but it *may* do that for you. If on a Windows machine it is already there most likely, and quite possibly already on a Mac as well.Right now, it is all the default stuff, but I did test scaffolding out the planet editor. It needs works as those IDs are actually foreign keys to other tables: for example, the atmosphereID will point to an atmosphere table that has the classic (or whatever!) atmospheres you want. I figure it should not be any issue if I do not supply any of the data but the user puts it in :) This way you can make your own descriptions.
And yeah, TPlanet as I decided to prefix all the Traveller specific tables with a T. Part of that is "System" may be a reserved key word and could cause issues with some things.
Anyway, a fun project that in theory anyone can run locally, and view the code.
Next steps are to get that planet view working the way I want, but then the longer-term objective is to generate a planet, then a system, then a subsector. Will anyone use it - probably not as there are a few already out there that do this. But it is fun and this tech stack I am pretty fast with and now that I understand more of it, I can make this work the way I think it should.
No comments:
Post a Comment