SphereCommunity
Sphere language and requirements - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: General Discussion (/Forum-General-Discussion)
+--- Forum: UO/Sphere Discussion (/Forum-UO-Sphere-Discussion)
+--- Thread: Sphere language and requirements (/Thread-Sphere-language-and-requirements)



Sphere language and requirements - Monty - 11-30-2013 11:10 PM

Hi I have a question which language is use for Spheresvr. I mean source code. I guess it is C++. Is it true?

A second question concerns the first. If sphere is written in C++ how is possible spheresrv is more hardware request than RunUO written in C#. When C# is the worst choice for server applications. It is possible that Sphere is written wrong or use old methods? For example why spheresrv using for store variables mostly string (vars,tags,locals and more) I was always taught that the string is the more demanding on CPU processing than double or int.

This questions are not hate.(I love sphere.) Just interest me.
Sorry for my english.


RE: Sphere language and requirements - XuN - 12-01-2013 12:39 AM

Just think that Sphere is a very old emulator worked in closed source for over years, so much people passed over it and there is outdated code that would take sooooooooooooooooo long to get it up-to-date and optmitizated.


RE: Sphere language and requirements - Feeh - 12-01-2013 01:22 AM

Also remember that sphere use scripts, some of the processor usage is taken to interpret them; scripts are naturally slower, even with C++ core. As XuN said, code optimization helps getting things faster and less hardware consuming.
And since I started working with sphere, I always defended the source opening, I think the development would walk a lot faster, since there would be a lot more coders working in every part of the code, and the devs should only merge the optimization or not, just like RunUO did since the source opening; the saddest part of it all is that when the 'Sphere' decide to stop the development, we will be in blinds; but it is not up to me this decision

RunUO is a "semi-compiled" or something like that, I don't know how C# works, but I think it runs near hardware level, just after the JIT compiler. I do not really know how things get done in C# (never had the curiosity to go deeper), but you can search if you want. C# provide a easy-to-learn environment with a high degree of liberty (C/C++ still bigger) and pre-coded classes that help a lot the development process

I've working with C#(mostly on RunUO and UO-related projects) and C/C++(self made projects) for about 10 years. If you're wondering, both Sphere and RunUO have its pros/cons, and this can led to a long discussion hehe


RE: Sphere language and requirements - Khaos - 12-01-2013 01:37 PM

If we stopped developing the source would most likely go open. But I don't see it being stopped. Open Source is always an option we look at on the table. Don't think it doesn't get re-discussed from time to time.

As for string usage; of course they can be more intense; but without spheres tag/local/vars you wouldn't have the customization you do have. Feeh is right; the most intense part is interpreting the scripts. That is the biggest resource hog honestly.

Yes, the code is outdated and would probably take a bigger team to redo the internals and make sure everything was working right. The worst part about the structure being outdated is hunting things down to fix or add. That is the biggest pain. The variables I added will be getting optimized for BOOL, VAL, and some as STRING. That is about it on that end.

Feeh is also right about C# it does have a ton of predefined classes. These things we generally have to define. The code is smoother than you think.

RunUO also is very generic and lacks the power we provide with the customization we offer with the internal triggers, custom code handling with our own script language (Which is not too off from the core in most cases). C++ is always a bigger project and demands a bit more with coding; but in my opinion it is way more powerful with control over defining your own classes and creating the functionality we do.

Community members used to tell people to go to RunUO for an AoS style server. That needs to stop though. I have recently been releasing AoS+ code in the script downloads sections. Which I optimize from time to time to quit losing those users.

Being a dev is more than the hard code. At least for me. I do community relations with you all, base scripts, hard code, then I work on community scripts to keep people interested.

I would love to spend a lot more time in the hard code lately. Reality is the community is damaged and dwindling. We get about 67 views a day average. This is bad to me. I figure if I bring enough out. Get the internals up to par with at least High Seas I can get to work on Enhanced Client. People don't realize how much is on our plates sometimes. Ben is trying to make saves faster by playing with different SQL versions (SQLLite currently is being tested) and working with code to possibly parse saves. Problem with parsing a MySQL save right now; it is super intense on the server. I thought about possibly trying to add more SQL handlers... but that again is another huge project (I am professional a web DEVELOPER (I don't care for pretty like a designer, I prefer functional; as I do in scripting and programming).

XuN was searching through some archives and asked me about something with it. The more I look at this outdated code we dug up... it might be the old POLLSERVER and REGISTERSERVER code. I am going to start playing with it soon and see what I can do with that and see if it is what I think it is. This would help the community some. Issue is; I have a ton on my plate already. So I am trying to get to everything one thing at a time.


RE: Sphere language and requirements - Monty - 12-06-2013 08:33 AM

WOW I got more than I expected. Thank you all for your answers. In particular, I would like to thank Khaos for the his post.