Make it run faster

The word for this week for me has been optimization. Most of my time so far this week has been spent digging through Lua files trying to find where we can safely move things into code, restructure things to be faster, or things we can outright remove because we don't use them anymore.. The biggest example (from my plate) so far has been unit damage. The old unit damage stuff was calculated in Lua and made several calls into code to get the information it needed to make the calculations. Now, we call a function in Lua (where we can hook callbacks, or modders can override it) which checks if the unit can be damaged and then goes back into code to do all the calculations. Much faster.

After seeing the system requirements for the game I was curious just how accurate they are. So, I built a retail build on my machine to try it out. It ran at +10 sim speed from start to finish, but I have a Core i7 machine with 6 GB of ram, so it wasn't really a accurate test and Gordon called me on it. So, he took his FA dev machine, synced up to the latest build, and ran a 1v1 on Seton's Clutch. As expected, the performance was awful. So, we synced up SC2 (which does not have his or my optimization changes yet) and ran a 1v1 on a similar map. Smooth as glass. We even turned the graphics up to high, which did cause some graphics lag because of his old video card, but sim speed was full on the whole time.

Having the Digipen people (and there are more of them showing up now) around has been awesome. It is like having a mini beta test in the office and I think their presence has been a great thing for this game. The XBox 360 version has been very popular, which comes as a surprise to me. I am a PC gamer myself, so maybe I just don't get it.

Gordon's FA dev PC specs:
Windows XP
Pentium D 3.2 GHz
ATI X1900


Col. Jessep said... / January 21, 2010 at 10:21 PM  

They play on the XBox when they could be playing on the PC?!? O_o The end of days is near my friends, repent your sins! xD

I'm glad to read the optimization is going well. Of course now I'm asking myself if I should really pay for the new i7 I was planning to get, maybe I'll just fix my old Core2Duo...

If somebody from Square Enix reads this: Still can't preorder the game on, there seems to be no official release date announced either in Europe so far. We all hope there will be a way to get the 5 bonus maps here, some French companies seem to get all 5 but they are somehow connected to SE it seems...

Good luck Sorian!

Sorian said... / January 21, 2010 at 11:18 PM  

I played it on my Core 2 Duo at home and it runs great. Better than FA by far.

EdWood said... / January 22, 2010 at 2:44 AM  

Wow, that sounds so great, I really can't wait for the game to get shipped.
I want to play it now!!! Damn, I am really getting very excited now and I also have still so many questions, but the game looks awesome so far (from what I have seen). :)
You can play it at home? You have Opera, I can just download it from you? lol

Have fun and enjoy the release.
By the way, I really hope they will release all maps a month later, otherwise it would be a shame.
Another question, where is the Monkeylord? :)


lukedegner said... / January 22, 2010 at 5:37 AM  

As always, thanks for the blog post! Cheers to having the same view on the pre-order maps. Regardless, I am totally all for that cleaning up of the code without locking out modding =3 I totally cannot wait for March!

Wojtek said... / January 22, 2010 at 7:06 AM  

Awww I see my post got deleted in your last blog update, sorry if I offended anyone there but a lot of what I said was true, and now the "pre-order" maps confirm the reason why a map editor is not included (DLC $).

Thanks for replying to it anyway :), but lets not talk bad about the xbox version as its super ;)

What are the specs of Gordons FA dev machine?

I'm waiting to pre-order on Steam however there is no price for Aussies yet!

Sorian said... / January 22, 2010 at 8:30 AM  

I don't think DLC is the reason at all. I don't see any reason why the modding couldn't come up with their own 3ds exporter and marker editor. I think the reason for there being no map editor is simply a lack of time to strip the one we use down. I am still holding out hope that we at least offer an exporter. That would help modders along a lot.

Col. Jessep said... / January 22, 2010 at 9:47 AM  

Thx Sorian, I'll get a new monitor (or 2?) instead of the the i7 then! :P

