Sunday, March 24, 2013
Summary
What a day. It was another one of those days where the code was just flying! At the end of it all, there wasn't a single element on the ambitious todo list I made this morning that hadn't been ruthlessly scratched out
Most of what I concentrated on was the mechanics and details of docking. Fully implementing it involved a lot of changes to existing code to make it capable of handling multiple "rooms." You all know that systems are essentially treated as "rooms" in LT, in that they are discrete entities, and you must move between them using jump gates / wormholes. Well, planets and space stations are also considered to be distinct "rooms" that are separate from the external environment. This makes sense for a number of reasons: namely, you don't need to simulate / draw the external environment at the full level-of-detail when you're inside one of these rooms. You might also need to cheat the space a bit, by making the interior bigger than the exterior actually is (this happens a lot in games). In general, I think it's a good idea to have things like stations be distinct rooms (I did spend a long time contemplating / debating that decision, but ultimately decided it is the right way to go). But for a game engine, "switching rooms" can be a pretty big deal, and getting it to work required improving the sound engine (to understand that sounds in one room should not be audible in another), the particle engine (for the same reason), and the simulation engine. By the end of today, everything was working!!! I can now land in a station, do what I need to do (so far just trade & grab a mission), and undock with no problems!
The nice thing about all of these changes today is that it brings LT a lot closer to being ready for planets as well as multiple systems. Even though I'm currently only using this stuff to implement stations, it's really the exact same logic that will handle planets and jumping from system to system.
I spent a lot of thinking time today on the whole universe simulation concept, especially as it relates to room switching. A few hours of thinking and a couple of sheets of math led me to some great improvements to the simulation engine that, in theory, allow it to handle an infinite universe in finite time. You might say it's impossible...but math is cool like that, it does things you wouldn't think are possible. If an infinite number of terms in a convergent series can sum to a finite number, then an infinite universe can be simulated in finite time That's brushing over a lot of the details, and, of course, in practice it's not so nice thanks to memory and other concerns. But the point is that the simulation engine is a lot better now, and definitely one step closer to being ready for the full-blown universe simulation! It can at least handle the LOD simulation of the external environment when you're in a station now (meaning, when you're docked, things are still going on outside, but in a way that doesn't slow down your CPU as much).
By the way, it shouldn't surprise you to know that there was an awful lot of exponential falloff involved today
Strong start to what will have to be a very strong week!
Hour Tally
Coding: 6.85
Composing: 0.07
Internet: 0.99
Testing: 1.47
Thinking: 1.91
Total Logged Time: 11.31
Post
Sun Mar 24, 2013 10:33 pm
#1
Week of March 24, 2013
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford