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

Post

Week of April 14, 2013

#1
Sunday, April 14, 2013

Summary

Pretty nice day...I'm finding it much easier to smash all these little tasks if I write them down in a list and just attack them sequentially. Finished about 75% of today's list, but I won't go to sleep until it's done!

Once again, since there was nothing big and exciting to talk about, I'll just summarize with a boring list :D
  • Death! The game now appropriately handles player death, giving you a message to inform you of your own passing, and a button that you can click to take you back to the menu, where you can start a new game and reincarnate yourself in a new body. Just a small touch, really, but it completes the full game cycle: you can start a new game, you can die / lose, and you can save and load. I think these are all the basic game operations (other than winning, which, obviously, is not something you can do in LT!)
  • At-a-glance object summaries, specifically to be used when buying ships. Allows you to see total integrity, cargo capacity, hardpoint count and type, etc. A basic but necessary feature when you're ship-shopping.
  • Improved item balance (still a long way to go :|)
  • Better command interface action menu, better "my assets" interface action menu
On top of all these little things, I did a bit of engine optimization as well today. I cut memory usage a fair bit, and saved a lot of processing time for non-moving objects like asteroids. I've been worried a bit about the game's performance during long play sessions. A week or two ago, I was worried because I was observing pretty bad memory leakage (~1MB/minute). But I completely eradicated that with last week's memory handling improvements. This week, I've observed random and startling jumps in frame time (reciprocal of FPS, lower frame time is better) during longer play periods, which has had me on edge. But today I verified that the behavior was not due to LT, but rather, my laptop's graphics card wallowing in it's own heat! Putting the thing on a cooling mat has solved the frame time spike, and it seems that LT can run smoothly at 100+ FPS on my laptop for at least 20 minutes. That may not sound like a long time to you, but, from a programmer's perspective, it's a really long time! If things haven't degraded in 20 minutes, then it's likely that they're pretty stable (or degrading so slowly as to allow very long plays). I'm really happy about this, and am now feeling good about the engine's stability for longer play periods!

Just a day or two more, I think, until the Prototype is ready! Once it's ready, getting it in backers' hands will probably take a few days...so, unofficially, I expect it to be released within the week :D

Hour Tally

Coding: 5.24
Internet: 2.66
Testing: 2.15
Thinking: 1.81
Total Logged Time: 11.87
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#2
Monday, April 15, 2013

Summary

I didn't do any work today :| Sorry guys :cry:

Yep, I got lazy and decided I've been working too much lately with all this prototype business. That's why I took the day off, and, instead, let Josh-six-of-ten, tertiary adjunct of ... wait, I mean, err, one of my close friends, do the coding for me. I asked him to finish off my TODO list, and he did just that! I must say, he did quite a good job of it as well. Even implemented a few things I didn't ask for. Well done.

From his notes, it looks like this fellow managed to do everything from upgrade the asset viewer to allow subsystem viewing and control for owned ships, to implement basic AI docking, to fix a million of those minor problems that I so desperately didn't want to deal with. As for me, I was happily snoozing while he worked. I guess tomorrow it will be my turn to pull some insane hours, since he did so today.

But seriously, it was a good day ;) One big blur, hence the lack of specifics. The hours will tell you why. The prototype is still not quite ready...but this is the final sprint, and as you can see, me and all of my fellow drones are working as hard as physically possible to bring it to you :ugeek:

Hour Tally

Coding: 9.64
Internet: 2.47
Testing: 3.75
Thinking: 0.38
Total Logged Time: 16.24
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#3
Tuesday, April 16, 2013

Summary

Another one of those days. It's going to be like this until the release of the prototype..just to convince you of my dedication :D

Well, I'll admit that I didn't clock quite as many hours as my friend did yesterday, but I did manage to beat him in coding hours (!!) by a few inches. Probably because I did some serious technical overhauling today.

Finally, after much thought, failure, and pain, I have a good serialization solution!! I know, I said that I already implemented it. And I did. But it used to require just a bit more work than I would have liked for inherited objects (which are one of the more challenging parts of loading/saving). Too much code. You know how I like minimal code :) And today I managed to remove a lot of lines from LT with this new solution. I think I'm one line away from optimal. It still takes one more line than I would like (per class), but I do not see how I can eliminate it in c++. If anyone knows how it is possible to create something that will be statically initialized by using only code within a class declaration, let me know. But beware, the leading answer on stackoverflow concerning this problem is outright wrong. Ouch. Amazing how one superfluous line can bug me so much that I would write about it. Kind of sad..

Plenty of other technical excitement today too, plus loads of small changes:
  • Settings are now persistent
  • Save games are stored to a real path
  • Mission-related objects are cleaned up after the mission has been completed and some time has passed (NOTE: only for the prototype, not how the real game will work)
  • Added docking lights to stations
  • Defined grammar for procedural station names
  • Added ability to sell owned ships
  • Added ship generator to continuously vary the contents of a station (so that you can keep expanding your fleet!) (not how the real game works)
  • Proper loading/saving of missions and everything related to them
  • Improved memory handling of AI players
  • Improved AI collision avoidance
Still sprinting...so fast that I have lost all ability to make my writing interesting...bear with me...the drought is almost over... :|

Hour Tally

Coding: 9.78
Internet: 3.32
Testing: 2.36
Total Logged Time: 15.46
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#4
Wednesday, April 17, 2013

Summary

Ok, first and foremost, let me just put this out there: I am going to take a VERY enjoyable half-day off when I release this thing.

...that being said, it was another record-breaking day!

I spent almost the whole day on tactical AI (combat, maneuvering). I'm really concerned about this piece of the game...it's so easy to get it wrong, yet it's so critical. A strong tactical AI is...challenging, no doubt. Today I ripped out and replaced all of the tactical AI with a new system. I spoke the other day of having realized that fields are the perfect mechanism for controlling AI movement behavior, but today I went ahead and re-wrote everything in field form. Even though it's equivalent to what I already had (actually, a tad bit less efficient), it is easier to understand, and you really can't put a price on that. The hardest part of getting tactical AI right, without a doubt, is understanding what's going on..."why is he turning in that direction?" "Why did he overshoot the target?" "Why did he fail to avoid that asteroid?" Etc. It's so much harder than answering "why was that pointer null?" Or "why was that object already deleted?" So I'm doing everything I can to simplify the AI system to the point that I can fully understand every nuance of the behavior.

The new results are very promising. Obstacle avoidance is at an all-time high, especially with respect to the way the AI resolves it's path around an object. Everything is very fluid and natural!

But I'm still having trouble framing everything in terms of the real physics. In a perfect world, the AI uses the exact same control mechanisms as the player: it can thrust, yaw, pitch, roll, etc. In a hacky world, the AI can manipulate physics directly by applying "ghost forces" to its ship, manipulating positions and rotations directly, and so on. It is clear to me, since I am completely out of time, that I am going to have to settle for a hacky world for the Prototype. Of course, you will never notice :) But I do hope that I can make the math work out nicely enough to do "real physics" for the final version.

Plenty of other changes today, including finishing the game launcher. Again, too much to possibly remember :D It's just insane how far the game has come this week. Not surprising, given the hours! At this point, I'm so so so close. All I need to do is finalize the AI, playtest a bit, and package up the resources. So close!!!

Hour Tally

Coding: 8.37
Internet: 3.42
Testing: 3.93
Thinking: 0.72
Total Logged Time: 16.44
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#5
Thursday, April 18, 2013

Summary

Just a quick one tonight...I'm in the middle of an unusually grueling debugging session, trying to improve the robustness of loading/saving. It's pretty rough, but I'm developing better and better techniques for verifying the integrity of the data and finding problems in the process. I knew it would be a painful process when I decided to roll my own serializer, but it's what I signed up for....so I'll stick to it. I'll get there sooner than later. Everything is a painful process at first...but once you get good at it...worth it..right? RIGHT? I hope :shock:

Well, I must say, this week more than ever I have gotten a real sense for the limits of time. Usually there's that thought of "well, if I really needed to, I could push a little harder and get it done." But this week I cannot say that...I am truly pushing as hard as I physically can, and yet, the prototype is still not here, and I wanted it to be out by now. I've pulled Insane hours every day this week but it still wasn't enough. It's a bit disheartening. Then again, when I explained "the theory of nonexistence of extrinsic limitation," I did not say anything about time. I said that limits were in your mind, and that breaking them down takes the right insight, the right understanding. The problem is, sometimes it takes longer than one would like to get to that insight :x

I really hope I can finish soon. As much as everyone is ready to get their hands on LT, trust me, I am even more ready to give it to you and be reunited with that heavenly thing they call a bed :D

Hour Tally

Coding: 9.75
Internet: 3.59
Testing: 2.69
Thinking: 0.74
Total Logged Time: 16.75
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#6
Friday, April 19, 2013

Summary

You know, a few months ago, I thought the universe liked me...what with letting me pursue my dream project, giving me lots of very kind supporters, and so on. Today, having been drilled into the ground with the spillage from yesterday's serialization bugs, topped off with a brand new multithreading problem, plus a side-order of poor performance on my other machine, I am beginning to suspect otherwise. Sorry, I don't mean to depress anyone, because, as you will see, this story has a happy ending. But, as with many stories, the middle was much less happy than the ending :shock:

I took about three more hours after yesterday's dev log to whip serialization into shape and evict the bugs. I can't remember the last time I had to debug something for that long :shock: Thankfully, things seem to be working quite well now. I threw in quicksave / quickload buttons to really stress-test the engine, and have been saving and loading to me heart's content, so far without problems. But that was just the beginning. My ignorant bliss would not last the morning.

So, we've all heard of crashes. Everyone loves crashes. The thing about crashes - well, the thing about non-parallel crashes - is that they are generally triggered by something. You try to access a piece of memory that doesn't exist, and the greatly-beloved Sir Segfault comes to greet you. You double-delete something, and your debugger opens and complains about political corruption (or was it heap corruption? I forget). Very simple to understand, right?

But what if I told you...that there was a type of error that was just so much more fun than that? What if I told you that instead of triggering a problem, you could trigger a small chance of a problem!!! Wouldn't that be so much cooler? Think about it. Instead of just crashing, you could have, say, a 10% chance of crashing! Now, the great and lovely thing about this, is that if you were to, say, make a change that caused this wondrous type of error, you might not even realize or have to deal with it for another hour...day...maybe even week, if you get lucky! Yeah!! Welcome to multithreading. The world in which you're never safe. You tested your program 9 times and it worked? Yay! It's fixed! And then it crashes on the 10th. Very exciting :evil:

But wait!!! There's more!!! Order now, and we'll give you two nefarious side-effects for the price of one!! Introducing...the deadlock! A deadlock is not like a crash - a deadlock has much better manners. It does not notify you that your program has failed. It doesn't kill the program, or do anything, really. That's what it does. Nothing. And that's what your program does when it's in deadlock - nothing. And believe me when I say, there's nothing more confusing than nothing! When your computer does nothing, it's hard to tell whether it's doing nothing because there's nothing to do, or if it's trying to do something, but actually doing nothing. In deadlock, it's the latter - your program is doing nothing, because two somethings have collided to make nothing. Make sense? :|

The best way I can explain deadlock is to relate to a case very relevant to most males in the world: you say "where do you want to go to dinner?" And she says "wherever you want to go." So naturally, you say, "but I want to go wherever you want to go." You are now in deadlock. You're waiting to find out where she wants to go, but she's waiting to find out where you want to go. If you both hold your ground, you'll get to spend an eternity not eating. Now, imagine that two threads within a program want to go out to dinner together. If they are as indecisive as I am, they may have a problem. And the result of this, is that your program does nothing for eternity, because two threads can't decide what they want to eat. Sad, right? Should have gone for the microwave meals ;)

Sheesh, I'm not sure how I got so sidetracked in this log, but I do need to be a little more entertaining from time to time. Needless to say, deadlock took up a lot of my day, as it is remarkably hard to debug (especially a deadlock in system code, which is what I had to contend with today). I have no idea why the problem wasn't showing up on my laptop...I've been running fine on it for ages, but things went terribly wrong when I tried it on the desktop today. Makes me scared to think what will happen when the prototype rolls out :( I imagine the debugging pain has only just begun...

