Upgrading Rawr3 to Silverlight 3 Release from Beta

Topics: Rawr.Base
Coordinator
Jul 14, 2009 at 4:51 PM
Edited Jul 15, 2009 at 10:15 AM

Hey all,

 Silverlight 3 was officially released a couple days ago. I've worked on getting Rawr3 upgraded. Here's what you need to do in order to get it running again:

  1. Uninstall everything named "Microsoft Silverlight...", and "Microsoft Expression Blend..."
  2. Install (all linked from silverlight.net's Getting Started page)
    1. Microsoft Silverlight (version 3)
    2. Microsoft Silverlight 3 SDK
    3. Microsoft Silverlight 3 Toolkit July 2009
    4. Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 (or Visual Studio Express, or Visual Web Developer, etc.
    5. NOTE: Also linked on that page is the Microsoft Web Platform Installer. I *strongly* recommend that anyone who doesn't have a full copy of visual studio (ie, you're using express or web dev) use that to install everything at once, including the latest copy of express or web dev. You'll still have to install the Silverlight 3 Toolkit July 2009 afterwards.
  3. Goto your Rawr3 folder, and delete Rawr3.suo.
  4. Open each project folder, and delete bin, obj, and *.user.
  5. Launch VS, and Get Latest, BEFORE opening the Rawr3 solution.
  6. There's some strange bug right now where opening a XAML file causes VS to crash on some machines. Very odd, will let everyone know if I find a fix. (EDIT: Thread about it here: http://silverlight.net/forums/p/110528/249593.aspx#249593)
  7. Rawr!

In terms of actual code changes, I had to fix a few things, but nothing too bad.

 

P.S. Levva, could you please remove that Clipboard stuff in Rawr.Enhance? Either don't use the Clipboard, or find a native way to do it, please.

 

EDIT: Bah, some of my changes didn't work right, hold off a bit longer, will fix it and check in when I get home tonight.

EDIT 2: OK, there, checked in. Also fixed the broken armory parsing of characters.

Jul 20, 2009 at 12:17 PM

Sadly it will take some time for me to compile smoothly with Silverlight 3, because there ain't no german version out yet and the english one does not install.

Developer
Jul 20, 2009 at 12:57 PM
Edited Jul 20, 2009 at 2:01 PM

When did you last look at the clipboard bits? I thought I'd re-written it to use a Silverlight supported variation. Must admit though I've not looked near the Silverlight stuff for over a month.

Edit: Just installing stuff as outlined above, and will see if I can work out what you mean. Actual links would have helped enormously btw as the links on that site are all over the place.

 

Edit 2: Ok got Rawr3 stuff running. I can't see where you've hidden the Clipboard Export. It seems that quite a few options aren't implemented yet. I'd be enormously wary of releasing this version to the general user base, its going to get slated something rotten in the reviews section for missing lots of stuff, as well as being a lot slower. Looks nice though :)

On a positive note I'll have a look at the list of outstanding things that need to be dealt with prior to release. I might actually be able to contribute to getting it ready, rather than sounding like a nay-sayer (which isn't my intent). It is just exceptionally daunting for someone who has never looked near any silverlight stuff and really doesn't want to either, to know what to do without breaking anything. I do want to help but have no clue where to start, as none of the xaml stuff looks familiar, and doesn't seem to have a graphcial editor??? (I must be missing an install??) For these reasons I tend to just stick to v2.2 updates instead.

I know I'm not alone in this there are several of the other model developers who have expressed reservations about how we are expected to do stuff in Silverlight. I suppose really I'm asking for some guidanance that doesn't involve reading Microsoft documentation, as that is not a route I plan on going down. I will never ever use Silverlight in any professional capacity and so I don't wish to spend hours reading MS blurb just to get Rawr working.

Just a bit lost and confused as to why you think this Silverlight stuff is a good way to go, as so, far other than it being new, I've not heard any reasons why its a good idea. I'm probably just missing the obvious though.

