Return to “[Archived] Daily Dev Logs, 2012 - 2015”

Post

Week of May 26, 2013

#1
Sunday, May 26, 2013

Summary

Bit of an odd day...I was kind of all over the place :wtf:

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 8-) 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 :problem: 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 :roll: 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
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#2
Monday, May 27, 2013

Summary

Great day! I'm very happy with the universe generation progress that I made today. I both started and, from the the looks of it, finished connectivity generation today. After implementing a simple visualization, I was able to confirm that my Kruskal's was working properly and that, indeed, the algorithm produces very attractive system connectivity configurations. I spent a lot of the day figuring out how to produce variations of this. In the end, I settled on the slightly clever method of computing and merging multiple spanning trees, where the weights are randomized slightly between the runs. The result is a connectivity graph where anything that is "close" to being in the true spanning tree will get added anyway, meaning a lot of the low-hanging fruit will be taken. The region becomes more or less connected depending on how many trees are merged, so that's a nice little number to play with. Interestingly, at the low extreme (1 tree), there exists 1 and only 1 path between any two destinations! Interesting property (well, actually that's just a general property of an acyclic graph). At the high extreme (infinitely many trees), there would, theoretically, be connections between almost all systems. I have found 4 to 5 to yield pleasing results.

So...I'm happy with the structure of the universe, I'm happy with the connectivity...looks like we're pretty much good to go!! :clap:

Now, I must be honest about what I did for the rest of my day. Sometimes you just have to follow what's on your mind, and audio synthesis was on my mind too strongly for me to deny it today. So I worked a little bit more on generating audio and increasing my understanding of that extremely interesting beast :D Probably not relevant to LT (at least not LT1...), although it does improve my handle on math, and that is always a welcome side-effect. I actually did something a little bit absurd: I made a program that uses a shader to generate audio data. The reason was so that the generating function could be changed without restarting the program (yes, that's right, I use GLSL as my scripting language of choice)...so..."Real-Time Procedural Audio Synthesis on the GPU"... :P Sounds fancy, no?

Hour Tally

Coding: 5.95
Internet: 2.98
Testing: 2.24
Total Logged Time: 11.17
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#3
Tuesday, May 28, 2013

Summary

What an exciting day - you might say it was a day of one small jump for my ship, one massive step for Limit Theory! That's because today, I made my first inter-system jump!!! I took yesterday's work on connectivity and implemented the final piece: populating the systems with jumpgates corresponding to the generated links. Now, I'm not going to lie, it's a pretty ugly ordeal at the moment, but it didn't stop me from being excited when I did it for the first time. I took the lanes over to an ominous blue ball of plasma, approached it with not a care in the world, slammed into it, suffered a 15 second game stall, and was then abruptly teleported to the neighboring system :clap: Not pretty, but it worked!!! No special effects implemented yet, just a very basic point-to-point teleportation mechanism. But there's plenty of time to prettify things.

So that was quite exciting :D What wasn't exciting, however, is the fact that I have been noticing a very ugly screen that flashes for a split second when you start the game nowadays. It looks like the GPU equivalent of uninitialized memory, with random green bars and strange patterns. Not exactly a smooth start-up experience :thumbdown: I had a suspicion concerning the cause of it, and this suspicion led me straight into a very serious war against my code.

And now, I feel, I must take a moment to recount this war.
General of the Limit-Theoretic Grand Army wrote:As night hung over the vast steppes of the Rendering Core, we gathered our troops on an overhang that jutted out above the deep ravine in which the Framebuffer Encampment lay. It was an ugly settlement. Always had been. Probably one of my least favorite. But today...today it would pay the price. For too long has it caused us pain. I leaned my head over the precipice and glared down at hundreds of faraway figures going about their business, my lips curling back with disgust. For too long have we suffered on their behalf.

When we came to this continent a year ago, we had found only a few native tribes. The SFML tribe greeted us warmly, and offered us open trade with their settlements. Their people were clean, well-spoken, and went about their duties with an air of great efficiency. The irrKlang tribe was a bit more reclusive, but didn't cause much of a problem for us. Indeed, they were a noisy bunch, and from time to time we were awoken in the middle of the night by raucous drumbeats hitchhiking on the winds of the cold Renderian night. Annoying, perhaps, but harmless. And then there was the OpenGL tribe. They outnumbered the others by a wide margin. It was clear that we would have to work with them if we were to make a home for ourselves in this land. The GL tribe was primitive but numerous. Ugly as neanderthals and about equally as intelligent, they roamed the lands with a fearsome pride. The GLs were unclean, unpredictable, and, overall, unappealing. You could never really tell what a GL was thinking, nor what it wanted from you, nor what it was going to do next. Although we tried to befriend them to the best of our abilities, the tension never fully subsided. Some GL villages were easier to subdue than others. A few offerings out of their arcane "SuperBible" appeased the more docile settlements. But some remained unfailingly hostile. Global State. Error Handling. And, perhaps the most hostile of all, the Framebuffer settlement. We knew that, sooner or later, something would have to be done. We just didn't know when.

