H&D2 Server Manager Source Code

2 years 11 months ago - 2 years 11 months ago #25 by snowman
Replied by snowman on topic H&D2 Server Manager Source Code
What I suggested is nothing necessary right now. The Server Manager fixes and the mapdownloader are much more important.

Server and configs duplicate buttons would be to simply copy paste function of the selected server/config, after the selected one. Of course, the duplicate server would also contain the configs, and later ports can be edited manually. For duplicating configs, names and other settings can be changed manually.  

 



For the configs settings it would be nice to be able to save the 4 types the game provides in a config file and to be able to load your saved "template" from that file when you need it... unless you chose to duplicate it. Thinking about it, this might be the one I would chose, instead of the "Duplicate" button feature presented above. 



About installing the maps on the server, I don't really know what's the best way. I thought that after you downloaded the new mission to the server, you can login with the server manager and install it:

1. The Server Manager would also edit the mpmaplist - this is probably not a good idea since there should be some standards mission makers must implement so the server manager can identify the mission type: coop, dm, etc...
2. Copy all the files needed in the necessary folders - providing the archive has been implemented "correctly". Maybe everything can be packaged in .dta format, like a similar discussion that was either here or on Discord (I forget)

Again, these are not necessary right now!

"Straight and narrow is the path."
Attachments:
The following user(s) said Thank You: Maletzki

Please Log in or Create an account to join the conversation.

2 years 11 months ago #26 by MeToX
Replied by MeToX on topic H&D2 Server Manager Source Code
Thank you snow, your screenshots and further explanations were very helpful.

Alright, for some reason I can't even start the server manager V2.9, so my only reference is this thread and the standard ServerLauncher from illlusion softworks.

So there are only 2 possibilities:
a) Someone fixes the issues in the current V2.9 written in PASCAL and adds the features you required
b) The whole thing will be rewritten, preferable in C++, using the Win32 API and calls it V3.0

Well, I would assume option a) is faster since most of the code is already available but I can not tell what that bug is about that it can only read a maximum file size of the mpmaplist, but I would assume that it has something to do with the filestream buffer being too small and the overflow is just not being handled. Atleast I doubt that the limit you experienced was coded in on purpose, but again I don't know PASCAL and its features/issues.

Although the serverLauncher.exe is not too complex (unlike the HD2DS.exe) Option b) would take, multiple months, unless someone has no life, or if it is a small team where people can splt between frontend and backend development.
Of course it would also be a lot faster if the tool has no graphical user interface, which means it is a console application where you do everything via commands.
This is usually not very user friendly because it is less intuitive, but it accelerates the development because the frontend is obviously very barebones.

Right now I don't have the time for that but atleast I want to give some directions and ideas. Maybe I come back later to this thread and review the reference.
So, the good thing about making our own tool would be that we could easily combine that with my idea about the mission downloader thingy, which you hopefully saw in the other thread. Just imagine an application where you can either join the server directly, or host it with all the features you wanted and if you join the server, it would download the map and all that jazz.
I guess that would be the best solution, because we can solve 2 problems at once but it is worth mentioning that this would be a massive program, which is very error prone and rely a lot on the win32 API. I mention that because I am not sure how WINE handles that, but I still would use the Win32 API because the ServerManager needs to start and handle Win32 Applications (like the game to join a server, or the HD2DS.exe).

I would estimate the development of an application like that for about 1 year, depending how much time the programmer(s) would spend for this project and how fleshed out it will be in the end (nobody should release a buggy mess).
Also it should be the goal that the community will not splitten in half with that. That means that clients, who dont use the application can still join servers who were started with the application and also that modified clients can join a non modificated server. This is totally possible with my solution I mentioned in the map downloader thread, since it won't modify any of the original files, it is just additions.

Now, what would you need for your toolbox to realize this project? (option b)
- very good understand of C++, however you don't need to know the newest C++ 20 or something, I can not think of a feature from the latest version you would need to realize this project, I think you could even write it in C but do yourself a favour and don't