@Wojtek: GPG has no extra time to 'build' us a map editor atm. According to Chris Taylor it will be soon time for the gold version. You can see in the videos that GPG is optimizing performance and fixing bugs atm. They don't have enough time to strip down their mapping tools before the game rolls out even if they wanted from what I can tell. Bug hunting and finetuning are more important - and I really love to make maps!

I do hope they will remember the map editing tools however as soon as the first patches are out and they have time to breathe again. An exporter would be a very good first step though and we mappers could already familiarize us with the engine a little.

Michael said... / January 22, 2010 at 10:29 AM  

Glad to hear you're pushing for an exporter at least. That's an important piece. New here's an idea on the map editor thing. What would happen if there was, later after launch, a Gold edition released that included a map editor, an exporter and maybe some fanboy goodies (extra movies, making of video, wallpaper, decoder ring, whatever).
I personally would probably buy that. It would make its way into the wild quickly, sure, but it would be a way to boost sales after initial release dies down and then add some new excitement without necessarily requiring a lot of new content. Think of the way that Unreal had some kind of Gold edition that included tutorials and other stuff along with the editor (which was already in the vanilla release).
I still say that a modding community can keep a game alive and relevant much longer than would otherwise be expected. I hope a map editor is released at some point. I really want to try making one.

Sorian said... / January 22, 2010 at 10:33 AM  

Posted Gordon's PC specs.

Christian said... / January 22, 2010 at 11:15 AM  

is supcom 2 optimized for multi-core pcs?

Col. Jessep said... / January 22, 2010 at 11:24 AM  

Oi, I'd never thought you could optimize the performance that much - go GPG! Seriously, to get SupCom2 running smooth on those specs is one hell of an achievement!

olivier said... / January 22, 2010 at 1:01 PM  

Same question as Christian, does supcom 2 takes advatage of Quad ?

Wojtek said... / January 22, 2010 at 4:51 PM  

Thanks for the replies and updated specs Sorian!

Pentium D 3.2Ghz, this is now a very slow gaming CPU, so anything like a Core2Duo @ 2.2ghz should run this smoothly.

Michael, I dont think releasing a Gold edition with the map editor would help, because all the people who have already purchased the game wouldnt want to purchase again...

However if they released the map editor as part of a map pack (5 maps + map editor) with a cheap DLC price I might be tempted to get it.

Yes I dont like the idea of DLC (consoles brought it onto us) but would still be tempted by proper map editor via DLC.

Freeman said... / January 22, 2010 at 6:19 PM  

I think that people need to have some info on the multiplayer. Many of my buddies are still in the "not-interested-in-buying" zone because they only care about the multiplayer - and that's what defines the longevity of the game, I think. We definitely need some sort of information on how the multiplayer will work. The only thing we know so far is that is uses Steam (which was a great decision by the way!) Hell, I'd be happy with a few screens of the multiplayer tools/client.

That said, Thanks for all the info you've been posting, I wish you all the best for all your future projects! You rock!

Wojtek said... / January 22, 2010 at 6:38 PM  

and we need more info about the AI? Is the AI any good on hard? does it need to cheat to be a challenge?

Without Sorian modding the AI, there will be no instant action/coop mp fun vs the AI like in Supcom and FA.

Sorian made the AI so much better, now he works on the game but as we all know he is under strict direction and doesnt get much time to fine tune or make the AI like he wants!

We need a new Sorian clone to mod the AI after release :)

Freeman said... / January 22, 2010 at 6:59 PM  

I'm not worried about the AI. I bet Sorian has it covered :D

Tobias Fong C.W. said... / January 22, 2010 at 10:02 PM  

I've got a question, though? Why aren't they updating the official Supreme Commander 2 website? Other than an additional gameplay trailer and adding Kael's diary, there's nothing much to see there. What's the website for then?

olivier said... / January 22, 2010 at 11:34 PM  

by the way, now that the end of Supcom 2 development is coming to the end, do you have any new project in perspective ? I guess you have some comitment regarding Supcom 2 support but then ? can't wait to play the game and test the new AI. all what i have seen seems so much promising