That's what led us to this moment. Poised atop the most tactically-advantageous piece of rock in sight, we savored the crisp scent of the Renderian evening. It was a fine night to be an LT. It would not be a fine night to be a GL. But they did not know. I turned back to face the noble warriors behind me. "I'd give you a pep talk." I paused and let the odd statement hang in the air. "But I know that'd be about as effective as random access on a linked list." They grimaced. "You know what to do. It's what you're best at." These men had ripped code a thousand times before. They did, indeed, know what to do. I grabbed the reigns of my Logitech steed, threw myself over the top, and planted a firm heel in it's side.

We descended upon them swiftly and mercilessly. We slayed the unclean, purged the superfluous, and clarified the ambiguous. We cleansed the sickly, fortified the well-intentioned, and expelled the useless. It was over before it even began. In a matter of hours, we had converted a disease of a settlement into a shining beacon of light - a reminder to all that in simplicity lies power. The remaining GLs - though significantly less numerous than before - were invigorated by this message.

But no victory is free. We lost hours, we lost steeds, and we lost good men. It wasn't the first time. It won't be the last. But we are the LT, and we will not yield until our lands shimmer with cleanliness. And that, my friends, is why each and every one of you should be proud to be an LT.
:shock: But yeah, I definitely feel better about a lot of the rendering code now :thumbup: As a bonus, this overhaul seems to have fixed the problem with the main menu sometimes lagging and taking a long time to come up (don't ask me why, I've literally no idea why these changes would have affected that, but one does not question the far-reaching rewards of cleanliness).

Hour Tally

Coding: 6.73
Internet: 2.77
Testing: 1.58
Thinking: 1.39
Total Logged Time: 12.47
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#4
Wednesday, May 29, 2013

Summary

Well, I could write another tale of war today...as it turns out, we couldn't stop after cleansing just the GL encampment...today we turned our sights on and attacked the irrKlangs...! If you've followed the logs you know that I've had a pretty rocky relationship with the irrKlang sound engine. Although it's simple and it works, the performance issues bit me really hard and I've never quite trusted it again. Even after I thought I had solved them, we heard a few reports of performance issues that seemed to be related to audio with LTP. So today, I kicked it out :clap:

FMOD is the standard in audio engines, and I probably should have used it from the beginning. But the truth is, it has a high price tag. I was hoping to get around that with irrKlang. But today, I finally gave it up and switched. FMOD is beautiful. The interface is cleaner, the engine is far more powerful, and, most importantly, far more performant. It does all the important performance things automatically so that I don't have to, which means the code driving the sound engine got cut in half. No more manual prioritization and virtualization of the sounds, no more threading the API calls, and no more custom 3D spatialization (FMOD spatialization sounds awesome)...so much code got ripped :thumbup: Overall, it feels right. Yes, it'll cost more to license, but in the end, what else can I do after getting overfunded but look for the best of the best to make the game as good as possible? Having a top-notch sound engine seems like a good cause.

The reason that I actually started looking into switching, though, was because I wanted to be able to have real-time DSP effects in the game (reverb, etc.). irrKlang's support of them is limited at best. FMOD is built on an incredibly powerful and modular DSP engine. It's a whole different league!

Say hello to the new tribe of Renderia :wave:

(Logistics today = reading FMOD API manual)

Hour Tally

Coding: 4.50
Internet: 2.57
Logistics: 2.98
Testing: 0.86
Thinking: 1.57
Total Logged Time: 12.49
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#5
Thursday, May 30, 2013

Summary

Whoops, sorry for the late log...decided to take a weee bit of a nap break during the monthly update process :oops:

Another quick one today since I'm in the middle of making the update. I polished up a lot of things today to get them ready to show! One of the bigger pieces of work was the nebulae, which actually came surprisingly far. They already looked great, but I really improved the stability and consistency a lot today, such that we're getting fairly consistently-good stuff :thumbup: Lots of eye candy to show in the video!

Unfortunately, I feel like I don't have quite as much to show as usual...possibly due to the first two weeks being mainly taken up by LTP, or possibly because a lot of the work was internal. Still, hopefully you all will be appeased enough to keep me on for next month :geek:

Hour Tally

Coding: 3.83
Internet: 2.35
Testing: 2.80
Thinking: 0.96
Total Logged Time: 9.95
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#6
Friday, May 31, 2013

Summary

Woooo ultra-early dev log today! Why? Because I keep finding my forehead on my desk without remembering how it got there, and if I manage to make it three more hours to the end of the day without passing out, it will be a true Christmas Miracle. But I don't think that's going to happen, hence the early log! :thumbup:

