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

Post

Week of May 5, 2013

#1
Sunday, May 5, 2013

Summary

Due to some sadness in my personal life, I wasn't able to maintain concentration on work today.

So as not to be completely useless, I spent much of the day trying to amuse myself with ShaderToy, which is a very fun way to pass the time if you're a graphics person. Lots of smart people doing lots of smart things on there...definitely a cool source of knowledge.

Anyway, sorry for the bad hours lately...please don't fire me! I'll be back in action soon :|

Hour Tally

Coding: 1.30
Internet: 4.23
Testing: 0.01
Thinking: 0.22
Total Logged Time: 5.76
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#2
Monday, May 6, 2013

Summary

Back to work. Greened a few more elements on the LTP bug/sugg list, and getting pretty close to having enough to make a patch/update release!

Speaking of which, I started working on a patching algorithm. I did try using some preexisting software first, but it acheived a compression ratio of 98%...virtually nothing. I was shocked until I remembered that I packed the LTP resource archives in such a way that no existing software is going to be able to find commonalities. Very stupid choice...so now I will have to compensate by rolling my own solution. But that's ok, because I kind of wanted to learn how to do it anyway. If I'm unable to get it working, I guess I will just have to ship the update as a whole new installer...but I'm hoping that won't be the case, because the changed portions should be relatively small in comparison to the size of the original.

In other news, I recently became obsessed with fractals when I stumbled upon this thread: http://www.fractalforums.com/new-theori ... -patterns/ . Whoa. Now take a look at those pictures and try to tell me that math is not just...insane... :shock: So much complexity and beauty out of such an elegant and tiny little formula!! Maybe "fractal space monsters" could be an easter egg in LT..I'm dying to try this formula out for myself..

Hour Tally

Coding: 3.21
Internet: 4.93
Testing: 0.33
Thinking: 1.18
Total Logged Time: 9.64
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#3
Tuesday, May 7, 2013

Summary

I happily finished my diff algorithm today, which was, as expected, a fun exercise in programming :) It is quite fast and achieves a very good compression ratio on the things that count the most like the shader code and executables. These are the key places where the patch will be making significant changes. The only other major place is the LTLib dll, and, sadly, I am a little disappointed that the algorithm only achieves about a 50% ratio on this (not that it's important, as the file is only 4MB, so a 2MB patch isn't exactly a deal-breaker). Some cursory reading on the subject suggests that this is a key trait of diffed executable code, since a disproportionate amount of the data changes when you make changes to the code (because of the fact that much of the code references itself in the form of addresses, and most of the addresses will change even if only a small part of the code does). Still, it leaves me wondering why the actual executables achieved a nice ratio and not the dll.

Whatever! The point is that I should have no problem delivering a nice, compact little patch for the upcoming update.

...

....

OK, fine, you got me, I also spent more time than I care to admit playing with fractal formulas online today...I'm sorry...it would seem that I have contracted the infamous fractal fever. I still feel like this is going to lead to a big LT-related breakthrough in some way. Their ability to pack insane amounts of detail into very small, GPU-friendly code just...feels like it could do big things! I am still searching for a fractal that looks like a nebula (actually, today I got pretty close)...! Bear with me :geek:

Hour Tally

Coding: 4.03
Internet: 6.43
Total Logged Time: 10.46
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#4
Wednesday, May 8, 2013

Summary

Frustrated by tiny bits of bumpiness in the new flight control (which I believe I hinted at in an earlier log), I spent hours today trying to perfect this system. Usually I couldn't justify spending so much time on such a small detail, but this is one of those pieces of the game that needs to be perfect. Flight control pretty much creates the very "feel" of the game...at the most tactile level. Anyway, I did manage to figure out the problem and am very pleased that it paid off :D At this point, I can comfortably say that I am liking the new controls more than the old ones. Additionally, for a little extra reference, I went back to "the bible" (aka Freelancer ;) ) and played around for a few minutes to compare. I was actually surprised by how unintuitive Freelancer flight feels to me now, having gotten used to LT. It's hard to say whether it means anything objectively, or just that I've become used to the LT controls because I play so much. But I do sorely miss the ability to roll, and there's no question that the new decoupled orientation system makes you feel more in-control during dogfights than in Freelancer, at least once you get used to it.

