Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've found some HTML/Canvas/Javascript browser based games that I don't particularly enjoy playing, but which I think would be fun to write robots for. Are there any tools out there which help remove some of the tedium of the work, and get me closer to writing the actual AI portion of the code?

share|improve this question
1  
Just to keep things on the up and up, 99% of web games prohibit this in their terms of service. Please do not construe any advice here as encouragement to violate the terms of any game. –  coderanger Oct 14 '10 at 23:51
    
I could see applications of this outside of game playing, too - for example, for building automated tests for a given website. –  blueberryfields Oct 14 '10 at 23:52
    
Sellenium is a javascript based testing framework/server which records actions of a user and can replay them on the server for testing seleniumhq.org –  David Young Oct 15 '10 at 0:32
    
Sure, there is no shortage of legitimate applications for these technologies. Some web games even allow or directly sanction these kinds of things. Just want to make sure SO legal doesn't come after us. –  coderanger Oct 15 '10 at 8:07

2 Answers 2

up vote 1 down vote accepted

So it looks like what the author of the question wants is basically to hack server calls of web based games?

If that's the case I'm adding another answer which is very different from my first answer

Fiddler

Fiddler is a web debugging proxy. It will let you setup a proxy between you(the client) and the server.
The proxy has a ton of configurations will will let you save sessions, replay sessions, pause AJAX requests and edit them on the fly.

It can log all AJAX requests so you could build a HTTP robot which could simulate playing the game.

Fiddler was originally created by a PM at Microsoft for debugging websites, and web interactions of applications.

share|improve this answer

Why bother writing the boring interface code and use AI Api's directly? Program the AI not the interaction with the game itself.

Starcraft 1

The very popular BroodWars API allows for commanding all the units to do anything a real player could. You can even battle against other players or AI's with your AI

http://code.google.com/p/bwapi/

Super Mario

This API allows for you to control Mario! It was a contest for the best level generation and fastest level completion AI. (A* actually won)

http://www.marioai.org/

Galcon

There is currently a contest for the best Galcon AI, a Google AI Challenge. Of course Galcon API is provided.

http://ai-contest.com/

share|improve this answer
    
Some of the games I'm interested in aren't providing fully fleshed out, (or fully documented) APIs. I guess what I'm really looking for are tools which can scrape the client source for server calls and provide me with info about what is available for me to use. –  blueberryfields Oct 14 '10 at 22:40
    
I've had friends interact with simpler games directly, using the Java Robot class download.oracle.com/javase/6/docs/api/java/awt/Robot.html which lets you do system calls to click, or manipulate the keyboard. –  David Young Oct 14 '10 at 22:43
1  
Slightly besides the point of the question but interesting links. Tnx. –  Eugen Constantin Dinca Oct 14 '10 at 23:21
    
Wasn't sure exactly what the author was asking for. If it's to program AI for games that already exist. This is a start. If it's to hack games to make robots, that's a very different question. –  David Young Oct 15 '10 at 0:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.