SQUAD

Devnote Tuesday: Smashing Buttons

Recommended Posts

image

Hello everyone,

Tuesday come and go: last week was of course the release day for patch 1.1.3. We’ve received a lot of positive feedback, and it looks like our 1.1 branch is now stable. That has meant that the team has switched gears and started focusing on the first week of full-time development spent on update 1.2, and aside from updating to Unity 5.4 that means spring cleaning!

Ted has been finishing up working on the innards of the build server, getting it all documented and coming up with plans for the future - scalability, manageability etcetera. He’s also been moving house, and took just two days to do it. The man has a talent for organisation that is rarely witnessed.

The main effort for the developers revolves around removing now obsolete user interface systems. As you might remember one of the main upgrades in the 1.1 update revolved around rewriting the old user interface, and now that we’re confident it all works as it should it’s time to remove the old systems that were quietly running in the background. Mike (Mu) and Jim (Romfarer) have been tasked with what is a truly Herculean task. Progress is solid, though Chris (Porkjet) and Nathan (Claw) have their hands full making sure everything works and looks as it should.

At the same time Mike and Jim, with the help of Bob (Roverdude) and Nathanael (NathanKell) have been working to update the game to Unity 5.4, a move that will allow us to fix a few long standing issues as well as increase performance in many ways. To help with that Bob, Brian (Arsonide) and Nathanael have been working their way through the project upgrading middleware such as Vectrosity (which we use to render orbit lines), removing old foreach() loops, Singletons and generally de-linqing the game. We recommend that modders to the same in anticipation of the next update to help increase performance for all KSP players. Linq and foreach() loops in particular create a lot of garbage, which is what causes the stutter that some people experience while running the game.

On the new content front Brian is working on a 1.1.3 compatible version of the official Asteroid Day mod. His timing is impeccable. Bob has was able to merge his antenna telemetry code into the main project, and the QA team is already looking forward to hunting down the edge cases that will no doubt be found with the help of Dave (TriggerAu), who has been leading the way in reviewing the testing processes the team used for version 1.1.3. Once reviewed, we can see what worked and what didn’t so that we’re ready to QA test update 1.2. In particular, the QA team is working to adapt to the Scrum methodology that the developers have switched to recently.

Speaking of our QA team: Steve (Squelch) has been flown in to Mexico to do some intensive testing on consoles to complement the same work Mathew (sal_vager) is doing in the UK. They’ve found a few issues that have now been resolved and are looking forward to the day of release. Steve is meanwhile enjoying the Mexican hospitality, and Pablo (Paul Amsterdam), Nestor, Rodrigo (Roy) and Andrea (Badie) are enjoying his company.

Squad also attended the Unity Developer Day in Mexico where our management team (Adrian and Ezequiel) talked about the history of KSP. The talk was well received, and we’ll look into more ways to engage with other developers in the future.

That’s it for this week! As always you may ask us questions on the official KSP forums, on Facebook and on Reddit!  

Share this post


Link to post
Share on other sites

First!

Nice devnote. Can't wait to see what pops up next.

Share this post


Link to post
Share on other sites

Second ^_^

Nice dev notes guys. Sounds like solid progress. Keep up the good work!

Edited by WildBill

Share this post


Link to post
Share on other sites

Third. I knew I should have posted before reading,  but that felt like cheating:cool:

Encouraging stuff, good devnotes, Keep it up squad. 

Share this post


Link to post
Share on other sites

Is the idea to use for loops in place of foreach, or try to avoid loops where possible? I've always understood for loops to be more efficient, at least for larger, repeated loops.

Share this post


Link to post
Share on other sites

That's all great...but when is KSP going to have some more content? 

I see we are getting the long-awaited antenna stuff "soon" but that is pretty much already available as a mod, so I'm struggling to get excited about it. The only other thing seems to be the Asteroid Day mod - which is not new. 

Apart from the new heat shield, it seems a long time since there has been some major new stuff. Now that we have a stable platform and the ability to support more stuff, how about some more planets, another solar system, space aliens, buildings all over Kerbin, a lot of new parts, lots of things to discover on the planets, subterranean caverns, green alien dancing girls...

Share this post


Link to post
Share on other sites
5 minutes ago, DMagic said:

Is the idea to use for loops in place of foreach, or try to avoid loops where possible? I've always understood for loops to be more efficient, at least for larger, repeated loops.

We're converting them all to for loops.

The issue is that in Unity's mono, foreach creates garbage. And linq more or less _has_ to create garbage AIUI, and it does it in spades in Unity.

Share this post


Link to post
Share on other sites
2 minutes ago, Foxster said:

That's all great...but when is KSP going to have some more content? 

I see we are getting the long-awaited antenna stuff "soon" but that is pretty much already available as a mod, so I'm struggling to get excited about it. The only other thing seems to be the Asteroid Day mod - which is not new. 