Still, Freelancer will always be the golden standard in my mind, and there are some obvious places where it destroys LT. Afterburner is a big one, we really need afterburners in LT...they spice up dogfights to a very large extent. Incremental thrust is another thing. I actually didn't realize until today that Freelancer uses W and S as increase/decrease velocity, not as thrust forward/thrust backward...whoa, I'm surprised I didn't remember that :shock: So I think LT needs to be changed to this system, which is what every other space sim uses, and will also benefit joystick users. And then strafing. Need strafing very badly.

Other than that, I spent some time ripping out some code and replacing it with shiny new stuff :) It's been too long since I had a good session of ripping stuff out, and this particular piece really needed it. It's the piece of the engine that deals with opening and loading stuff from various sources (files, resource archives). It was ugly. Now it's not :geek:

And in other news, I made it into the national park today (Smokey Mountains, that is) for the first time in a month, which is very sad considering I live like 10 minutes away. Maybe I should stay away, though, because every time I go it makes me want to quit LT and start working on a procedural Skyrim-like game :P Bah...too much to do...someday...

Hour Tally

Coding: 4.34
Internet: 3.94
Testing: 0.99
Thinking: 1.31
Total Logged Time: 10.57
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#5
Thursday, May 9, 2013

Summary

Working on LTP v1.1 patch all day! Or, at least, the program that makes the patch? Yeah. It has been a fun ride making my own patching system, but, in the end, I think it was worth it :)

I had a really nice surprise today when I finished the patch generator (note: this is different from the diff algorithm that I've been talking about, because the actual patch is a collection of diffs with versioning information and other bookkeeping stuff). Well, at that point, I didn't think I was finished: I had not yet coded the part that handles the resource archive. I thought I would need a specific mechanism for handling it, because of the encoding scheme and the fact that a different patching software totally failed to compress it. But I ran it through the patcher just for kicks and giggles. It only took about 10 seconds, which was the first red flag in my mind, since diffing a 177MB file with a blocksize of 16 bytes should probably be prohibitively expensive, especially since I didn't do much fanciness at all in my algorithm. Then when I saw that the output patch file was only 3MB, I knew something was wrong, since I hadn't even written the special resource handler yet. Oh well, worth a shot...

...but as it turns out, those weren't lies...it actually worked :shock: Far better than I was expecting. When I ran the patch and realized that it did exactly what it was supposed to, I was seriously confused. After I revisited my resource archive code, I had yet another surprise: there was actually no reason that the encoding scheme would prohibit good differential compression. Hooray!! No special logic needed after all!!! But this happiness has still left me confused about how the diff only takes 10 seconds, and why the other program took so much longer and failed so badly on this archive?? Oh well. Don't ask questions :geek:

The last bit to wrap up is the updater, which I am working on right now, which applies the patch. This is turning out to be a little more annoying than anticipated, because I forgot that the updater can't use the same DLL that it is trying to update :P Duh Josh. So I have to write a program that doesn't use that DLL, which requires a few structural changes in the LT library. But nothing impossible.

Anyway, I'm very happy that the v1.1 update will only clock in at a few megs :)

I regret that I haven't been able to figure out any of the crashing issues yet...but it's really stumping me that I can't reproduce them. Luckily, this update will ship with some much better reporting information that should allow me to debug crashes far more effectively.

PS ~ I figured out where fractals fit into LT!!! More to come on that in the future...but I'm very excited, as I think that this particular fractal that I've been playing with recently is a perfect fit for a particular graphical effect ;) I knew that sudden obsession would pay off!

Hour Tally

Coding: 6.01
Internet: 4.14
Testing: 0.43
Total Logged Time: 10.58
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#6
Friday, May 10, 2013

Summary

Finished the 1.1 updater (2MB compressed!! :) ), which required making a whole new version of the LT library for static linking. Yum. At least that's done now, and if I ever want to, I can package exes without the dll.

Spent the rest of the day finalizing and making minor tweaks for the update. One big thing that happened was that I FINALLY nailed the issue with not being able to scroll all the way down in some UI panels. That thing...has been around for months. Amazing. Definitely one of the most long-lived bugs to date. It did turn out to be a really subtle and tricky issue with rounding, which explains why it was able to hide from me for so long. But not anymore! I am so glad to be rid of that :D

I have been concerned with the responsiveness of the cursor ever since I implemented vertical sync in the game. It is a well-known fact that software cursors are prone to responsiveness issues, simply by nature: they are being drawn by the program, not the OS, hence they are at the mercy of more factors. With no vsync, most people with gaming PCs are probably seeing well over 60 FPS in LTP, making cursor responsiveness no issue at all. With vsync on, however, FPS is clamped at 60, which puts a hard constraint on the response time of the mouse. However, by re-ordering the order in which the application handles window events and updates and such, I was able to slash most of the mouse lag. Although it was just a tiny change, it makes me feel a LOT better. Mouse response time is one of the most important things ever to me in a game, oddly enough. It really scared me when I turned vsync on and observed some lag! Happy to be rid of that and have my responsive game back :)

LTP v1.1 coming soon!

Hour Tally

Coding: 4.12
Internet: 4.02
Testing: 0.89
Thinking: 1.47
Total Logged Time: 10.50
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#7
Saturday, May 11, 2013

Summary

A strong finish to a rather unimpressive week. Oh well, they're bound to happen from time to time.

In complete negligence of what I should have been doing today (i.e., finalizing 1.1), I spent practically the entire day in ShaderToy designing planets. Now this is actually not a waste of time: I have been meaning to improve the planet visuals in LT. This month I'm trying to focus on the universe and, although I haven't really picked up speed yet, hammering planets into shape is a good way to start. Writing a planet inside a pixel shader is really the perfect way to gain knowledge of what makes a good planet. Super-fast prototyping really helps like that.

Anyway, after so many hours of learning, I did manage to beat all my previous work by a fair margin!! I'm actually proud of my planets now :) They're not implemented in LT yet, but now that I understand more about the tricks that I need to make them look good, it should be smooth sailing. Definitely a productive day.

On a more technical note, I finally implemented atmospheric scattering (which is kind of a crucial component to a good-looking planet). Until today I had always devised stupid hacks (well, all AS implementations are stupid hacks...but..mine were reallyyy stupid :roll: ), simply because this is a rather math-and-physics-intensive subject. As with all such subjects, authors of papers in the field don't like to make things easy for you, because they want you to suffer the same pain that they did in coming to an understanding of the subject. Thankfully, Sean O'Neil does far better than most at explaining, and, for that reason, his GPU Gems 2 article is probably one of the most widely-used implementations today. After a few hours of reading and scratching my head, I was slowly able to come to a good enough understanding to implement it! By the end of the day, I was very happy with my implementation, which was significantly shorter and clearer than O'Neil's, but produces the same results. As with all things, I searched for the simplicity in atmospheric scattering...and was not in the least bit surprised when it reared it's beautiful head :D Turns out it is a dead-simple concept. Really. Once you drop all the boring symbols and lengthy names, it comes down to a few sums of exponential falloffs (gee, I feel like I've seen that before...).

You know, you really can't escape exponentials. I feel like I talk about it at least once per week...but that's only because nature hits me in the face with it at least one per week...! Our universe is even more obsessed than I am with exponentials ;)

Also. It turns out that I was actually wrong yesterday when I said that I had fixed the UI scroll-to-the-bottom bug. Like all good bugs, this one decided to vanish, induce a false sense of security in the programmer, and then reappear in full-force. But this time I actually got it. I swear. :?

Hour Tally

Coding: 9.06
Internet: 3.34
Testing: 0.66
Total Logged Time: 13.06
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 5, 2013

#8
Week Summary

General Sentiment

An unusually slow week, perhaps because I am still in the wake of the LTP-last-minute-madness. But that's basically over now; things are looking good and I think it's back on track from here on out :)

Major Accomplishments
  • Implemented binary differencing algorithm for use in patching (and potentially other things!)
  • Implemented patch program and patch applying program (updater), including static version of LTLib
  • Improved smoothness of new steering system
  • Implemented clean and efficient atmospheric scattering algorithm, based on O'Neil
  • Experimented with planets, learned how to make them significantly more appealing
  • Experimented a lot with fractals, leading to many new tricks up my graphical sleeves :)
  • Fixed that ridiculous UI bug!!!!!! :ugeek:
Combined Hour Tally

Coding: 32.06
Internet: 31.03
Testing: 3.32
Thinking: 4.18
Total Logged Time: 70.58
“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