Marc said... / January 23, 2010 at 5:56 AM  

olivier Jables is busy with something.

BulletMagnet said... / January 23, 2010 at 8:32 AM  

when it comes to tweaking the economy code; could you possibly try to keep as much of it in Lua for a particular modder to play with come release? ;p

Sorian said... / January 23, 2010 at 9:19 AM  

@olivier: We do have another project going.

Also, there needs to be more screenshots out, and better ones. A lot of the ones I have seen lately look like they were taken on medium settings.

Michael said... / January 23, 2010 at 4:12 PM  

@ Wojtek
re: the Gold edition. I'm fine with your DL map pack with map editor. I don't really care how they do it. I just want them to consider releasing a map editor later since they can't do it now. Maybe if they think they can use it to boost sales somehow post launch (an expansion pack, Gold release, DL content, whatever) they'll do it.

Dunbar said... / January 24, 2010 at 7:48 AM  


What video card is on your machine, or what video card have you seen play the game at max resolution settings and highest fidelity detail?

Sorian said... / January 24, 2010 at 10:58 AM  

The PC listed in the post played on max for 20-30 minutes. There was some video lag while zooming back and forth, but that was it. I will play a match at home and post the results, when I get a chance.

Dunbar said... / January 24, 2010 at 12:18 PM  

Thanks Sorian

I mean I don't want to know what the minimum system reqs are... I would like to run the game with max everything, and know what system is required for that.

Rebma Boss said... / January 24, 2010 at 6:22 PM  

If you don't do a retail build, what kind of build do you create, and what advantages does it have?

Torhan.Bartel said... / January 25, 2010 at 9:30 AM  

Hey, Sorian,
do you think, i'll be able to play the game with an Intel Core 2 Duo 2x 1,66 and an ATI Mobility Radeon X1400 ???

Thygrrr said... / January 25, 2010 at 9:36 AM  

Rebma, probably a debug build? (a project this size has probably various build configurations for different modules).

Debug builds let you do all sorts of nice things, like stop the game whenever the execution hits a breakpoint (an interesting place you specified where it should stop), and crashes can usually be traced to the exact line of code where they occurred.

Also, contents of variables and various system states can be monitored at runtime more easily and completely with a debug build.

Thygrrr said... / January 25, 2010 at 9:38 AM  

That said, debug builds usually execute a bit slower than release/retail builds, because of all the bookkeeping that is going on, and because the compiler can't optimize the code as tightly because the debugger still needs to be able to map it to actual lines of code. :)

Anyway, SORIAN, a huge question here: Why do all the units have T1 dots under their strategic icons in the videos we've seen so far? An oversight? And keep up the good work, you're an inspiration to us all.

Sorian said... / January 25, 2010 at 9:56 AM  

@Torhan: Not sure. Sounds like my laptops spec at home, so may give it a shot if I find time.

@Rebma: Basically what Thygrrr said. We have Debug, Release, and Retail. Debug lets us break into the code and allows us to trace code back if the game crashes. Release has less debugging capability, but compiles a lot faster than Retail.

@Thygrrr: Not sure about the dots. Didn't notice them. I will take a look and pass the info on, if need be.

Torhan.Bartel said... / January 25, 2010 at 10:08 AM  

To be more specific, its a Dell Inspirion 9400 Laptop

Jonas said... / January 26, 2010 at 4:16 AM  

Sorian> i second the question about multi-core support.Do i need to buy quad or leave with c2d (clock speeds are the same)? Will there be difference or it will run absolutely the same on quad core as on dual core? Thanks

Thygrrr said... / January 26, 2010 at 11:27 AM  

Sooo... any stray tech dots in current Release Candidate builds? :-)

Bernie said... / January 26, 2010 at 3:07 PM  

Hi Sorian, Could you find out when the Australian PC version will be released? Please...

Thank you

maxim said... / January 27, 2010 at 5:05 PM  