It's become customary for me to pull an all-nighter on the second-to-last night of the month in order to get the update video ready for the next afternoon. Unfortunately, this custom leaves me dazed and confused, unable to fully enjoy the subsequent custom: taking the day off after putting out the monthly update. Well, I enjoyed my (half)day off, but I'm so delirious I can't even really remember what happened..

JUST KIDDING. I decided, since I didn't do that awesome on work this month, that I should not totally take the day off, but should at least do something half-productive. Given how much audio synthesis has been on my mind lately, it seemed a natural choice. Now, to be fair, I would have chosen it even if I hadn't felt a pressure to be productive...but I still get credit, right? :roll: Unfortunately I didn't get quite as much done as I had hoped. I wanted to start from the absolute ground up, and design a raw signal-based audio interface to play around with, like a super-mini code version of FL Studio or Ableton Live. As it is with all things, this particular task presented me with so many architectural decisions that I ended up deadlocking on a thousand different little design debates with myself. In the end we were all finally able to agree on something, and I started building it, but by that time too much of the day was already gone. So I have my basic signal-based architecture finished, and I have the capacity to render arbitrary signals. I also have implemented delay (one of the easiest dsp effects off all time) and a bad low-pass filter (a close second-easiest). Despite the simplicity, it's cool to know that I coded this stuff from the ground up and that the audio coming out of the speakers is 100% generated by me.

Unfortunately, when I started to implement the waveform generators, I ran into a lot more complexity than I expected. Turns out audio dsp is seriously complicated by the fact that it is all discrete / sample-based. A square wave is such a simple mathematical thing, yet, it turns out that if you write out the formula for a true square wave, it sounds horrible through speakers :( All because of all this Nyquist theorem garbage having to do with infinite frequencies. Man. Tough stuff. So it turns out that even an ultra-simple waveform like a square is actually quite an ordeal. I guess it was too good to be true to believe that dsp was just a straightforward exercise in real analysis... :( It seems that most of the actual complexity lies not in the math, but in the discretization thereof and all the problems that occur therein.

Well, maybe it was too big of a dream to hope that someday I might listen to my computer composing music from the raw signals all by itself. Maybe I should stick to the notes and let a real program generate the actual sound. But not without a few more tries. I'll be back on my next day off, and next time, I'll be sure to bring some textbooks with me :twisted:

PS ~ Thanks for all of the feedback concerning the demo, overall it was more positive than I expected. I also agree with a lot of the constructive criticism that has come up. In due time!

Hour Tally

Coding: 2.51
Internet: 7.73
Testing: 0.61
Total Logged Time: 10.85
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#7
Saturday, June 1, 2013

Summary

For the first half of my day / remainder of my day off, I went back to audio synthesis - except today I had much more luck! Finally got some nice band-limited waveform generation going on, and started to play with various tonal spectra via inverse fft synthesis. Managed to achieve some fairly cool sounds. I definitely have the glass sound down...not sure why glassy sounds are so easy to reproduce. I also did a boatload of reading on the theory, and am quickly on my way to decent-sounding filters! Anyway, I'd call it a successful day-long foray into DSP!

For the second half of the day, I worked on system layouts. In particular, I made planets bigger, and then worked on having objects not be placed inside one another. Came up with a nice solution for planets and other big bodies to affect the others, making sure that a minimum distance is maintained in an interesting way (without having to perform any collision checks, which complicated my first attempts way too much). Basically comes down to warping space, which is a fun and interesting concept in and of itself (involving something that looks dangerously similar to a scalar field...)!

Spent a lot of time thinking about June and what was going to happen in June today. I think it's going to be a good month :) Crazy, but good! No more fooling around :geek:

Hour Tally

Coding: 4.77
Internet: 2.54
Testing: 1.24
Thinking: 2.30
Total Logged Time: 10.85
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 26, 2013

#8
Week Summary

General Sentiment

I'm glad to be done with this week and very glad to be done with May - it was a weird month and not my favorite. But June is going to be different. Mark my words. Despite the unimpressive month, the universe connectivity generation that happened this week was pretty cool. Doing my first-ever bit of exploring around a connected region was...exciting :D I look forward to many, many more hours of it! I also must admit that my foray into audio synthesis and digital signal processing during my day off was SO FUN. I have no idea why this obsession has struck me so suddenly, but I'm absolutely in love. I look forward to a bright future of procedural audio in future LT releases :D

Major Accomplishments
  • Implemented universe connectivity generation
  • Implemented jump gates
  • Started on porting to linux
  • Cleansed the village of Framebuffer
  • Upgraded to a significantly more powerful audio engine (irrKlang -> FMOD)
  • Implemented basic DSP framework including additive, subtractive, and spectral synthesis, delay, low pass (not relevant to LT, but maybe LT2?)
Combined Hour Tally

Coding: 31.37
Internet: 24.12
Logistics: 7.59
Testing: 10.07
Thinking: 6.22
Total Logged Time: 79.37
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 1 guest

cron