简体   繁体   中英

server-side AI for web application

sorry if this question sounds kinda weird, but I haven't managed to get a satisfying answer yet.

The thing is, I am making( or willing to make ) a web-browser based game where people have their own company, trade, build etc.. And the game will also include bots. Because there will be quite a lot happening, it would be good for the bots to run at all times and react to various situations.

But.. I don't know how to make it happen server-side. Is there a way to make a script run on a server (like VPS)? Or is there a way to make some kind of application that would run on the server and communicate with the database and send answers?

Thank you :)

Of course there is a way to do this server-side - you "just" have to create a server, using any language/framework/platform that enables you to create a proper server application (this could be C++, Java, you could even stay in the JavaScript realm by using Node.js).

You would have to provide some kind of communication channel between web clients and your server. For that, you could use either Websockets (TCP) or WebRTC (UDP), simple AJAX could be an option too, but I wouldn't recommend it for persistent communication channel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM