Jump to content

Devnote Tuesdays: Efficiency Edition


SQUAD

Recommended Posts

<figure class="tmblr-full" data-orig-height="92" data-orig-width="480"><img src="https://41.media.tumblr.com/0ff9377afa68dc3ad3fe6844aaf1bd38/tumblr_inline_nri1r7CiPA1rr2wit_540.jpg" data-orig-height="92" data-orig-width="480"/></figure><p><b><br/></b></p><p><b>Felipe (HarvesteR)</b><br/></p><p>I’m happy to say that wheels are just about complete now. There might be a few minor details here and there to smooth out, but for the most part, the wheel system revision is done.</p><p>This week I’ve been focusing on something that, while definitely not something you’d see on the player side, it’s nonetheless crucial for us to be able to keep working on the project. I’ve started to plan and set up the necessary tools to move all of the game’s code (or as much of it as we can) into pre-compiled assembly files.</p><p>If you’re not into coding, an assembly is a .dll file, which is built in Visual Studio, and imported into Unity as an asset containing code components. These are then attached to objects in the game. Normally, each code file is a single asset in Unity, which Unity compiles whenever scripts are modified, and each code file is linked to game objects. DLL files are very similar, except that they are already a pre-compiled group of code files. That means for DLL files, we don’t have to wait for Unity to compile every script in the project every time we make a change to any of them.</p><p>Currently, the time to compile the main game project is about 1 or 2 minutes, more or less. This may not seem like much at first, but consider that this is a process which we have to repeat dozens, maybe even hundreds of times a day. Those few minutes of waiting, that many times a day, translate to many hours of lost productivity over a longer period.</p><p> But perhaps more importantly than that, there is a weird phenomenon that happens when there is a significant time penalty between committing to an attempt, and seeing the results of it. Many a time I’ve found myself stuck working against an issue that should have been simple, but which for some reason persists in not being fixed. This I’ve found can happen sometimes because of long compile times. </p><p>Imagine that to fix this ‘simple’ issue, the proper way to go would be to add a few lines of test code, so you can see in more detail what your stuff is doing when the bug happens. That means that before I can try to actually deploy a fix, I know in advance that I’ll have to write my test code, wait for the project to compile and run, just so I can see the extra info, then use that to fix the problem, then compile again to verify that it worked, then remove the test code, and compile yet again to finish it off. That’s a minimum of three compile-and-test cycles I know I’ll have to wait through, just to fix a seemingly simple issue. Instead then, what usually happens is that we attempt to fix the issue blind, in the hopes of fixing it with just a single compile. Sometimes that actually works, but in the case I’m describing here, of a deceptively tricky issue, it’s very possible to get yourself stuck in a loop, where you eventually end up wasting more time trying to do the blind fix than if you had taken the time to do it properly. </p><p>This is just one example of how a long compile time can affect development in a bigger way than just the extra time it takes. The bottom line is, working on a slow project is frustrating at best, infuriating at worst, so if we can shave off even a few seconds of that time, that’s already a big boost to our workflow. Especially if you consider that we have a lot of features we want to add still, working on a sluggish project simply won’t do.</p><p>So, this has been the focus of this week for me. I’ve already set up templates to create assembly projects, into which we can offload our code, and those work. However, I hit upon another issue, where Unity will lose the references to all scripts which are moved outside of the Unity editor. This was a much more serious problem. It means that any piece of code we move to a dll would have to be manually replaced on every object that uses it in the project. Considering that we have over 8000 script linkages in there, that’s not something you want to do by hand. Instead then, I’m working on a tool that will help keep track and restore those broken links after we move the files. It’s taken a couple of days to get it working, but it will save us an eternity of tedious scrounging through project files, trying to remember how we had everything set up. </p><p>That’s been my week so far. </p><p><b>Marco (Samssonart)</b><br/></p><p>Last week was finally the release of KerbalEdu 1.0.4 , now I’m the one on the Squad site who takes care of that. I also started investigating a problem with newer version of Google Chrome and the Unity Web player that stops Kerbalizer from running on Chrome.</p><p><b>Daniel (danRosas)</b></p><p>Looking forward to start implementing the things I’ve been working on. I’ve been playing around with some assets. Modeling here and there, as well as texturing. Most of the work have been improvements, with a couple of new things to share in the near future. </p><p><b>Jim (Romfarer)</b></p><p>Another progress report on the UI upgrade. Last week Astronaut complex, Admin Facility, Research And Development and the Vessel Spawn Dialog was implemented to work with the game.</p><p><b>Max (Maxmaps)</b><br/></p><p>Working closely with Ted, who has nonstop floored us with his ability to problem solve and overall make our development process faster and more efficient. It is because of this that Ted has been given a new position as KSP’s Technical Producer. In this role we will be working side by side to make sure every future update comes to you faster, cleaner and more efficient than ever before. </p><p><b>Ted (Ted)</b></p><p>The past week was a bit personally hectic and unfortunately didn’t have much to do with KSP. I took a few days to spend with family after my grandfather died. </p><p>On lighter notes I’ve been keeping up with New Horizon’s progress and keeping up with the developers’ progress on Unity 5, as well as the development of the 1.1 features that Roverdude, Arsonide and Porkjet are working on!</p><p>Hope to have more to talk about next week!</p><p><b>Kasper (KasperVld)</b></p><p>I’m not supposed to be here (nobody tell Max!) because I’m studying for my final BSc exam. And although I haven’t kept tabs on most things going on apart from what is most critical, I’d like to give a shout out to NASA for their New Horizons mission that flew by Pluto and Charon today, and to CERN because they discovered a Pentaquark particle. #Science. </p><p>P.S. If you haven’t heard yet, Harvey (HOCgaming) is preparing Kerbal Polar Expedition 3, a charity event around KSP on Twitch that raised over $20,000 in last year’s edition, which was insane. Follow his <a href="https://www.youtube.com/user/HOCgaming/videos">YouTube channel</a> to stay updated, all proceeds go to providing access to clean water for people in the third world.</p>

