Page 1 of 2

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 9:01 pm
by Red Squirrel
Ok I've been thinking for a while now to write a UO server application from scratch. It would be written in C++ and run on Linux as native platform and I'd try to get it to work in Windows too - but Linux would be the main supported platform.

It would store everything in a MySQL database. It would either load everything into memory like RunUO, or do real time queries, not sure yet. Real time queries would be more ram efficient (allow for more items without being limited by ram) but require very fast disk i/o (like 2 raptors in raid 0). OR I could also make it load into memory but save in real time. Anytime a change is made it saves to DB in real time. That would be less intensive. These saves could be queued into a low priority thread to minimize resource impact. A shard restart would involve kicking everyone off, stopping any processes, and flushing the queue.

Either way, this means no world saves whatsoever. I can do [tile static on the entire map if I want to, and see very little performance hit once it's processed that massive batch of queries. The scalability would be insane.

There are lot of systems in RunUO that could use a total redesign and I have plans to do so, the work involved in fixing these is quite big.


So that's choice #1: to write from scratch. I have to consider all the little things too, like having to code the house system, that alone is rather big as far as packets go and such. I'd have to code every single item and monster, from scratch. There's a lot to do. Lot of it is easy but repetitive work though.


Now choice #2 is to simply recode parts of RunUO as planned. This way we at least don't loose all the work we've put into it. However some of the system redesigns required are still quite very large so it's hard to decide what will balance out more as being less work.

Like for example, stuff like recoding all the creatures, I can easily batch script it. Have a script read stratics, input all the stats, boom, all creatures done. Then go back and add the abilities which would be coded once, not hard coded like lot of the RunUO stuff.

Once I'm done my control panel I will have more experience with C++ and have designed lot of reusable base classes. So a big chunk of the core stuff will be done.

I'm thinking I could have a very basic AOS style server done in a few months. The rest would simply be coding systems to add SE, ML, and who knows, maybe SA. The codebase would be very clean and easy to work with. My goal would be making customization very easy, and make it easy to expand on systems. Like there are various artifact drop systems in UO, so why have different code for each one, when they can all be based on a single class with a few differences such as formula, drop locations, artifacts, monsters etc? So I'd code a base class. Lot of the stuff in RunUO is duplicated code.

I don't blame them though, thing is, RunUO was designed for pre AOS. That's when it was started, so when Gaunt came along they threw that in not knowing there would later be tots, then martys, etc... so it's not entirely "Bad coding" just that, we need something more modern.

But if I do go this route it will be all nice and shiny, but we lost over a year of work on RunUO. I look at huge systems like the bod quests and event system.

So what are your opinions on what would be better?

I can't really tell off the top of my head which choice would lead to faster updates and more content. I think coding from scratch would add a few extra months wait for new development, but from there it would speed up to add/fix stuff.

Archived topic from AOV, old topic ID:3740, old post ID:24097

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 9:35 pm
by ninja2007
double post lol

Archived topic from AOV, old topic ID:3740, old post ID:24098

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 9:37 pm
by ninja2007
I vote yes, cause im tried of the server running into runuo bugs and stuff liek that we would have this trouble if runuo was out of the question i understand that SOME of runuo coding will still be there but most of it will be from scratch expectally hopefully the crafting and so forth and we might not need the custom quest we might just get bods like bs and tailor for flecthing and tinkering it should be that hard

and manything that runuo is so off wack its not even funny

i hope you take a look at the stand point of a PLAYER <3

sincerely

- Tony Montana

edit:

I belive that you should start another server branch with just basic aos and start from there, cause it gives a fresh opp. to players and may attract players that just like aos, but its your decison

Archived topic from AOV, old topic ID:3740, old post ID:24099

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 10:00 pm
by Death
ninja2007 wrote:I vote yes, cause im tried of the server running into runuo bugs and stuff liek that we would have this trouble if runuo was out of the question i understand that SOME of runuo coding will still be there but most of it will be from scratch expectally hopefully the crafting and so forth and we might not need the custom quest we might just get bods like bs and tailor for flecthing and tinkering it should be that hard

and manything that runuo is so off wack its not even funny

i hope you take a look at the stand point of a PLAYER <3

sincerely

- Tony Montana

edit:

I belive that you should start another server branch with just basic aos and start from there, cause it gives a fresh opp. to players and may attract players that just like aos, but its your decison
Well if he was going to rewrite a new server chances are there would be a new branch to test the new core.

IMO, I think you're looking at way more work than you can handle Ryan. You already put enough work into the server for one coder (He does the work of like, 10). If you take on this project, it would be overkill unless you have a team of experienced C++ coders who are familiar with the how the original RUNUO system was set up.

You also have no guarantee that you would be able to pull it off. You have an idea, but have no idea if it would be a success or failure. I suggest a lot of interface/core planning before you proceed (Likely with a team of at least 3 devs). That way you would be able to tell if it's actually feasible to do.

A project of this magnitude is both time consuming and could become a chore.

Personally, I say not to reinvent the wheel with such a small development team. Make the current one better. If we had more time and resources (Devs, staff, council of testers) then I would recommend the C++ route.

Also, you have to realize that the fate of Ultima Online is unknown as EA could just discontinue the 2D client and force UOKR. There's no telling if they will or not (Heard a rumor that they are making SA dungeon 2D as well). My $0.02.

Archived topic from AOV, old topic ID:3740, old post ID:24100

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 10:56 pm
by Nexus Graveheart
Seer Death wrote:Also, you have to realize that the fate of Ultima Online is unknown as EA could just discontinue the 2D client and force UOKR. There's no telling if they will or not (Heard a rumor that they are making SA dungeon 2D as well). My $0.02.
This is off-topic but EA has said they won't discontinue the 2D client until the KR/SA client reaches 95% usage, which I think it unlikely.

But to get back on topic. I'm ignorant of a great many computer terms and procedures, but I understand that this would be a massive task. Couple that with keeping this shard running smoothing and non-bugged and your other projects, you'd have even less time to sleep.

My suggestion would be to work on unravelling certain RunUO systems as you come upon them, as opposed to starting from scratch for everything. That way, you can keep this shard updated and running smoothly as well as build up a solid base of reliable code to either use or look back on as a reference if and when you decide to build your own emulator.

Archived topic from AOV, old topic ID:3740, old post ID:24101

Tough decision - help me decide *poll*

Posted: Tue Oct 21, 2008 11:36 pm
by dprantl
I think I'm qualified to give some advice since I have experience in coding and software QA for 10 years now.

Coding a server from scratch:

- It would be a silly idea because you have already put 2 years into RunUO. You've basically rewritten most parts of it anyway, so IMO it would really be a waste to start over now.

- You seriously underestimate the amount of time and coding this will take. A couple of months for 1 - 2 people is very unrealistic. I would say AT LEAST 1 year before you could see even a partially working system where people can log in and do things. I see developers (even very experienced ones) quoting estimates for development times and then falling way short more than 50% of the time. A 3-tier application that you are talking about creating can be a very tricky thing to code right as well.

Continue modifying RunUO:

- You're already in the midst of doing this, so really I don't see a better option.

Switch to a distribution other than RunUO:

- Again, and waste all the work modifying RunUO? That would just be a waste of time and there would be problems with the other distribution too.

If you really want to undertake such a project, why not write your own UO client instead? There are many things that make the current 2D client shite. Just look at PlayUO, it had many features that were really great. It was also exploitable but that can easily be avoided by implementation.

Archived topic from AOV, old topic ID:3740, old post ID:24103

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 1:27 am
by solarsea
Take a look from c++'s bad side. You sure know those, but still:
* c++ is unmanaged. No automated resource collection. => leaks Will occur (& raii isn't a cure)
* c++ doesn't have any recovery. Once the app seg faults - it's gone
* erm, are there any good ORM libraries for c++ that you use to use with mysql ? (mysql is far, far away from enterprise stable, i'd recomment postgre or firebird) (@ work we support mssql, oracle, maxdb but that's another thing :>)
* The upper 2 and the lack of any app server things => no transaction => manual thread locking.
* no easy remote debugging
* list could go on ...

I'm strongly for managed code, either c# (support the current codebase) or java. but not c++ in any case imho.

2 cents from the point of a professional java developer :)

Archived topic from AOV, old topic ID:3740, old post ID:24104

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 2:23 am
by LordWolfX
I didnt really read much but the options lewl, but... SPHERE MAN SPHERE

i scripted sphere 51a/52b a CRAPLOAD, hosted shards of my scripts where: Blades of Blood, Elysium IV, Valhalla (the Conquering) and of course The Mark (BoM was a guild of mine, banners of the mark of rohan, taken from tolkien)

i did some 54a/i scripting as well but not as much, i wouldent mind getting back into that style.... and groove...

Tom tells me they are pretty closed to being the same as RunUO, but ive never touched RunUO (Tom = Arcaniss Baenre thats been on recently) I havent touched the script system at all for sphere since Gaunt ect ect was introduced and id love to see how it compairs in general on similar mind scripted platforms

Archived topic from AOV, old topic ID:3740, old post ID:24106

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 4:57 am
by Plastic Man
I will toss in my vote as sticking with RunUO. Yes its spagetti string code and is years of tangles from adding new systems (Quite frequently inadeptly or in non adaptive ways), but it IS a by and large working base.

And as others have said, you have put a lot of time into fixing RunUO/cleaning it up. To switch to either of the other options now would be a momumental waste of a lot of that work. I mean true you have the conceptuals down, but switching the code to a new language essentially starts you back off at ground zero.

And honestly, Altar and Death are right. I think you are drastically under-estimating the time it will take to start from scratch as well. I would not attempt what you are suggesting without a team of 3-5 experienced coders as a dev team. And I mean experienced not only in whatever language you choose but also in UO, as experience with the game (especially previous UO coding) will increase how fast they build alot of the systems.

With a team of 3-5 devs and a core of at least 5 testers (These testers could eventually take over some of the more user interface staff things like spawning and such) I would give it at least 6 months more likely a year before you would have a shard that could possibly opened up to the public.

So before you try to start coding, try to do a comprehensive conceptual outline and a project prioritization plan. Try to figure out how many coders it will take to meet whatever timeline you want to set and then try to frind a team to match that.

The main problem would be that since this would not be a paid project your team no matter who they are are all volunteers, this means they will only invest their spare time in the project for as long as it holds their interest. You will probably chew through testers and coders before completeion of such an ambitious project.

I am not saying it cannot be done. But if you decide to recode UO from scratch don't harbor any illusions. It will be a massive undertaking and getting it to a finished/releasable state will be a constant uphill battle.

Archived topic from AOV, old topic ID:3740, old post ID:24108

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 7:47 am
by Red Squirrel
solarsea wrote:Take a look from c++'s bad side. You sure know those, but still:
* c++ is unmanaged. No automated resource collection. => leaks Will occur (& raii isn't a cure)
* c++ doesn't have any recovery. Once the app seg faults - it's gone
* erm, are there any good ORM libraries for c++ that you use to use with mysql ? (mysql is far, far away from enterprise stable, i'd recomment postgre or firebird) (@ work we support mssql, oracle, maxdb but that's another thing :>)
* The upper 2 and the lack of any app server things => no transaction => manual thread locking.
* no easy remote debugging
* list could go on ...

I'm strongly for managed code, either c# (support the current codebase) or java. but not c++ in any case imho.

2 cents from the point of a professional java developer :)
I already coded some libraries that take care of most of those issues including proper crash logs (when in debug mode). Also -O3 optimization is retarded fast. C# is interpreted to some extent so is very slow compared to C++. The main issue with C# though is that we're locked to windows. But I will be looking into mono and testing under there see how things work out. Problem is emulation will add a layer of overhead, but then again so does virtualization (which we are using now).

Think I will end up sticking with the path of RunUO simply because of the work we've put in it already.

Archived topic from AOV, old topic ID:3740, old post ID:24109

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 11:45 am
by solarsea
Both C# and Java feature jit compilation, which should speed up things after the first run. (atleast it does so in java :D)

I'd recommend taking a look @ sunuo. Although it's based on runuo version 1, that guy successfully ported it to mono.

Archived topic from AOV, old topic ID:3740, old post ID:24112

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 12:35 pm
by Nosferatu
i voted aye lol

Archived topic from AOV, old topic ID:3740, old post ID:24113

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 1:47 pm
by LordWolfX
just think, you could haz a www.redsquirrel.com which has a better working EMU than anything online atm XD

would take afew years...

i think "hand of god" is allready taken though hehe

Archived topic from AOV, old topic ID:3740, old post ID:24114

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 2:10 pm
by Red Squirrel
Actually one thing I forgot to mention too is there's lot of obscure bugs in Runuo such as the items vanishing one and the random lag spikes. Going custom would eliminate those issues. The item vanishing bug is probably the hardest one as it happens on all Runuo shards and nobody has yet figured out what the cause is, or how to even reproduce it.

Also a reminder of our rule we do not replace such lost items as it is too hard to track the legitimacy of the situation.

Archived topic from AOV, old topic ID:3740, old post ID:24115

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 2:11 pm
by Red Squirrel
LordWolfX wrote:just think, you could haz a www.redsquirrel.com which has a better working EMU than anything online atm XD

would take afew years...

i think "hand of god" is allready taken though hehe
Haha not sure what I'd call it. Think I'd call it PowerUO or something.

Archived topic from AOV, old topic ID:3740, old post ID:24116

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 6:16 pm
by Death
Red Squirrel wrote:Actually one thing I forgot to mention too is there's lot of obscure bugs in Runuo such as the items vanishing one and the random lag spikes. Going custom would eliminate those issues. The item vanishing bug is probably the hardest one as it happens on all Runuo shards and nobody has yet figured out what the cause is, or how to even reproduce it.

Also a reminder of our rule we do not replace such lost items as it is too hard to track the legitimacy of the situation.
I doubt that has anything to do with the actual language and is due to poor coding logic. It's true that if you go c++ you will probably fix that bug as it's your own code and you've built familiarity on it. However, in the process, you'll introduce 50 more bugs as it's a new system so I say build on what we currently have.

There's no reason we cannot build a tracking system where events and exceptions are tossed into a database table. That way we could track serials and other values to find bugs.

Archived topic from AOV, old topic ID:3740, old post ID:24117

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 6:54 pm
by Red Squirrel
Yeah that's true too, once I convert to SQL I can add more tracking info on items.

Archived topic from AOV, old topic ID:3740, old post ID:24118

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 8:03 pm
by Death
Red Squirrel wrote:Yeah that's true too, once I convert to SQL I can add more tracking info on items.
IMO that's the largest flaw with the current runuo system. Without a tracking list then it's harder to tell what's going on. They do make use of exception handling but not everything can be caught in a descriptive manner (Unless you make custom validators but better to send it off to an SQL error table instead of log files IMO).

Archived topic from AOV, old topic ID:3740, old post ID:24123

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 8:19 pm
by Red Squirrel
Think what I'll do for SQL is have a new thread dedicated to writing SQL, everything will be queued up to it (kinda like the idea I had with how my own system would work). If I do it real time it may delay stuff as that's TONS of SQL writes per second. But if I queue them all to a thread, should be ok. Just need to ensure it wont backlog. Like if it just builds up we have problems, but think we'll be fine. Idea is to keep a consecutive SQL connection open and not open/close for each query.

Archived topic from AOV, old topic ID:3740, old post ID:24132

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 9:07 pm
by dprantl
I think if you code a server, you should code it in Java :). Once the JVM is loaded, JIT code on v1.6 is mostly 95% as fast as C++. And once you start coding in Java, you never want to code in C++ EVER AGAIN. Oh, and you won't have to worry about porting or emulation because it will run on any platform by default. On top of that, accessing a SQL database and many other packet-related routines are super easy to write because there are so many libraries with so much stuff already written and optimized to choose from. For example, I can create a HTTP connection and send stuff to a server in like 3 lines of code. Oh, and then there's the ease in writing multi-threaded code. It goes on and on.

Archived topic from AOV, old topic ID:3740, old post ID:24138

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 9:11 pm
by Death
dprantl wrote:I think if you code a server, you should code it in Java :). Once the JVM is loaded, JIT code on v1.6 is mostly 95% as fast as C++. And once you start coding in Java, you never want to code in C++ EVER AGAIN. Oh, and you won't have to worry about porting or emulation because it will run on any platform by default. On top of that, accessing a SQL database and many other packet-related routines are super easy to write because there are so many libraries with so much stuff already written and optimized to choose from. For example, I can create a HTTP connection and send stuff to a server in like 3 lines of code.
Was steering towards java because of the multi-platforming advantage and javadocs for easy developer documentation. Also, the fact that Sun now owns MySql that's even better.

Archived topic from AOV, old topic ID:3740, old post ID:24139

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 9:33 pm
by Red Squirrel
Actually I've considered java as well, something good to learn as yeah they have increased its speed quite a lot and it's portable out of the box. C++ you need to invent the wheel before you get started but you also get more control over stuff through the use of pointers and what not. But you also have more responsibility, so its a double edged sword.

Archived topic from AOV, old topic ID:3740, old post ID:24140

Tough decision - help me decide *poll*

Posted: Wed Oct 22, 2008 11:02 pm
by Anonymous
id say stick with what you got and recode what needs recoded

Archived topic from AOV, old topic ID:3740, old post ID:24141

Tough decision - help me decide *poll*

Posted: Sat Oct 25, 2008 3:25 am
by solarsea
Also, pure sql is evil. And leads to hard-to-support code.

The JPA (java persistence api) provides a neat way to work with objects and dbs. Hibernate - too (hibernate implements jpa too :D)

Archived topic from AOV, old topic ID:3740, old post ID:24172

Tough decision - help me decide *poll*

Posted: Sun Oct 26, 2008 4:05 pm
by Gaiava Arkkaza
RunUO is a mess. But it's a mess you are used to. A new system would be a completely new mess that you wouldn't know alot about. I'd say stick with RunUO and recode the systems needing rescripting.

Archived topic from AOV, old topic ID:3740, old post ID:24203