Apart from the new heat shield, it seems a long time since there has been some major new stuff. Now that we have a stable platform and the ability to support more stuff, how about some more planets, another solar system, space aliens, buildings all over Kerbin, a lot of new parts, lots of things to discover on the planets, subterranean caverns, green alien dancing girls...

I think why they are not adding more stuff is that a majority only want bug fixes and optimizations. I want more stuff as well, but new features get overshadowed by "Why don't we just improve the old stuff". It sucks.

Share this post


Link to post
Share on other sites
16 minutes ago, DMagic said:

Is the idea to use for loops in place of foreach, or try to avoid loops where possible? I've always understood for loops to be more efficient, at least for larger, repeated loops.

Unity generates garbage in foreach loops. There are ways to work around that by precaching the enumerator of the collection, but we are going with old fashioned for loops.

12 minutes ago, Foxster said:

That's all great...but when is KSP going to have some more content? 

I see we are getting the long-awaited antenna stuff "soon" but that is pretty much already available as a mod, so I'm struggling to get excited about it. The only other thing seems to be the Asteroid Day mod - which is not new. 

Apart from the new heat shield, it seems a long time since there has been some major new stuff. Now that we have a stable platform and the ability to support more stuff, how about some more planets, another solar system, space aliens, buildings all over Kerbin, a lot of new parts, lots of things to discover on the planets, subterranean caverns, green alien dancing girls...

New stuff is just as fun to develop as it is to play, so we're definitely with you when it comes to being more fun. However, if we keep churning out new stuff without occasionally pausing to polish up the old stuff, we start accruing what is known as "technical debt". This means that things become harder and harder to work with, and bugs become easier to introduce and harder to fix.

You don't want that, and neither do we, which is why we have these refactoring periods. This is especially true after a patch of such earth shattering proportions as 1.1 was.

Edited by Arsonide

Share this post


Link to post
Share on other sites
10 minutes ago, Foxster said:

That's all great...but when is KSP going to have some more content? 

I see we are getting the long-awaited antenna stuff "soon" but that is pretty much already available as a mod, so I'm struggling to get excited about it. The only other thing seems to be the Asteroid Day mod - which is not new. 

Apart from the new heat shield, it seems a long time since there has been some major new stuff. Now that we have a stable platform and the ability to support more stuff, how about some more planets, another solar system, space aliens, buildings all over Kerbin, a lot of new parts, lots of things to discover on the planets, subterranean caverns, green alien dancing girls...

IMHO we can always get more content through mods. What I'd like, other than bug fixing and performance, is improved gameplay (as in, dV readouts, KAC, better campaign) and eyecandy, and that last thing is probably a huge task in itself

Share this post


Link to post
Share on other sites

Happy to hear that Squad is focusing on "taking out the trash" in the next update :wink:   Keep up the good works!

Share this post


Link to post
Share on other sites
10 minutes ago, Foxster said:

That's all great...but when is KSP going to have some more content? 

I see we are getting the long-awaited antenna stuff "soon" but that is pretty much already available as a mod, so I'm struggling to get excited about it. The only other thing seems to be the Asteroid Day mod - which is not new. 

Apart from the new heat shield, it seems a long time since there has been some major new stuff. Now that we have a stable platform and the ability to support more stuff, how about some more planets, another solar system, space aliens, buildings all over Kerbin, a lot of new parts, lots of things to discover on the planets, subterranean caverns, green alien dancing girls...

Once a stock game is solid stable, even more moders will be inspired to create more content, with high chance to be stable too.
While SQUAD will not provide new content directly, they will ensure stable platform for it.Certainly it will be something for everyone to enjoy.

Share this post


Link to post
Share on other sites
5 minutes ago, NathanKell said:

We're converting them all to for loops.

The issue is that in Unity's mono, foreach creates garbage. And linq more or less _has_ to create garbage AIUI, and it does it in spades in Unity.

Indeed;  while a simple foreach(foo in bar) {}  may -look- like simpler construct; behind the scenes there is all sorts of ugliness with instantiating an iterator object... which then has to be garbage collected.  Add that to every spot that for-each is used... and you are quickly drown in single-use garbage objects.  As such I only use foreach in places that I expect to only run once in a great while, or while working up prototype code (which has proper for loops inserted before moving to production).

It can also help to define your length test variable prior to starting the for loop; at least in the earlier days of memory-managed languages (and java in particular) - declaring the length check variable outside of the for loop will result in it not rechecking a list.length every iteration and merely checking vs. the cached length variable; depending upon the list implementation this could have substantial cpu impact.

I learned all of this all-too-well while learning the Android development environment.  Zero-allocation-loops was just about the only way to do it on 'droid, as the garbage collector was (at least in 4.xxx) very, very... so terribly slow.

Share this post


Link to post
Share on other sites
9 minutes ago, Arsonide said:

You don't want that, and neither do we, which is why we have these refactoring periods.

OK, I've got where you are coming from but the basic game with the solar system and the craft parts hasn't changed much in quite a while, apart from bits and pieces. I really think it's time to get creative with the amazing base platform you now have and take the game forward, rather than constantly polishing what you have.

