The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sphere language and requirements
Author Message
Monty
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jun 2012
Reputation: 1



Post: #1
Sphere language and requirements
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.

C# application developer.
C/C++,SQL,PLSQL programming.
Oracle database / information system developer.
Cooperation for development of new shard.
(This post was last modified: 11-30-2013 11:12 PM by Monty.)
11-30-2013 11:10 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Sphere language and requirements
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.
12-01-2013 12:39 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #3
RE: Sphere language and requirements
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

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
12-01-2013 01:22 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #4
RE: Sphere language and requirements
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.
(This post was last modified: 12-01-2013 01:39 PM by Khaos.)
12-01-2013 01:37 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Khaos's post
Monty
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jun 2012
Reputation: 1



Post: #5
RE: Sphere language and requirements
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.

C# application developer.
C/C++,SQL,PLSQL programming.
Oracle database / information system developer.
Cooperation for development of new shard.
12-06-2013 08:33 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Monty's post
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)