Anyway, at this point, all of these nasty errors are solved, and I've finished just about everything I wanted to finish..so I'm going to spend some time playtesting + tweaking/tuning things to try to squeeze more "fun factor" out of the prototype, and then it'll be ready to go! It sure has been a rough ride this week, but I think I can see the end approaching :)

Thanks for your patience!!!

Hour Tally

Business: 1.42
Coding: 8.74
Internet: 2.01
Testing: 3.34
Thinking: 0.44
Total Logged Time: 15.95
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 15, 2013

#7
Saturday, April 20, 2013

Summary

Finally, the universe allowed me to do what I actually wanted to do: playtest and polish!!! The part I've been looking forward to :)

A lot of fun and cool things happened today, but one of the cooler things was the procedural icon generator. I had already written some very simple code to generate icons randomly (since, of course, they're just based on fields, and it's very easy to randomly generate formulas!). Today I whipped together a little application to continuously generate hundreds of them and lay them out for me to look at. This allowed me to find a few that I could use for real icons in the prototype (for the menu buttons). I was pleasantly surprised by their quality...some of them look like legitimate, artist-designed icons! In fact, the icon for "Pilot" is almost scarily good :shock: In the sense that it actually conveys a person in the icon. Awesome :D PCG is so exciting.

I rewrote combat AI today, and it's significantly more interesting now. Not perfect by any means. But better! I also removed formations, just for the prototype. I know, I know. Sad stuff. But unless I am suddenly able to have a lot of great breakthroughs today, I just don't think they're ready. Besides, formations are kind of a luxury...you don't really need them to send your fleet into battle, at this point it would be nothing more than an aesthetic touch (although a nice one at that). Sorry if that disappoints anyone! But I would rather not toss it in when it's really only half-baked at this point (not that anything is finished, but formations are particularly rough).

Performance has been scaring me a lot lately, so I got a little fancy today with a dynamic load balancing system. This means that the engine now understands key stress points that are likely to bottleneck and create framerate problems, and it can scale those stress points back in the event that the framerate starts choking. So far this is working very well, and has managed to take intense 50+ ship battles from being slideshows to being a solid 30-60 fps. Of course, it's early days and that number is only going to get better, so don't worry if that doesn't seem like enough ships :)

The end is near. I can feel it!!!!!! I'm sure ready for it. It has been an intense week to say the least :shock:

Hour Tally

Coding: 10.64
Internet: 2.46
Testing: 2.94
Thinking: 0.71
Total Logged Time: 16.75
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of April 14, 2013

#8
Week Summary

General Sentiment

Ladies and gentlemen, I present to you the biggest week in LT development so far (by a significant margin)! It has been one massive torrent of code, fun, pain, testing, deadlocking, and, most importantly, awakeness. I can't even begin to explain my feelings for the week, mostly because I don't have any, because I was too busy working on the prototype to have feelings about it. I think we can all agree that this can only be a good thing :D Truly, my fellow drones and I have put that lazy slob they call "Josh" to shame this week.

Major Accomplishments
  • Implemented death screen & restarting
  • Implemented dynamic load balancing
  • Significantly improved GPU scheduling engine (~150% gain on model generation)
  • Significantly improved serialization engine + used it to implement full-blown loading and saving of everything
  • Significantly improved functionality of "my asset" viewer, enabling remote asset control and remote control of subsystems
  • Re-implemented AI maneuvering using cleaner and more elegant system
  • Re-implemented formations using cleaner and more elegant system (the exact same one as maneuvering, icons, meshes, ... ;) )
  • Billions upon billions (!) of other improvements that have been thrown to the wayside in the storm of c++
  • Achieved programmer theoretical peak efficiency, or darn near it...
Combined Hour Tally

Business: 1.42
Coding: 62.10
Composing: 0.07
Internet: 19.91
Testing: 21.16
Thinking: 4.79
Total Logged Time: 109.45

(do I get a cookie? :geek: )
“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 2 guests

cron