A Real-Time Programming Battle Web Application by Using WebRTC

  • Ryoya FukutaniEmail author
  • Shusuke Okamoto
  • Shinji Sakamoto
  • Masaki Kohana
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 1036)


We are developing a web system for learning Python programming. The multiple users can join the system simultaneously through programming battles. This system consists of two parts which are web browsers and a web server. The browser side program written in JavaScript uses an idea from Robocode, which is a open sourced programming learning tool. A user of Robocode plays a battle by writing robot programs in Java. On the other hand, the user of our system writes a program in Python, and the program is converted to a JavaScript of robot program. The conversion is done on the web sever as soon as the user changes his or her code in real-time. In our previous work, we used WebSocket to implement a client-server model that is one-on-one fight. However, since the CPU usage ratio of both browsers and server were high, it was difficult to increase the number of players. Therefore, in this implementation, we use WebRTC to build an application on communicating among browsers that supports more than two players efficiently. We will compare CPU usage ratio on WebSocket model over WebRTC model. Moreover, we will consider which method is suitable for our system.


  1. 1.
    Robocode. Accessed 9 May 2019
  2. 2.
    Shichel, Y., Ziserman, E,. Sipper, M.: GP-Robocode: using genetic programming to evolve Robocode players. In: Proceedings of the 8th European Conference on Genetic Programming (EuroGP 2005), pp. 143–154 (2005). Scholar
  3. 3.
    LiveScript (JavaScript) implementation of Robocode. Accessed 9 July 2018
  4. 4.
    Kohana, M., Okamoto, S.: A data sharing method using WebRTC for Web-based virtual world. In: Proceedings of the 6th International Conference on Emerging Internet, Data and Web Technologies (EIDWT 2018), pp. 880–888 (2018)CrossRefGoogle Scholar
  5. 5.
    CodeComba. Accessed 9 May 2019
  6. 6.
    WebRTC. Accessed 9 May 2019
  7. 7.
  8. 8.
    WebSocket. Accessed 23 July 2018
  9. 9.
    Transcrypt. Accessed 16 May 2019

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Ryoya Fukutani
    • 1
    Email author
  • Shusuke Okamoto
    • 1
  • Shinji Sakamoto
    • 1
  • Masaki Kohana
    • 2
  1. 1.Seikei UniversityTokyoJapan
  2. 2.Chuo UniversityTokyoJapan

Personalised recommendations