Otherwise you know someone is going to steal the basic idea and make a more engaging product, leading to the demise of KSP.   

Share this post


Link to post
Share on other sites

Great DevNotes! Just one thing missing, the poem.

01010010 01101111 01110011 01100101 01110011 01100001 01110010 01100101 01110010 01100101 01100100 01010110 01101001 01101100 01101111 01100101 01110100 01110011 01100001 01110010 01100101 01100010 01101100 01110101 01100101 01001001 01100100 01101111 01101110 00100111 01110100 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01100001 01101110 01100100 01100011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 01110011 01100011 01101001 01100101 01101110 01100011 01100101 00101100 01100010 01110101 01110100 01101111 01100010 01110110 01101001 01101111 01110101 01110011 01101100 01111001 01111001 01101111 01110101 01100100 01101111 00100001

Hey people who code, how does it feel not understanding anything you just read!

Share this post


Link to post
Share on other sites
Quote

(today) We’ve received a lot of positive feedback, and it looks like our 1.1 branch is now stable

(two weeks ago) Brian (Arsonide) tackled an issue where  EVA’d kerbals interacted violently with wheel suspension raycasts. The Kerbals are now moved onto a special “EVA” layer in the game which ignores the suspension colliders.

Wheels appear fixed but landing legs, not so much.

--

Share this post


Link to post
Share on other sites

Without asking specifically when, is there a vague indication of the timeline? Was development of 1.1 exceptionally unplanned long, or is that going to be the new standard for update timelines? Or is there hope to release 1.2 sooner™?

Share this post


Link to post
Share on other sites
28 minutes ago, Shadowmage said:

Indeed;  while a simple foreach(foo in bar) {}  may -look- like simpler construct; behind the scenes there is all sorts of ugliness with instantiating an iterator object... which then has to be garbage collected.  Add that to every spot that for-each is used... and you are quickly drown in single-use garbage objects.  As such I only use foreach in places that I expect to only run once in a great while, or while working up prototype code (which has proper for loops inserted before moving to production).

It can also help to define your length test variable prior to starting the for loop; at least in the earlier days of memory-managed languages (and java in particular) - declaring the length check variable outside of the for loop will result in it not rechecking a list.length every iteration and merely checking vs. the cached length variable; depending upon the list implementation this could have substantial cpu impact.

I learned all of this all-too-well while learning the Android development environment.  Zero-allocation-loops was just about the only way to do it on 'droid, as the garbage collector was (at least in 4.xxx) very, very... so terribly slow.

Yep! Order of preference is:

for(int i = foo.Count/Length - 1; i >= 0; --i) // this saves a STO

followed by

int fC = foo.Count/Length;

for(int i = 0; i < fC; ++i)

and only then by other for styles let alone foreach.

Share this post


Link to post
Share on other sites
21 hours ago, Glaran K'erman said:

Great DevNotes! Just one thing missing, the poem.
<snip>

Hey people who code, how does it feel not understanding anything you just read!

Roses are red Viloets are blue I don't understand computer science,but obviously you do!
Violets is spelt wrong.@Glaran K'erman

 

Edited by JPLRepo
Removed code violating forum rules.

Share this post


Link to post
Share on other sites
8 minutes ago, Gordon Fecyk said:

Wheels appear fixed but landing legs, not so much.

There is some confusion as to what we fixed there. We prevented the suspension raycasts from reacting to the presence of the kerbal, which helps prevent the vessel from launching when this happens, at least as a result of suspension forces. The wheel itself (legs are still wheels internally) is still quite unstable, and is a solid physical object that is imperceptibly vibrating, so the kerbal can still be launched if he wedges himself in there - especially in low gravity situations.

We will be looking at wheel stability in 1.2, now that we are on a new version of Unity.

Edited by Arsonide

Share this post


Link to post
Share on other sites

I will admit it saddens me that 1.2 will not be a graphical update to the game, but I can wait :)

Edited by Caelib

Share this post


Link to post
Share on other sites

Bug fixes, optimizations and the addition of features, what more is there to ask for? 

Share this post


Link to post
Share on other sites
5 minutes ago, NathanKell said:

Yep! Order of preference is:

for(int i = foo.Count/Length - 1; i >= 0; --i) // this saves a STO

followed by

int fC = foo.Count/Length;

for(int i = 0; i < fC; ++i)

and only then by other for styles let alone foreach.

Thanks, I'll start implementing this in my current development and as I move forward, will push it into my other mods

Share this post


Link to post
Share on other sites
1 hour ago, SQUAD said:

We’ve received a lot of positive feedback, and it looks like our 1.1 branch is now stable for windows users.

fixed that for you.

Share this post


Link to post
Share on other sites

According to a anonymous member on the local ksp forum, it has already been stated by the devs that reworked rocket parts won't make it into 1.2. Is that info correct?

Share this post


Link to post
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.