Sunday, May 26, 2013
Summary
Bit of an odd day...I was kind of all over the place
Driven by a seemingly-random impulse, I decided that today was just as good a day as any to delve into ye olde cross-platformitization (don't quote me on that wording). To that end, I planted a fresh Ubuntu install and got myself all set up on the desktop to do some linux porting work. Didn't get very far yet, but the important thing is that I started. I began acquainting myself with the cmake workflow on linux. It was really an excellent choice to move to cmake, as it's going to make porting a thousand times easier...I'm glad I switched when I did. I've already got the LT custom version of SFML compiled for linux and ready to go...and now for the beast - libltheory Managed to get so far as a makefile (meaning I've whipped my cmake files into cross-platform shape). Attempting to compile left me rather surprised at how many differences there are between gcc and msvc. It would seem that gcc is significantly more strict, and it appears that I've been doing some codey things that aren't going to fly on linux some I knew about and already suspected, but others I wasn't anticipating to be problematic.
Nonetheless, the important thing is that I'm already starting down that road, and it's better that I start figuring things out now while I've got a comparative excess of time (HA. as if.) I figure a few hours every now and then will get me to a working port in due time. In the mean time, I can start learning the lessons of porting to make sure that I keep them in mind as I move forward with these vast expanses of new code.
Speaking of new code, despite all this penguin-laden cross-platform hogwash, I did manage to stuff some new 1s and 0s into the old engine today. In particular, I worked on generating the connectivity information for regions (i.e., how systems are connected to one another). Star system connectivity is probably one of the only textbook algorithmic problems that I've seen so far in gamedev (besides pathfinding), and it's nice to know that the things they teach in school actually do come up at least once or twice in a blue moon Specifically, I think star systems should be connected via a minimal spanning tree, or some slight permutation or extension thereof. The explanation is simple enough: you might imagine that, in reality, the cost of a jump gate would be proportional to the distance of the jump (insert subspace stabilization technobabble). Hence, the optimal cost solution for connecting a region is via a...surprise surprise, minimal spanning tree. Throw in a few extra edges and some variance in the weights just for fun. Kruskal's is a very simple and intuitive solution to mst, and also the thing they teach you on day 1 (more or less) of algorithms class. So I took a bit of time to implement it today, and worked as hard as I could to do it with as few lines as possible. Ended up with about 25 lines, of which I'm fairly proud. Next step is to actually generate the jump gates and draw them on the system map, now that the connectivity information is present!
(linux hours logged as "Logistics")
Hour Tally
Coding: 2.85
Internet: 3.07
Logistics: 4.60
Testing: 0.64
Total Logged Time: 11.15
Post
Sun May 26, 2013 11:01 pm
#1
Week of May 26, 2013
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford