1

I would like to develop a 2d top down soccer simulation for the browser, using modern web technologies and without the need of additional plugins like flash or silverlight (or as a fallback only) to make it available for mobile devices as well. The presentation in the browser shall be a view only, so no user interaction is needed. The match is completely calculated by the ai depending on defined player skills like speed, passing, shooting and so on.

Now, I am not sure about which technologies to use. I am an experienced php developer with solid skills in javascript. So my first idea was to develop the ai in php and sending updates to a javascript client using canvas. The problem here is lag this would cause with ajax calls. Then I thought about using websockets with a flash fallback, but I am not sure how to let the php script communicate with the clients via websockets (phpwebsocket - http://code.google.com/p/phpwebsocket/ ? or pywebsocket http://code.google.com/p/pywebsocket/ ?) My current idea is to implement the logic completely in javascript for node.js to be able to share some of the moving logic to reduce bandwidth. Disadvantage for me here are my javascript skills, but node.js seems to be the perfect platform for my needs..

Do I miss any technologie that would fit perfectly for my needs? Which approach is better: Coding the logic in php and use javascript only for the presentation or do the whole code in javascript?

Any help is very appreciated!

Daniel Mecke
  • 984
  • 10
  • 19

1 Answers1

0

I would recommend using socket.io . It's easy to use with node.js on the server side, but if you want to use PHP, there are several people doing it.

Community
  • 1
  • 1
miguel_ibero
  • 1,024
  • 7
  • 9