Techmo Posted July 17, 2018 Share Posted July 17, 2018 I thought I would just let you guys know what I've been working on for a while. This is just something for me to pass the time. I've been working on a universal translator for the server. It might not appear to be very useful, but is intended to allow those who don't speak fluent English to participate seamlessly with the rest of the server. At the moment, the back end language server is complete, and the client-side lua for GMod is all that's left. With the way I have it set up, you will be able to select your 'native' language in the options menu. Anything in chat not in your native language (either by looking at the native language settings of the sender, or by detecting the language using my language server) will be automatically translated. To you, you will appear to have spoken in your native language, but to everyone else, you will be speaking theirs. A small icon in chat will notify players that the message is a translation. This translation feature can easily be disabled in the options menu. The system is written to not involve the game server itself, except for when a player joins (their language information will be send to the language server). In fact, if a database is used instead of local client stored data, the game server would have no involvement at all, as the language server would be able to read directly from the database. The translation is a negotiation directly between the client, and the language server. The language server is relatively simple itself, and should easily handle the chat during a heated debate. The language server will add around 100 milliseconds to the time it takes a message to appear in chat, but only if the receiver of the chat message uses a different language, and has the translator enabled. This delay will only effect individual clients, and will not effect server performance. The translation events will also be non-blocking as to not effect the client frame rate. I should have a working demonstration within a week, assuming I have the time to work on it. Just wanted to get your thoughts and opinions, and see if you think anything else would be useful to add. 8 Quote Link to comment Share on other sites More sharing options...
Techmo Posted August 4, 2018 Author Share Posted August 4, 2018 (edited) Just a quick update: I've been working hard on the translator to make sure it works correctly, and isn't ghetto. The translator is not on the server yet, and is still under heavy development. I just wanted to let you know it is being worked on. Some things i've added: Translation Server: - Can handle multiple game servers at once. It assigns a new uuid to each server each time it starts, or the map changes. - Player translations are now made all at once by the translation server, and requests for translations are answered with a pre-made translation for that player's language. - The translation server keeps a small stack of translation sets (lists of translations and their languages), this allows slower computers to request translations for chat messages that are no longer the most recent message. - The translation server requires the client to know the server's uuid in order to perform translations, this ensures only connected clients can use the translator. - The translation server keeps a record of all steam ids connected to a game server, and verify's a clients steam id before a translation to ensure they are connected to the server they say they are. - The translation server now has a config file which allows settings to be easily changed. - The translation server now allows for the automatic detection, and censoring of profanity in any supported language. Profanity can also just be marked, and dealt with by the client. Game Server (The game server doesn't do much): - Generates a default config file if none exists. - Sends necessary information such as it's uuid and the translation server url to the clients. - Able to completely disable translation on the server if a problem is detected, or someone thinks it's funny. Clients: - Obtains a list of supported languages every time the player join's a server. This list is not dependent on the game server, but the api the translation server uses. - Added a menu that players can use to select their native language, opens with f9. - Added an option to disable the translator and use the default chat. Edited August 4, 2018 by Techmo 1 Quote Link to comment Share on other sites More sharing options...
Techmo Posted August 25, 2018 Author Share Posted August 25, 2018 (edited) Another update: The translator is almost complete. To decrease the possibility of problems with the network, and also not be charged $15,000 per month by azure or google, the translator has had a few major changes. Clients: - Made the translator completely client side. All translation requests are made by the client without the use of a translation server. - I found the web server that chrome uses for it's translations, and it didn't have a password on it, so the translator uses that now to bypass the fee for google translations. - Players in chat now have an icon next to their name to indicate that what you see is a translation, and what language it was translated from. I will be releasing the final version of the translator on workshop, feel free to play around with it. It will not do anything in single player, and needs to be running on a dedicated gmod server to be functional. Edited August 25, 2018 by Techmo 1 Quote Link to comment Share on other sites More sharing options...
Techmo Posted August 25, 2018 Author Share Posted August 25, 2018 Heres the workshop link if anyone wants to use it, extract the source code, or whatever. https://steamcommunity.com/sharedfiles/filedetails/?id=1488350920 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.