Link to comment
Share on other sites

... the time to compile the main game project is about 1 or 2 minutes...

Awww. How cute. :)

I definitely feel you pain with regards to how that breaks up workflow though. (Especially after the weirdness I've been chasing down the last couple days.) A while back we tweaked our build process at work and cut our 64-bit build times by some insane percentage, 70%-80% in some cases, and our 32-bit builds by a noticeable but less remarkable amount. You never really notice how bloody long builds like that take until you speed them up by a significant amount.

Hope this pays big dividends for you folks. It's already pretty good for a game the size of KSP.

Edit: Also offering my condolences, Ted. Hadn't read that far into the DevNotes when I typed the above.

Edited by Cydonian Monk
Link to comment
Share on other sites

My condolences, Ted.

Felipe (HarvesteR)

I’m happy to say that wheels are just about complete now. There might be a few minor details here and there to smooth out, but for the most part, the wheel system revision is done.

Is it too late to consider crab steering as an additional steering option? :(

Link to comment
Share on other sites

Currently, the time to compile the main game project is about 1 or 2 minutes, more or less.

I work at a large game studio on a popular sci-fi shooter (bonus points if you can guess which game) and our compile times for a full-featured build are around 14 hours :P

Link to comment
Share on other sites

Thanks for the devnotes Squad. One thing concerns me however, HarvesteR's qoute:

"Especially if you consider that we have a lot of features we want to add still"

Err guys.. The stuff in the game now does not work. More stuff is not good, please take time to fix the ancient bugs and all the new ones introduced with 1.0+ patches.

Thanks for a great game! OOH.. can we have proper fairings too? And more control over them? Cheers!

MJ

Link to comment
Share on other sites

I work at a large game studio on a popular sci-fi shooter (bonus points if you can guess which game) and our compile times for a full-featured build are around 14 hours :P

Some microsoft devs over at the Arstechnica forums mentioned that Microsoft uses compiler rigs that can compile an entire Windows build in under an hour. Microsoft definitely needs those rigs if they're going to release a stable build of Windows 10 on July 29.

Also, I would greatly appreciate it if Squad could optimize the code. Some older versions of ksp perform better with the same number of parts compared to the new build.

Edited by andrew123
Link to comment
Share on other sites

Thanks for the devnotes Squad. One thing concerns me however, HarvesteR's qoute:

"Especially if you consider that we have a lot of features we want to add still"

I understand the point you're trying to make, but, I don't think they are "there yet" ;) HarvesteR has been busy for ~3 weeks on wheels, previously re-coded asteroids, and this week begun working on optimizing their compile process - I think Squad is still at the stage of adding and reworking stuff we have in the game now and could be what he means. "New stuff" should come in toward the end of the process, I give that a couple months. They spoke about optimizing and bug fixing toward the end of 1.0, I'm sure we will hear that kind of talk again, as the release gets close.
Link to comment
Share on other sites

I got so caught up in New Horizons I completely forgot it was Devnote Tuesday. We should launch a probe some where every Tuesday, you know just so we aren't anxiously waiting on KSP news all the time :P

Ted I'm sorry to hear about your Grandfather.

Edited by Alshain
Link to comment
Share on other sites

So, you want them to stop adding new stuff - then start a list of new things you want them to add?

The fairings would not be a new item, it is consistent with the rest of the post where the call was made to not add new stuff but to fix issues with current stuff, for example fairing separation and construction.

if you consider that we have a lot of features we want to add still

After considering that, my first thought was "I thought the game was feature complete?"

That`s what we got told anyway...

I would welcome more features but I would welcome consistent information and old bugs being dealt with more.

/sympathies ted. Good luck in your new role ;)

Link to comment
Share on other sites

Strange to send someone condolences and congratulations at the same time, but I'm sending both to Ted. Sorry for your family's loss, congrats on your new role at Squad.

Thanks to HarvesteR for being so detailed in the devnotes the last few weeks, I know they take some time to write but I think we all appreciate your insight.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...