- Win32 experience: You need to know how to draw windows and its widgets like buttons etc. you need to know how the command system works, how the windows gets redrawn/updated and how they respond to user input. Alternativly you can use wxWidgets or Qt but that creates quiet a big of overhead.

- Net coding: This is only necessary if you want to include the automated mission upload and the automated mission download for the clients. Bascially you need to program an independend standalone server, which runs parallel to the HD2 server. The other server will just handle the requests for the files being downloaded/uploaded. The host and the clients need to create their sockets based on a different port, server needs to listen to the clients and give the files they require to start the mission. Similar to the server host who wants to upload new mission files. Don't forget to close the sockets once the application terminates. Since it is Win32 API anyway, you could just use WinSock.
The following user(s) said Thank You: snowman, Stern

Please Log in or Create an account to join the conversation.

2 years 11 months ago - 2 years 11 months ago #27 by Stern
Replied by Stern on topic H&D2 Server Manager Source Code
Option 1:
To compile SM2.9 source it needs new Server/Client objects,,  the ones used are obsolete and they no longer exist in up-to-date Delphi.
I was able to compile both if i disabled all connection related functions, but this doesnt get anywhere...
Delphi has Indy components (should be way to go for this kind of needs) but none of them are replaceabel 1:1 with the old ones used in SM2.9, this means re-work all connection stuff and since it creates new thread for every Client connection its not easy to fit it with new ones.

Overall attention should be consentrated to Map downloader since problems with ServerManager2.9 are not fatal errors, just some small bugs and you can live with them.
mamaplist reading bug seems to be connection bug, not data limit for reading, all Streams in Delphi can handle large amount of data and i dont see any limit set in code.

***One more bug i have seen in servers: Sometimes additional lower case 'a' appears at end of server message.

 

The one who hesitates is lost !
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

2 years 11 months ago - 2 years 11 months ago #28 by snowman
Replied by snowman on topic H&D2 Server Manager Source Code
Yes, I agree with everything that you guys said. It's not an immediate problem right now, just that I can't install the VTM mod and host events with it.

The Engineering office I imagined specifically to this scope, not just mission related work. Over there we can create work groups on different topics. This topic could be one and the map downloader could be another. There are also guys interested in animations and working on adding items, characters and weapons to the game once this is possible. Results and updates can be posted to public in this Modding section for reviews, testing and feedback. The office is a hidden section, not visible to the casual user, so guys like you can turn it into everything that suits your needs, even if sometimes it can get a bit greasy.

Option A(1) for the short term and Option B(2) with C++ would be for the long term. Someone might be interested in option B.

I can give you guys access to our remote for necessary testing or to have a better look

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

2 years 11 months ago - 2 years 11 months ago #29 by snowman
Replied by snowman on topic H&D2 Server Manager Source Code

***One more bug i have seen in servers: Sometimes additional lower case 'a' appears at end of server message.

 
Yes, I've noticed this in the consoles myself... for years. It's somewhat dependent on the connection. When we have severe problems like getting bugged all the time, seeing "Connection Problems..." error or not able to join the servers as usual... well, that's when these kind of 'a's are even more often. When the connection is neat, this never happens. BetterYouThanMe might be able to ask Contabo, our host, why this happens. The 'a' simply comes from the asay command that is run in the console. Yes, when you see that 'a', this means the next console command does not work. As mentioned before, when the connection problem or whatever it is that makes the remote very slow, when enough of these console commands are incorrect, it's when you have to restart the specific H&D2 server until it works fine.

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

2 years 11 months ago #30 by Stern
Replied by Stern on topic H&D2 Server Manager Source Code
I found Delphi_5,
After some struggle it works on Win7.
Adding some missing files to Client project, and it can compile it.
Borat would say: Great success !

Server has a error with Icon component, it minimizes application to TryIcon but this has some errors.
If this is eliminated then it will have no pop-up menu where you can: start/stop service/show/hide consoles and exit.

Fresh version of Client can work with original Server.
I changed title to 2.9.1 to indicate next version.

 
 

The one who hesitates is lost !
Attachments:
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

  • Lukasz birthday is in 4 days (41)
Powered by Kunena Forum