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


Week of May 12, 2013

Sunday, May 12, 2013


Today I made a very hasty and last-minute change to LTP 1.1 that I hope I won't regret... :? After getting fed up with the inaccuracy of automatic targeting, I tried playing with the simulation frequency of the world, and realized that upping the frequency to 60 Hz fixed most of the targeting problems (at least with beam and pulse weapons). It would seem that discrete simulation error is to blame. For an hour or so, I went back and forth between saddling up and preparing for a careful assault on the simulation code to make sure that it maintains high accuracy in the face of low simulation frequency, and saddling down and just turning up the frequency. Although I don't usually like to opt for quick/hacky fixes, in this case I did...the latter was just so much more appealing :oops: But the truth is, writing all of the simulation code to be reallyyyy careful about order-of-simulation and minimizing discretization error is just...not what I want to spend a week doing. Instead, I would much rather up the core frequency, and spend some time profiling and optimizing to make the engine capable of handling the higher computation.

So that's what I did! As an added bonus, the game now feels a bit more responsive, because the input latency is (theoretically) halved. Previously, it might take up to 33 milliseconds before the game responded to input (if it had just finished a simulation step when it received the new input). Now it's down to 17, which is what we've all come to love and expect from 60FPS games. But, again, it comes at a price of a higher CPU load, so I had to pull out the profiler and do some dirty work to allow large battles to maintain performance. I do hope I haven't broken the performance for anyone...I guess we'll find out! In the end, I think this will be a good choice.

Even though I said I finished the 1.1 updater, I went just a bit further today to improve it some more. I implemented a backup / restoration system for patch application, so that patched files will be restored to their former versions if patching fails at any point in the process. I also added a few error messages to indicate different types of failures, although I hope we don't see any of them crop up!

At the end of the day, I sent out the LTP 1.1 patch to a few generous volunteers, who ran the patch and confirmed that it worked. So far, no major issues...yay! We did learn that it requires admin privileges on certain systems, which I should have guessed in the first place given that it writes to the Program Files directory. I did some last-minute reading online to figure out how to make an executable that automatically requests these privileges, so now there should be no issues. Looks like that's solved!

Also, I can feel myself longing to write a compression algorithm. It is only a matter of time, as I already have all of the symptoms: obsession with filesizes, random wikipedia excursions to read about LZW, LZMA, and, really, anything I can find that starts with LZ. Just a warning, as I feel like one of these days this longing is just going to blow up and consume the whole day :roll: Wouldn't be a total loss, as we could use some savegame compression.

Hour Tally

Coding: 3.19
Internet: 4.93
Testing: 1.37
Total Logged Time: 9.50
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Monday, May 13, 2013


LTP 1.1 is out!!! Grab it from the website now if you haven't already :)

I spent a good part of the day trying to whip the website into better shape. I'm not a web programmer..not by a long shot. I guess you've noticed if you've ever visited the LT homepage :oops: Still, I make an effort. And it now looks a little better than it used to (I think?)

I heard back from a few of the pre-1.1 testers that the new flight control was throwing them off. Can't say I'm surprised, as it's really a totally different ballgame than before. In light of this, I realized that I needed to make it toggleable. I'm not sure why I didn't do that in the first place :( But I spent some time working with it, and now the flight control is such that it defaults to the old style ("Freelancer-ish" flight control), but the new mode can be toggled (by default via the Z key). This is very handy. In general, you probably want to use the new mode in combat, because it really affords a tactical advantage. On the other hand, when you're just flying around, you might want to feel more "connected" to your ship, so you can pop back into locked camera mode.