Hey Sorian,
I've followed your SC/FA AI's since day one and sunk at least 1000 hours into battling them (my GPG forum name is Pizzasupreme and my associate is DaForce).
With a more info on SC2 coming out, can you offer any comment on the claim is basically Demigod with robotic dinosaurs? Specifically:
>Square Enix's heavily 'eastern' influence appears to have had a very substantial impact on the look and feel, differentiating the game highly with the GPG games. I don’t have an issue with eastern influence however in the context of SC/FA it is entirely inconsistent. Dinosaur robots? Please

>Open natural landscape maps do not appear to feature, instead the highly artificial Demigod style maps appear overwhelmingly. Will Seatons or something more vast like Betrayal Ocean make an appearance or is it all simply bridge and choke point on a platform 50km up all the time?

>Eco eco eco. Everybody knows SC/FA had a highly unique economy. Doesn't SC2's eco reduce this extremely important aspect of the game to an oversimplified generic industry standard clone instead of something highly differentiated and dynamic? Is it not true this was really at the instance of Square Enix given their existing games are mindless console drivel and as a publisher they do not understand the real market segment love deep dynamic strategy (which does not fit their existing market segment focus)? I think you would find this is the number one disappointment from existing fans.

>The discussion around minimum spec is ironically concerning. We were hoping for a more advanced (on par with Sorian 2.00!) AI fully optimised for quad cores so large maps (40km + in SC/FA terms) against multiple AI were feasible with constant 0+ simspeeds. I would be concerned if an ‘average’ PC ran (like Gordon's P4 D of allllllll things) it “beautifully smoothly” with multiple AI on a large map. SC/FAs AI problem was poor AI optimisation and minimal quad core support. Quad core optimisation for SC/FA would have made it a different experience (multiple and more advanced AI) which we were hoping SC2 would be, however it appear to have yet again been simplified.

>And finally, the concern is SC2 is just Demigod with multiple units and similar mechanics to SC/FA rather than an organic evolution of a defining strategy game masterpiece.

Hopefully I’m wrong but the information to date (which is extremely sparse, well done again Square Enix) is very concerning. I can’t help but feel Chris has not been able to produce the game he wanted instead the publisher has put poorly founded commercial interests first.

Sorian said... / January 27, 2010 at 8:27 PM  

I was not here for the design phase of the project, so I can't speak to what influence SE had in the design of the units, if any. Personally, I like the look of the new units. Some of them have that far out feel that TA's units had.

This is flat wrong. There are a variety of map styles. From more industrial with ramps and such, to more landscape maps with slopes, hills, and mountains.

I disagree here too. I just played a nice long game of Gordon and I vs 4 unteamed AIs (we were just testing new optimizations). I played as Cybran (haven't used them as much) and they play very differently than UEF (which has been my main faction). You just don't have to focus on microing your economy as much and can focus on the fighting instead.

Who said the AI was less advanced? There were many performance issues with FA. These issues have been addressed in SC2. Gordon and I have spent the last 2 weeks just profiling code and finding places to optimize it. Many hours have gone into optimizations. The engine just runs smoother. Also, the test on Gordon's machine was 20-30 minutes of 1v1 AI on a 1km map. On high settings there was some lag and I strongly doubt it would have handled 8 AIs at those settings very well. As for using more than 2 cores, I would have to ask one of our other engineers about that, and I wouldn't be able to post the answer here since that information has not been released yet.

SC2 is far from just Demigod with more units. It still feels like SC, just faster paced and with more emphasis on the battle.

EdWood said... / January 27, 2010 at 8:40 PM  

Good to hear that Sorian,

sounds like a logical progression FA already pointed in that direction.

Oh well, I cannot wait to hold this game in my hands. :)

Keep on rocking, Ed :)

maxim said... / January 27, 2010 at 8:53 PM  

Thanks Sorian, I really appreciate your response.

Re 1: Great to hear. However I believe most of the public pictures project a Demigod map style.

