简体   繁体   中英

How to get Local Application to Poll Game Data from Browser-based Game Web Server

thank for looking into my question.

Fist let me state that my experience with any sort of web development is extremely limited. My forte is embedded systems and nothing to do with their web interfaces. Also, I'm not looking for anyone to do the work for me. If someone can tell me "yes this can be done, and this is the general direction and approach that you would" use I'd be happy to learn the rest on my own.

What I am interested in doing is taking data from the web server of a browser-based game and doing some local analysis of it. For instance games like Lord of Ultima or Ikariam allow you to play from your browser, obviously the controls and interface are updated from the server hosting the game. I have experimented some with greasemonkey java scripts and have seen scripts that read data from these games and modify the UI; however, the nature of these scripts does not allow me to get the data to my local machine for analysis. I would prefer to write my application in C#, but I'm open to other options if no .NET solution is practical. Is there a way to do this? The idea is for me to be able to log into the game and leave my browser open while my application polls for data (like resource counts or attacks etc...) or something. Or maybe I'm missing something, where a script can write to the local machine. If you need more information please let me know.

Thanks again for your time!

Most game engines strive to keep their data out of the hands of people outside of the server. Yes there are requestors in the client that retrieve information and display on the UI, but that is always isolated information based on the client state.

The reason for this restriction is that if someone accesses the data, such as your proposal, then it also opens the door to either hacking accounts or cheating. After all if you can pull in your data, you can manipulate it and make your character unbeatable. This throws off the delicate game balance. And even if you say 'but I never intended to do that' it doesn't open the door to you getting at the data. It is just too great a risk for the developer.

Now while a program can "play" the game if a human can, that is indeed true. In the gaming world these are called bots. The bot puts a player at an unfair advantage over other legal players since it just sits and waits until it can make a move while the player may have a large window between moves. Most gaming websites ban bots for this reason. Computer play in the place of a human is still cheating.

UPDATE:

Now that I've said that here is a website that may give you some practice in doing what you want to do as it is written specifically for getting data from a website and manipulating it: hacker.org

If I understand this right, you want to programatically control a web browser. As far as I know, SeleniumRC is the tool-of-choice for this.

I understand it is far more powerful than its lightweight companion Selenium IDE , and with just that, you can script interactions with a website without having to understand a great deal about its implementation. Eg you can locate and click a button based on its text content and not its element ID or location within the document.

--

If you want to just sniff the game's HTTP traffic, then a browser-based HTTP sniffer (like Firefox's live HTTP headers) will do it even if it's SSL (if you use a proxy and the traffic is SSL, I suspect the game server will be able to detect it).

I predict it would be more difficult to understand the HTTP traffic than to use Selenium to scrape the data you require directly from the UI.

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