After getting fed-up with the beam weapon wiggle bug today (beam weapons are terribly unsteady in 1.0, in case you haven't noticed), I finally managed to fix it! It came down to a nasty little floating-point precision issue in the camera-world-ray code. I just had to be slightly more clever than before with the math to solve it. As a bonus, it actually ended up solving another issue, which I didn't realize was related. In the command interface, selecting things can be pretty temperamental. It was particularly noticeable before if you hovered your cursor over a moving ship, the cursor would sometimes oscillate wildly between the no-object cursor and the object-hovered cursor. This was actually a result of the exact same precision issue that caused the beam weapon wiggle! Always a nice thing to get 2 bugs for the price of 1 :) Beam weapons finally feel smooth like they should, and playing with them is a real joy. Oh, and now that you can no longer hit yourself with your own's just a lot better!

After getting 1.1 wrapped up and deployed, I spent just a bit of time working on some automatic update code. I don't want to have to keep doing this nasty thing where I send out an email for each update, especially not when the final thing is released. And sure, I will probably be able to push out automatic updates via Steam / Desura by that time, but why not go ahead and have a built-in updater for LTP? I would like to ship 1.2 with an automatic updater so that you never have to worry about updating again after 1.2. I've started the code for this, and already have the foundation :)

Enjoy 1.1, and please let me know if you have any problems with it!

Hour Tally

Coding: 2.67
Internet: 6.48
Testing: 1.28
Thinking: 1.17
Total Logged Time: 11.60
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Tuesday, May 14, 2013


Very exciting day!!! :) Although I wasn't really planning on it, I decided I needed to do some more inspirational world building / graphics stuff today. I had my sights set on asteroids, but before programming some new asteroids, I realized that I needed a cool background to set them against.

So of course, instead of leaving well enough alone and using my old nebulae, I decided to try nebulae from scratch once again. I should have known that this is always an endeavor that eats up the day like no other. I have really had a bumpy, love-hate relationship with nebulae for pretty much my whole life (and by that, I mean my whole life as a graphics programmer, which is about three years). But tonight, I blew away all my previous work, and came to a result that I'm extremely happy with!!! I'm not sure how it happened, but everything just fell into place and a thousand little strokes of luck lined up perfectly to bring me to this. I was absolutely ecstatic. I wish I had thought to write my dev log during this high, because it would surely be a lot more exciting (probably involving some Medieval nonsense :D ). Unfortunately, I am back to normal now and am pressing forward with trying to make these results even better. Shame that I don't have the ability to appreciate it just a little longer. The curse of being human, I suppose.

I feel like I've finally got good nebulae. It took 3 years, but I'm finally here :) Now I'm not exactly sure how this will play into LT, because, IMO, real nebulae are awesome but perhaps a bit too distracting for use as a background. I think I'll try to soften them up a bit (maybe more like EVE's nebulae) before implementing them in-game. This is definitely a super-promising advancement, though! :)

Hour Tally

Coding: 5.38
Internet: 3.90
Testing: 0.08
Total Logged Time: 9.36
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Wednesday, May 15, 2013


Another very exciting day!!! (That's two in a row, for anyone who's lost count!!)

Look. Hear me out. I tried my best today. I honestly did. I woke up and I said "I'm not going to get sucked into nebulae today, no sir, not this time. I'm happy with them for now, it's time to move on."

Ten hours later, I was pleased with my new nebulae.

Alright, so I'm a graphics programmer...SUE ME :( It's my job to be obsessed with shiny things. And nebulae

However, I'm glad I got pulled in again, because it was a very, very productive day (as I hope you can see by the new shots). I solved two big problems today. First was randomization. Given my recent obsession with fractals, it should be no surprise to anyone that the new nebulae are based on fractal algorithms. Unfortunately, The Doctor was spot-on when he said that 'Fractal algorithms are notoriously unstable.' How the screenwriters of Star Trek Voyager knew that fact is beyond me, but it's a very true little insight. The problem with the previous nebula was that if I bumped any of the constants, I wouldn't get a new, random nebula (which is what you would expect if the nebula were made out of procedural noise, for example). Instead, I would get something with totally and completely different properties. Probably nothing like a nebula. So obtaining infinite, randomized yet stable variations of these new nebulae turns out to be a serious challenge. Today I have mostly solved that challenge!

The second big development was volumetric lighting. Yesterday's nebulae were obviously a little bit flat - not surprising when you consider that they were generated by a 2D slice of a 4D function, make them appear 2D. Now I am using some heavier rendering to produce a real volumetric effect that gives them a much better feeling of depth. I've also softened them a lot so as not to make them so distracting! I think these are about ready for integration into LT :D

But, thankfully, nebulae only consumed 90% of my day today, which is an improvement over yesterday. In the other 10%, I managed to do something that I've been wanting to do for a while: rip out and re-write the infrastructure surrounding shaders. The shader code (well, not the shader code, but rather, the code handling shaders) is fairly old and comes from a time when I was not quite as obsessed with cleanliness and unification. Today I've fixed that with the trusty hammer-of-code-rippage. I also converted shaders to a reference-counted object, which is really what they should have been all along. I'm going to need to keep making improvements like this to the engine as I prepare to transition from making it handle a single system (LTP) to an infinite universe..(LT). Not a small step :shock:

PS ~ You don't even want to know how many exponentials are in those nebulae. It's like one big exponential soup 8-)