Re 2: Come on :) I can't believe you would have chosen the generic eco system to the old one if you were lead developer (which you may be for a RTS one of these days). Managing the eco was a lot of fun and made the game very flexible. ie. feel like going for a UEF Mavor as soon as you get to t3? go for it. But not in the new version. And actively managing power when you have shortages was also fun. I guess there are just too many console only drones in PC games these days.

Re 3: No one said per se, however given historic precedence and the industry standard for RTS AI, unless you have coded it from scratch, I highly doubt it is comparable to Sorian 2.00. Does it have a strategy manager with 15+ strategies? Can it group units and avoid fixed defences? Can it manage a CAP around the main base? Can it manage a dynamic economy, sorry I forgot that's not applicable now :) Does it have response platoons and can manage expansion bases? I'm sure it’s great at pathing and spamming units but unless you're saying you developed it, tactically it is likely to be as proficient as a 386 playing tick-tack-toe.

Thanks again for your response to my probing questions. I'm looking forward to March 5.

olivier said... / January 27, 2010 at 11:11 PM  

It's quite obvious Maxim, S.E. is not OK to have gpg devs deliver the slightest information about the game unless they have given their agreement. And i think Sorian is probably in the worst position as being a gpg dev and also a Supcom Fan. For sure he has his own point of view but he is a gpg employee with some kind of NDA from S.E. which seems to be very restrictive. So wait and see, 5 weeks remain, it's not that long :-)

Sorian said... / January 27, 2010 at 11:27 PM  

I did, in fact, help create a portion of the AI. As to what things on your list made it in, you will have to wait and see.

DaForce2000 said... / January 28, 2010 at 12:23 AM  

Sorian, (DaForce from gpg forums here) can we expect to see a Sorian AI for SC2? (if its even needed)

Im not sure how much info you can divulge, but are any of your FA AI features present in the SC2 AI?... high level of customisation i.e. cheat multiplers, specific air/water/land AI, specific turtle/rush AI and so on... or are we looking at Demigod style AI, Easy, medium, hard..etc..and thats it.

Thanks mate.

Greg Peterson said... / January 29, 2010 at 3:38 PM  

There wouldn't be anything preventing a GPG employee from releasing a personal mod, would there?

Rebma Boss said... / January 30, 2010 at 10:56 AM  

If this is a question you can't answer, that's totally fine; but is there different music for each faction?

olivier said... / January 31, 2010 at 1:18 AM  

Having a game optimized is good, Supcom 1 went out too much early and was not optimized at all which did not help for it's success. Demigod was optmized but Multiplayer from starock sucked and we know the final result. Now from Chris Taylor Q/A we know that Multi is clearly not implemented as it should be. It's obvious the game is going to be released too much early. i don't know what S.E. is thinking about ... why on earth hurrying things up that much instead of polishing the game as it should be ????? Why not simply delay the game release to polish it as much as possible ? is S.E. scared about Starcraft 2 success ? Hopefully i'm wrong with my assumptions ....

BulletMagnet said... / February 1, 2010 at 3:15 AM  

guys, please, stop hounding Sorian with talk about the game not being finished, ruined, or what have you. Sorian isn't in a position to fix those; he's simply a coder, and codes where he's told to code.

if you want to bring up grievances; do it on the Square Enix or GPG forums, or preferably email Chris Taylor about it.


CasualSax said... / February 2, 2010 at 6:43 PM  

Bullet - you really need to get your facts straight before you start up the Demigod Multiplayer tree again.

Demigod used Raknet for its connectivity code, which was not intended for such large use. Stardock handled the chat and stats for the game. After it was shown that the netcode needed work for the game, Stardock and GPG stepped up to fix the issues.

bazkie said... / February 19, 2010 at 8:04 AM  

@casualsex: i never played demigod multiplayer, but i used raknet in my own projects, and i wouldn't know why it wouldn't be up to anything - it's just a proper network lib, so it should be able to do anything any other lib would :)

i'm very happy with the efficiency, having a lot of units and some AI's hanging around in FA was tediously slow! hope the simpler eco won't ruin the fun, surely it won't :)

Post a Comment