RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

.NET 4.0 Standard - VS 2010 Solution

Status
Not open for further replies.

LdNS88i

Sorceror
I suppose there is a problem with framework 4. With 2.0 stored properly, when the server is running on version 4, at some point is saved, and the world can not be removed with a pause. Players do not eject, connections is not lost, all the players remain on the server. Just the world stops. At what stage is a problem I do not understand, because before this can normally save a lot of time. At 2.0 it all works fine, uptime 20 days or more. 4.0 to about 1-3 days and the world freezes when saving, helps only restart. RunUO 2.1 Win Server Ent. 2003 SP2 R2
 

Peoharen

Sorceror
Mitty hasn't had a problem using .NET 4.0 for what? A year now? And even the Orb SVN offers a compile under and use 4.0 for the last couple of months and no one has mentioned a problem with it.

Which begs the question, what's different with yours? It could be a memory leak in a custom script running during the save event.
 

Acronis

Sorceror
My shard runs on .net 4.0. It was an impromptu change when I realized I needed it for HashSet type and figured it was time to upgrade anyway. It's not really a huge deal to change. I don't recall any code specific changes.

Just install it on the server and then change your compile script to something like this: (note: you'd probably not need the mysql part)

Code:
@echo off

SET Path=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

csc.exe /debug /out:.\RunUO.exe /recurse:RunuoAoV\*.cs /reference:MySql.Data.dll  /win32icon:RunuoAoV\runuo.ico /unsafe /Warn:0

Basically, just use the 4.0 compiler instead of the 2.0. I don't recall having to do anything different. Note that the numbers after 4.0 may differ as they've probably released a newer version since the last time I installed.

Only thing, installing .net 4.0 is a pain. There is so much stuff you need to install before it actually lets you, but it tells you what. There's like 10 different packages you have to install, like specific service packs, then you have to work your way up the .NETs, and there's misc KBs as well. But it's not that bad as it tells you so you just have to google and download what it wants and install. It may be better on server 2008, I have not tried that yet.
 

Pure Insanity

Sorceror
My shard runs on .net 4.0. It was an impromptu change when I realized I needed it for HashSet type and figured it was time to upgrade anyway. It's not really a huge deal to change. I don't recall any code specific changes.

Just install it on the server and then change your compile script to something like this: (note: you'd probably not need the mysql part)

Code:
@echo off
 
SET Path=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
 
csc.exe /debug /out:.\RunUO.exe /recurse:RunuoAoV\*.cs /reference:MySql.Data.dll  /win32icon:RunuoAoV\runuo.ico /unsafe /Warn:0

Basically, just use the 4.0 compiler instead of the 2.0. I don't recall having to do anything different. Note that the numbers after 4.0 may differ as they've probably released a newer version since the last time I installed.

Only thing, installing .net 4.0 is a pain. There is so much stuff you need to install before it actually lets you, but it tells you what. There's like 10 different packages you have to install, like specific service packs, then you have to work your way up the .NETs, and there's misc KBs as well. But it's not that bad as it tells you so you just have to google and download what it wants and install. It may be better on server 2008, I have not tried that yet.

Note that if you do what is mentioned above, you still won't get to use all the nice new purdy .net 4.0 features that are in RunUO. Such as the new faster networking, and more. You'll want to compile it with Framework_4_0 to turn on the new .net 4.0 dependent features.
 

Vorspire

Knight
Note that if you do what is mentioned above, you still won't get to use all the nice new purdy .net 4.0 features that are in RunUO. Such as the new faster networking, and more. You'll want to compile it with Framework_4_0 to turn on the new .net 4.0 dependent features.

When you say "Framework_4_0" you should state that it is a preprocessor definition as to avoid confusion.

For those using a batch file or command prompt, you can enable the definition by adding /d: Framework_4_0 to your compiler arguments, for those using Visual Studio, just add it to the definitions input box in the project properties on the Build tab.

Also for those with Automatic Updates turned on - the chances are you already have .NET 4.0 installed on your system.
 

Peoharen

Sorceror
Installing 4.0 is easy, you only do it once per format.

You can choose not to install all the optional crap too, or at least you can if you downloaded the installer. Quite a few programs these days advertise other products directly in the installers, when in doubt uncheck it. If you didn't install something you needed, your computer will tell you :p
 

mumuboy

Sorceror
I converted to .NET 4.0 when it first came out for one reason. TimeZones. Allowed my code to be tailored to where a person lives and combined with cultural settings, I can provide a game experience to anyone, anywhere in the world. I changed how system messages are sent to the players so that its translated in their language. All I need is a cliloc file on the server side with their language and thats it... they have a game in their language, culture, and timezone.
Additionally I agree with the memory consumption and other beneficial aspects. I would love to see your core improvements as well Vorspire.
 

Vorspire

Knight
I would love to see your core improvements as well Vorspire.

I don't change anything in the core, all of my work is developed with the intention of being 100% drag and drop :)
The only thing I tried was a different serialization method but upgrading to .NET 4.0 and using the Dynamic Save strategy sacked the need for it.
 

aralith

Sorceror
Please, for the love of god... RunUO needs to be upgraded to .NET 3.5 at least.

Frankly, it's rather disgusting that a project with so much power is limited by being distributed as a .NET 2.0 application. There's zero reason to keep the code so out of date other than the massive amount that would need to be upgraded. Even then, it doesn't have to be upgraded all at once. It's not like when RunUO moved from 1.1 to 2.0... fundamental things like List<T> still work fine.

You know, when I'm interviewing people at work, I don't consider anyone that claims to have used .NET since <=2.0 but doesn't know how to use LINQ or lambda expressions? You know why? That means they're a stagnated developer. You're a stagnated developer, RunUO. I wouldn't hire you.

I mean, I actually hired a junior developer recently that has, literally, never used a backing field for a property in C#. Look at playermobile.cs and tell me auto-properties wouldn't make you cream your collective pants.

If I hadn't been a part of the RunUO community for, what's (disgustingly) nearing a decade and know better, I would see ".NET 2.0," and laugh it off as a stale project.

I don't really know what people are talking about with .NET 4.0 being difficult to install? I think, on Vista, you need one service pack? On XP you need Service Pack 3? You should be getting the service packs anyway. On Windows 7+, you don't need any service packs, and I'm pretty sure it comes with .NET 4.0?

The only negative I see coming out of making .NET 4.0 the default is saying the project compiles with Mono... obviously that would break on 4.0. But, that's why we have preprocessor directives, right? That's why OSS projects get forked, right? That's why we code to interfaces, right?

RunUO will have a healthier developer community if you make their coding experience happier by upgrading to a newer framework version. By upgrading to 4.0, you unleash a whole new level of power just in language features alone, let alone the addition of WCF in 3.0 and the one-metric-crapton of power that it gives to people that want to easily integrate more ways to interface with the server other than just the UO client.

Empower your f'cking developers with modern tools.

/rant
 

2plus2

Wanderer
Great argument except the auto properties point. Auto properties are pointless, if you are using them, just make them public fields, rather then get/set. public fields are faster then a get/set function could ever be, not to mention can be used as ref and out pointers ;). But as a software engineer myself, bottom of the line requirements for any position at my company is 3.5.
 

Vorspire

Knight
Please, for the love of god... RunUO needs to be upgraded to .NET 3.5 at least.

Frankly, it's rather disgusting that a project with so much power is limited by being distributed as a .NET 2.0 application. There's zero reason to keep the code so out of date other than the massive amount that would need to be upgraded. Even then, it doesn't have to be upgraded all at once. It's not like when RunUO moved from 1.1 to 2.0... fundamental things like List<T> still work fine.

You know, when I'm interviewing people at work, I don't consider anyone that claims to have used .NET since <=2.0 but doesn't know how to use LINQ or lambda expressions? You know why? That means they're a stagnated developer. You're a stagnated developer, RunUO. I wouldn't hire you.

I mean, I actually hired a junior developer recently that has, literally, never used a backing field for a property in C#. Look at playermobile.cs and tell me auto-properties wouldn't make you cream your collective pants.

If I hadn't been a part of the RunUO community for, what's (disgustingly) nearing a decade and know better, I would see ".NET 2.0," and laugh it off as a stale project.

I don't really know what people are talking about with .NET 4.0 being difficult to install? I think, on Vista, you need one service pack? On XP you need Service Pack 3? You should be getting the service packs anyway. On Windows 7+, you don't need any service packs, and I'm pretty sure it comes with .NET 4.0?

The only negative I see coming out of making .NET 4.0 the default is saying the project compiles with Mono... obviously that would break on 4.0. But, that's why we have preprocessor directives, right? That's why OSS projects get forked, right? That's why we code to interfaces, right?

RunUO will have a healthier developer community if you make their coding experience happier by upgrading to a newer framework version. By upgrading to 4.0, you unleash a whole new level of power just in language features alone, let alone the addition of WCF in 3.0 and the one-metric-crapton of power that it gives to people that want to easily integrate more ways to interface with the server other than just the UO client.

Empower your f'cking developers with modern tools.

/rant

I seriously couldn't have put it better myself! Happy holidays :)
 

aralith

Sorceror
Just out of curiosity... why have so few people forked RunUO?

Maybe the view point of Ryan and his dev team is simply that it's stable and does what is expected. That could be a valid argument and one that I could respect. But the beauty of GPL(2?) is that, if that's the stance that RunUO is taking, and we disagree with it, we are fully empowered to create our own solution forked from RunUO code and distribute it as an entirely different, and arguably "better" project.

Over the years there have been a few mildly popular RunUO derivatives, but none, that I'm aware of (and I admit I've been out of the loop), that really just aimed to improve the RunUO codebase; not fundamentally change it. If an OSS project won't accept our patches, and we truly believe them for the better good, fork it. There's nothing wrong in doing that. That's what OSS is all about... enabling advancement by enabling competition.

I say, if there's a need, fix the RunUO project structure. Better separation of concerns and pluggability (dare I say IoC?). Set up a proper VS2010+ solution for debugging by default. Slap up a github project/page, lay out a project plan, and start upgrading things. Ideally, both projects should benefit.

Side Note: I do say github for a reason... it's about to get some serious Windows/Visual Studio love this year, now that they've hired Phil Haack (see: http://haacked.com/) and it's super-fabulous for collaboration.
 

2plus2

Wanderer
Just out of curiosity... why have so few people forked RunUO?

Maybe the view point of Ryan and his dev team is simply that it's stable and does what is expected. That could be a valid argument and one that I could respect. But the beauty of GPL(2?) is that, if that's the stance that RunUO is taking, and we disagree with it, we are fully empowered to create our own solution forked from RunUO code and distribute it as an entirely different, and arguably "better" project.

Over the years there have been a few mildly popular RunUO derivatives, but none, that I'm aware of (and I admit I've been out of the loop), that really just aimed to improve the RunUO codebase; not fundamentally change it. If an OSS project won't accept our patches, and we truly believe them for the better good, fork it. There's nothing wrong in doing that. That's what OSS is all about... enabling advancement by enabling competition.

I say, if there's a need, fix the RunUO project structure. Better separation of concerns and pluggability (dare I say IoC?). Set up a proper VS2010+ solution for debugging by default. Slap up a github project/page, lay out a project plan, and start upgrading things. Ideally, both projects should benefit.

Side Note: I do say github for a reason... it's about to get some serious Windows/Visual Studio love this year, now that they've hired Phil Haack (see: http://haacked.com/) and it's super-fabulous for collaboration.
IoC and DP would be rad, some Ninject or whatever other Ioc/DP project is your to your liking, but either way, more plug/mod/ability would be awesome, i doubt it will ever happen, no one wants to take that on anymore, UO is to old, and losing to much interest, just look at google trends on the keyword RunUO or Ultima Online, its pretty sad.
 

aralith

Sorceror
I think getting some ninject/castle/whatever would actually do to save the RunUO idea even when UO is forgotten. RunUO, at it's root, is a good MMO framework. Abstracting the "Run" from the "UO," could have some pretty awesome potential.
 

2plus2

Wanderer
I think getting some ninject/castle/whatever would actually do to save the RunUO idea even when UO is forgotten. RunUO, at it's root, is a good MMO framework. Abstracting the "Run" from the "UO," could have some pretty awesome potential.
granted doing such a think would mean rewriting a great deal of RunUO anyway, so might as well just start from scratch, just my opinion.
 

aralith

Sorceror
granted doing such a think would mean rewriting a great deal of RunUO anyway, so might as well just start from scratch, just my opinion.


I disagree. The core code is rather minimal compared to the heaps of code that fall under the "Scripts" folder. The change would mostly be a bunch of cut/paste. New implementations, on the other hand, would be a lot of rewriting.

Nevertheless, inversion of control was a minor part of my point and a personal preference that probably could have been left out of my post. :p
 

anybody

Sorceror
2.1 and 2.2 have not been updated to support the latest expansions and they have had more then enough time to do it but yet RunUO is 120% Ultima Online.

The developers of other emulators for other games were and are already doing what the community here at RunUO has already suggested to the Devs, like using a database to store the server settings and saving to a database instead of binary files. Wow, that is opening a whole new world of website/server interaction.

O, did I say that other emulators were already doing this before it was ever suggested here on RunUO.com?

My over all point still stands. RunUO is way freakin' behind and has been for over 6 years. This is also known as a dead project. This time click on the link.
 
Status
Not open for further replies.
Top