Hour Tally

Coding: 11.17
Internet: 1.60
Testing: 0.29
Total Logged Time: 13.06
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Thursday, May 16, 2013


...guess who didn't spend all day on nebulae!!! :) Yay!

I did, however, spend some time integrating the new nebulae into the game, and the results are extremely compelling :) It almost feels like a totally new game! I don't think I'm going to release these new ones for LTP, as it would require either a very large patch, or packaging the generation code, neither of which I'm keen on doing. So unfortunately, you'll just have to wait for the beta to enjoy the new eye candy!

Speaking of eye candy, I devoted the rest of the day to beautifying the world. I feel like I've let the graphics slip a bit since I've been focusing on gameplay...but I'm going to try to change that, and focus on both at once. Today I started building a new application that will function as a "sandbox" for me to play with the LT graphics and solidify single features. I really should have done this a long time ago: it's way too inefficient to have to start up the full LT, wait for the main menu, load a game, etc...just to test a feature. After getting a quick sandbox set up, I targeted a handful of minor graphical issues that have been bugging me. Several things are already looking better!

I just solved an issue that I've been wrestling with for the past few hours involving the crispness of the graphics. I've had a subtle but serious problem up until now with the game not showing high-frequency details. Even if you turn off AA, you won't see jaggies in LTP. That's strange and should see jaggies without AA! After a very long investigation into this problem, OpenGL ended up stumping me in every way imaginable. I was expecting this to be related to the old texel/pixel misalignment problem (aka, "the devil himself"). But time and time again I failed to solve it, until I realized that the results I was seeing could only be explained by...the pixel shader running multiple times per pixel :shock: And that's when I found out that GL was stupidly trying to do multisampling...even though I never asked it to!? Hm. Strange. But turning it off manually solves this issue, and we now have jaggies without AA, hooray!!! But really, this is a good thing, because it increases the clarity of the rendering in LT. Subtle, but noticeable. It also seems to have increased the clarity of the UI, which I believe was also being affected by this same problem. I'm very relieved to have this out of the way, because it's been causing me angst for a good while.

Next up, I think I'm going to set my sights on planets :geek:

Hour Tally

Coding: 6.97
Internet: 3.24
Testing: 1.08
Total Logged Time: 11.29
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Friday, May 17, 2013


Didn't get as much done today as I wanted to - I got wrapped up in exploring fractals (again), but I won't apologize for that :D

Since they led me to such a great new nebula algorithm, I decided it's definitely worth my while to explore fractals with respect to other applications. Today I began writing a fractal ship plating algorithm. It's really testing my understanding of these things, because the properties obviously have to be totally different than a nebula. I made some good progress, both in terms of my own understanding as well as the actual plating algorithm. Although I've achieved significantly more varied results than before, I don't think I'm quite up to the quality of the previous algorithm (which is bad, because the previous one was pretty lame as well..). Still, I have faith that if I keep pushing in this direction, something magical may come out of it!