Jul 20, 2009 at 4:17 PM

> Just a bit lost and confused as to why you think this Silverlight stuff is a good way to go, as so, far other than it being new, I've not heard any reasons why its a good idea. I'm probably just missing the obvious though.

Cross platform support would be an obvious reason.  WoW has an awful lot of folks playing it on a Mac, and running VMware just to have Rawr running is a bit of an overkill.

 

Coordinator
Jul 20, 2009 at 4:38 PM

The reasons for using Silverlight are pretty obvious. Everyone can use it, from any desktop machine.

Helmchen: I'll look into this, I'm pretty sure there's a way.

Levva: There is no clipboard export in Rawr3 yet, I just saw your Clipboard files. The XAML has no visual editor in VS 2008, they split it out into a separate app, Blend. VS2010 will have it thought. You really shouldn't need to do a whole lot with XAML, it's just for the calcopts panel for you. Once you have Rawr3 running, there really should be no difficulty. It's just a different subset of the framework. Don't frustrate yourself; ask for help.

Jul 20, 2009 at 10:08 PM

One concern I have, some of the modules are pretty slow in the current version, any additional slowdown will begin to make the optimizer and especially the upgrade list pretty useless.

 

~Droid

Coordinator
Jul 20, 2009 at 10:10 PM

Performance on Silverlight should be 10-20% slower than Rawr2, which is far from 'pretty useless'. The WPF version of Rawr is still planned, and will be the same speed as Rawr2. Additionally, I expect we can improve the performance of specific modules, in most cases.

Jul 21, 2009 at 6:23 AM

With my current Rawr character file, and using the DPSWarr model, it takes approximately 20 minutes to do an optimization on fairly new SMP 8-core workstation (as a side note, I am quite impressed that Rawr can keep this machine at ~90% utilization), and it is very rare that the optimizer gets the optimal setup even at max thoroughness on the first attempt, so I end up running the optimizer 3-4 times. So if it currently takes me up to 80 minutes to do an optimization on a workstation that very few people would have access to, then adding 20% to this time is in my humble opinion, unacceptable.

 

On this workstation it also takes around 4-6 hours to do a upgrade list, so again adding 20% is unacceptable, IMHO, as well.

 

Just my two cents,

~Droid

Coordinator
Jul 21, 2009 at 6:46 AM

Sounds like the DPSWarr model is in dire need of some performance optimization, then; that's far from what should be expected performance.

Jul 21, 2009 at 5:56 PM

20 minutes?  Those numbers seem high to me.  With max thoroughness and WoW running in the background, I was able to optimize in approximately 10minutes.  That's with a few options in some slots, and one additional gem selected (which makes the optimizer complain about number of gems, but doesn't seem to be easily remedied as I'm just near the arpen>str threshold and I'm a jewelcrafter, so I have a lot of gem options).

Droidicus, is the optimizer giving you any warnings about having "too many" <gearslot> available?

Developer
Jul 21, 2009 at 6:17 PM

I'm also not a real fan of this migration (feel it distracts from the modelling effort). Agree that portability is nice, but the fact that it doesn't port natively, is in my opinion because of Microsoft. This doesn't break the company specific issue. Using a standard programming language, like C++ (with a portable GUI like QT or others) or even Java wouldn't have neccesitated this migration. (End anti-Microsoft rant). But I must admit this was my first introduction to C# and the language and combination of language/ide/debugger does have some interesting features, but unless another version of C++ is created, I doubt if I will use it outside Rawr.

It appears that the Silverlight version was also fetching images from the Internet and with my low bandwidth and bad latency, this doesn't help, when looking at speed.  So for me in the forseeable future, "Rawr2.Tree" will still be the main focus, with Rawr3.Tree just being a novelty optionspanel to the existing model.

In terms of optimisation speeds, I would be dissapointed if the optimiser is more than 5-10% slower (that would mean bad compiler implemention): Most of what it should be doing (calling the model's calculation functions), should be standard code and libraries which shouldn't be different (in theory) for a Silverlight GUI.

 

Levva, I used the Beta version of Blend to create the Options Panel for Tree. It works and gets easier over time, but possibly due to it being a beta version it had some issues:

- Adding sliders/text boxes etc. to grid entries frequently resulted in weird sizing options being enabled. The moment it is inserted, trying resetting to default and then tweaking the size again if neccesary.

-When data binding drop-down boxes to options in the code, make sure the array is created using a constructor and not statically defined, else you will not be able to see it from Blend.

-There were a few times where I modified the XML file directly to get a specific entry to match an example I wanted to copy from one of the other models, since I couldn't figure out how to get the correct settings in the menus.

-I had one issue where after I had data bound a field, I wanted to refactor the code and link it to a new entry in the code. This didn't become visible in Blend and I had to link the file a second time to make the new variables created in the code visible to Blend. (Ended up editing the XML for both parts to use the same mapping, instead of having 2 mappings). (Not sure if reloading Blend would have rescanned the first mapping and bypassed the need to remap the file a second time).

 

 

Coordinator
Jul 21, 2009 at 6:55 PM

"I'm also not a real fan of this migration (feel it distracts from the modelling effort)."

Those model devs that are still working on getting their models right should be minimally impacted; just install Silverlight tools (I realize that can take significant time, but should be a 1-time cost), and create an options screen (shouldn't be a big deal, see below).

 

"Using a standard programming language, like C++ (with a portable GUI like QT or others) or even Java wouldn't have neccesitated this migration."

Using C++ would have meant development would be too slow to keep pace with WoW, and would still have portability issues. Using Java would have had performance issues, and user-friendliness issues, both of which are very important to Rawr. C#/.NET is the only viable choice, for Rawr to meet its goals, and Silverlight lets us expand our audience.

 

"It appears that the Silverlight version was also fetching images from the Internet and with my low bandwidth and bad latency, this doesn't help, when looking at speed."

You'd be downloading those images anyway. Silverlight caches them, so you only download them the first time, just like with Rawr2. The only difference is that Rawr2 starts with a huge collection of images out of the box. We may be able to do that for Rawr3, as well, but it's low priority. 

 

"In terms of optimisation speeds, I would be dissapointed if the optimiser is more than 5-10% slower (that would mean bad compiler implemention): Most of what it should be doing (calling the model's calculation functions), should be standard code and libraries which shouldn't be different (in theory) for a Silverlight GUI."

The difference is that Silverlight doesn't allow unsafe code (code working with pointers), which prevents us from doing some tricks to improve calculation performance.

 

"<Issues with Blend>"

I hear you there. XAML is a new language, that most devs here aren't familiar with, and the editors for it are still immature. I'd advise all model devs to just 'get it working', then let me know, and I'll clean it up, if you want. 

Jul 21, 2009 at 7:21 PM

Droidicus, is the optimizer giving you any warnings about having "too many" <gearslot> available?

Yes, I have a significant amount of gear available (only full-time DPS plate wearer in my guild), and with all the different combination of hit/expertise/ArmorPen/etc/etc/etc that Warriors need to balance I have a significant number of items and gems enabled. The character file I recently uploaded in the issue tracker is only a sub-set of what I usually use to optimize.

 

~Droid

Jul 21, 2009 at 7:32 PM

I'd suspect that's your problem, more than anything else.  Try narrowing down the options a bit if possible.

Believe me that I understand there's a lot of DPS plate options available, often times it becomes pretty clear that your T7.5 won't compete with your T8.5 (legs being the exception if they don't make a set bonus), etc.  Having too many options not only will hurt optimization time, but also leads to Optimizer not being accurate due to the nature of genetic algorithms.

I've found that it's best to limit each slot to 3 items each, and to make sure your gemming templates are correctly set up (if you've got enough arpen gear to make arp>str, you can safely remove the str gemming options.  If on the other hand you won't make arpen>str even when you maximize your arpen and put 16arp gems in every slot, there's no need for the arpen options).  Gemming Templates and gem options can be a HUGE time-eater, especially if you don't need them.

Jul 21, 2009 at 10:02 PM
Edited Jul 21, 2009 at 10:03 PM

While it does sound like Droid's problems are largely because of the number of items marked as available, Rawr.DPSWarr could use some significant optimization from what I've seen.

A Fury profile I just made with 2-3 items selected per slot and a reasonable number of gems took my relatively old dual core machine around 16.5 minutes to optimize with max thoroughness.  A very similarly complex Cat profile took around 3.5 minutes.  Just clicking on a gear slot or changing an option takes around a second, which gets extremely annoying for even basic functions.  You can work around the delays when changing options by viewing an empty chart, but that doesn't really fix the problem.

Editor
Jul 23, 2009 at 5:48 AM

Just a quick note, but be wary of totally disabling all Str gem templates in favor of ArP (even if ArP is normally an up) if you have an ArP proc trinket enabled.  This is obviously not related to the thread, but wanted to throw a quick warning out.

I will also say that I've experienced noticeably slow performance, for both optimization and normal functions (selecting, opening a list, editing gems, etc.) in the DPSWarr module.  This is with a full profile, but a) I keep my gemming options as sparse as possible, and b) I clean out my gear list often.

Developer
Jul 23, 2009 at 10:39 AM

Quote "Using Java would have had performance issues, and user-friendliness issues, both of which are very important to Rawr."

Java 6 running with default JIT compiler runs at near native (ie: C++) speeds. Comparable code in Java and C# show no substantial differences in various industry benchmark testing. So not sure where you get the performance issues from. User friendliness? Only issue I can think of would be making sure Java is installed on machine and that's no more of a battle than making sure .Net is installed on the machine. Granted the MS Visual Studio visual component editors tend to be more polished than the Java IDE editors but with SWT components these days you get a native environment look and feel quite easily.

The primary pain with C# is that it isn't cross platform. Silverlight is the MS hack to try to address this but according to industry reports this is done at the cost of significant performance hits. Its also a rather new platform and thus liable to have significant issues arise. Still that said its always good to play with something new. However if that comes too painful its sometimes easier to just fall back on what you know. This is my current issue - finding the time or inclination to get up to speed with Silverlight, rather than there being no support. I am fully aware that Astrylian has done a magnificent job in helping and supporting his team of developers and I can't thank him enough for the help and support he has given me in the past to get things working.

Jul 23, 2009 at 11:26 PM

The main benefit of Silverlight is that it uses C#, so we can reuse HUGE amounts of code. Model developers should have to make very trivial changes to their, and mainly just need to implement a new options panel.

Jul 25, 2009 at 2:37 PM

Did the silverlight 3 release lose chrome support?

Coordinator
Jul 25, 2009 at 5:17 PM

No; SL did, and still does, support running on IE, FF, Safari, Chrome, Opera, but only installs from IE, FF, or Safari.

ie, if you're a Chrome/Opera user, use IE to install it, then go back to Chrome/Opera.

Developer
Jul 25, 2009 at 9:16 PM

To address the performance issues in DPSWarr, Ebs has refactored a large number of Items in our CombatFactors file so that they only calculate once per instance instead of each function being run over and over again. This has so far yielded a net 25% boost in performance (20 Minutes becomes 15, 10 minutes becomes 7.5). He will be working more on this over the weekend and we'll see where we land on Monday.

Aug 3, 2009 at 11:59 AM
Edited Aug 3, 2009 at 12:04 PM

In case there are other german developers around:

http://www.microsoft.com/germany/net/silverlight/download.aspx

Silverlight 3 Tools in german are available now.