Author Topic: 0.201 "Bugfixes and Optimizations" released!  (Read 7553 times)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
0.201 "Bugfixes and Optimizations" released!
« on: May 19, 2017, 09:49:09 am »
Apologies for not getting this out last night: https://wiki.arcengames.com/index.php?title=AI_War_2:Earlier_Than_Early_Alpha#Version_0.201_Bugfixes_and_Optimizations

In general took about an hour to release this morning, but I was doing other things while waiting for various compilations and builds and uploads to do their own thing.  Once I stop having to rebuild the executables every release (which should happen before too long), this time might be cut in half, if not more.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #1 on: May 24, 2017, 01:51:28 pm »
Looks like .202 is getting some decent content in it! Are we waiting for anything in particular before it the release? I am looking forward to some new wormholes!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #2 on: May 24, 2017, 03:21:58 pm »
The new content in this one is mostly incidental, to be honest.  The big focus for us has been performance, performance, performance, and that's something that is still heavily inwork.  It's coming along, though!  I'm getting a somewhat choppy 25-50fps during heavy combat where I was in 0.201 getting a hugely-halting start-and-stop 20fps at most, and where in 0.200 I was getting even more halting 5fps.

What has been surprising is the various techniques that have NOT worked.  Matrix math is something that I figured I could shortcut in a variety of ways, but that didn't work out so hot.  The Graphics.DrawMeshInstanced route actually had a variety of issues, and then Graphics.DrawMesh doesn't avoid the culling problem after all -- frustum culling just won't die unless it takes efficient z sorting and transparency sorting down with it. ;)

There are still a variety of other changes that I'm working on, though, to reduce CPU bottlenecks that presently exist.  It's all about moving gameobjects around and the expense of the matrix math that entails.

That in turn leads to a variety of required changes relating to the hierarchy of objects in the tree, throttling and pooling of updates on more distant objects, and so on.  Thus far my focus is almost solely on shots, because they are relatively simple compared to squads and ships and gimbals, but I'm going to be after those other things next with my findings from shots.  Shots are no longer the largest slowdown on the CPU except when there are north of 5000 of them at once, so that's a big win.  I need to get that even lower, though, and then I'll be happy enough to start in on the squads.  That way I'll be confident in the results there without having to then take yet another pass on all this stuff too soon from now.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #3 on: May 25, 2017, 10:42:53 am »
5000 shots may sound like a lot, but if the AI sends 700 MLRS at a well defended planet, I'm sure we get well upwards of 30K shots on the map at a time. I hope you come up with some fun solutions!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #4 on: May 25, 2017, 11:24:37 am »
Yep, I've got part of it sorted out already by quasi-inventing a new data structure.  It's something I'm sure other people have done before, but it's new for these sorts of purposes at least so far as I know.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #5 on: May 25, 2017, 11:49:34 am »
Claiming an algorithm is linear with input off of two still relatively small data points makes the programmer in me twitch, though I assume you actually did more tests ;-)
« Last Edit: May 25, 2017, 11:54:22 am by BadgerBadger »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #6 on: May 25, 2017, 12:28:44 pm »
Yeah, these are just two small pieces of data out of huge streams of ongoing data I watched going by.  I had graphs I could watch, and spot check, etc.  I picked out a few points of interest to show, but even they are not fully representative because there are small variances in every frame that have nothing to do with the list and instead with the operations that may or may not happen at iterations of the list.  Hence some of the variance where I say something is "30 nanoseconds more" but actually it's more like 60 nanoseconds in the example given.

With that sort of thing, I'm kinda eyeballing it based on the averages of what is being sampled over a few million frames.  I didn't bother actually keeping a real average, because based off of visual graphs I can already see what's going on well enough for any practical purpose.  Getting super-precise average numbers would just be kind of a waste of time to show off, more than anything else. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #7 on: May 25, 2017, 12:48:31 pm »
Yeah, that makes sense. The performance numbers from the SwizzleList don't really matter in and of themselves. I'm glad you're making some progress!

I'm a bit curious what Keith is up to. I see he did a bunch of performance work, but since then I can only imagine he's been back in his mad scientist lab, cackling maniacally in a cloud of green smoke lit by lightning flashes, bringing the AI to life....

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #8 on: May 25, 2017, 01:02:37 pm »
He actually has some family things going on this week, so there's not as much from him this week.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #9 on: May 25, 2017, 01:06:24 pm »
Ah, okay. If these are stressful things then I hope they go as well as one can hope!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #10 on: May 25, 2017, 01:08:33 pm »
Nope, he's all good, and it was planned. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #11 on: May 25, 2017, 02:55:24 pm »
Oh good. I also spent a few minutes poking at the "zoom-to-cursor" code yesterday. Getting it to work "just the way I'd like" is challenging! Is there an obvious reason I'm missing for why the scrolling only adjusts on the X and Z axes?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #12 on: May 25, 2017, 03:28:50 pm »
I'm not sure what you mean by the x and z only?  The x and z are what come out of the y position based on the curve.  If you're referring to angle.

But if you look down at the field from above, then x and z are the "horizontal and vertical" planes.  Y is going into and out of the screen.

What you may need to do is adjust it "backwards" some, which would be based on the forward of the camera transform, probably.

At any rate, you wouldn't want to adjust the y, because that would mean when you zoom in it does more or less zooming in. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #13 on: May 25, 2017, 03:46:30 pm »
Oh, I was confused. I'm used to X and Y being horizontal and vertical in the plane, with Z being the height above the plane. This explains why I was having trouble figuring out what was going on! 

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: 0.201 "Bugfixes and Optimizations" released!
« Reply #14 on: May 25, 2017, 06:07:26 pm »
No problem!  That is indeed how things are oriented in world space here, but you're viewing this from a camera looking down from above.  So like hanging a camera from the ceiling. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

 

SMF spam blocked by CleanTalk