Other than that, I worked on planets, as I said I would. I integrated the new atmospheric shaders and tweaked them to play nicely with the LT engine. The difference is massive - planets already look so much better than before (check the new banner on the ltheory site if you want a small taste). But I haven't even rewritten the ground algorithm yet, and once I do, that's going to massively bump up the quality.

I'm very, very happy at how much graphical progress has been made this month...but although I've done a great job of improving the existing content, I really need to push forward with new content for the second half of this month. There's still a lot left to do. "Real" stars, jump gates and wormholes, minerals/ore on asteroids...just to name a few. I guess it was too optimistic to think that I might be done with universe generation by the end of this month...but I can still try! :geek:

Hour Tally

Coding: 5.46
Internet: 3.71
Testing: 1.57
Thinking: 1.02
Total Logged Time: 11.76
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Saturday, May 18, 2013


Big strides today!

For starters, I ripped out those horrendous stars (the small ones in the sky). I want to sincerely apologize for how ugly the stars in LT were. Really, I should have been shot for baking them into the background. Absolutely awful. But finally, I replaced them today with a real solution! The result is immensely appealing compared to the old version! Actually, I was really surprised by how big of a difference this made to me. Maybe I'm a sucker for stars but..having high-quality stars in the background just makes it feel way more like a space game to me. In addition to looking better, this also brought with it an unexpected win: I have found that stepping the resolution of the background down by a factor of two makes no difference now, so I can safely step down to 1024 as opposed to 2048. This is a 4x improvement in memory usage..but, more importantly, it means 4x faster background generation, which is a HUGE win. At 1024, backgrounds can be generated very quickly, even with the new nebula algorithm. The problem before is that I was trying to bake ultra-high-frequency detail (tiny little stars) into the background, which obviously requires a very high resolution. Stepping down to 1024 looked awful, because each star became a big splotch in the sky. But now, at 1024 + the new stars, the background looks so much better than before :D

After that little victory, I moved back to planets for a while. I made a whole lot of progress, and am starting to approach the level of quality that I want for the game. I re-wrote the heightmap function, changed the way the surface is encoded for more efficiency and less distortion, improved the scattering (again), implemented much better bumpmapping, and improved the clouds. It was definitely a good day for planets.

Here's a quick shot that shows off some of today's work, including the new planet in the foreground, and the new stars in the background. Pretty spacey! :)

Also...installed a new forum smiley pack today so that I can be more expressive :wave:

(Hopefully I can find a way to remove the ugly white borders :problem: )

Hour Tally

Coding: 4.99
Internet: 2.93
Testing: 4.20
Thinking: 1.17
Total Logged Time: 13.28
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Week of May 12, 2013

Week Summary

General Sentiment

What an immense week for graphics! May is really starting to pick up speed now, and the visuals of LT are profiting greatly as a result. As much as I love improving the graphics, I need to start moving forward with universe generation. But I'm certainly not sorry that I concentrated on graphics this's feeling like a whole new game already :)

Major Accomplishments
  • Implemented a new and massively improved nebula algorithm!!!
  • Implemented atmospheric scattering in the game
  • Greatly improved the quality of planets (surface, clouds, shading)
  • Greatly improved the quality of background stars
  • Started on an automatic updater
  • Started on a new ship plating texture algorithm
  • Shipped LTP 1.1
  • Fixed a rendering issue that caused a half-pixel blur across the whole screen - now have higher visual clarity
  • Created a sandbox program for fast prototyping of pieces of LT (and used it to make several graphical improvements)
Combined Hour Tally

Coding: 39.83
Internet: 26.80
Testing: 9.86
Thinking: 3.36
Total Logged Time: 79.84
“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