Concurrent Web Game

I have seen many games based on web browsers with players playing simultaneously. Usually after waiting for a while you can join the room where everyone is playing, or you can play against another player. All these games use Flash.

How do they achieve this? Would it be very difficult to communicate without Flash?

Is there any toolkit (rails, etc.) or a plugin that provides this feature? Or is it just a matter of storing sessions and mixing them?

Just quick editing: I'm not interested in Flash or Silverlight solutions.

+3
source share
5 answers

JavaScript-only. AJAX . (. AJAX - JavaScript .)

AJAX, Long Polling, COMET -. - AJAX. , ( setInterval), n miliseconds.

+3
+1

, ? ?

flash silverlight ( , , ), javascript ajax .

, ajax, , , , script " " , , . , , (~ 30 ). , .

fastCGI (, , ), . , . , , , , .

. ( , PHP- . , . 20 , 100 ms. , 10 , "" ). , , javascript, PHP script. PHP unix ++. , , .

, - . Epoll linux IOCP , . 100 #, 5% .

+1

Java applets can interact with JavaScript (for example, you want your user interface to have HTML and CSS). Therefore, theoretically, you can implement your network code in a signed Java applet. In this case, you will not be limited to a simple client-server model.

0
source

Source: https://habr.com/ru/post/1729121/


All Articles