Skip to main content

A Real-Time Programming Battle Web Application by Using WebRTC

  • Conference paper
  • First Online:
Advances in Networked-based Information Systems (NBiS - 2019 2019)

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 1036))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Robocode. http://robocode.sourceforge.net/. Accessed 9 May 2019

  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). https://doi.org/10.1007/978-3-540-31989-4_13

    Google Scholar 

  3. LiveScript (JavaScript) implementation of Robocode. https://github.com/youchenlee/robocode-js/. Accessed 9 July 2018

  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)

    Chapter  Google Scholar 

  5. CodeComba. https://codecombat.com/. Accessed 9 May 2019

  6. WebRTC. https://webrtc.org/. Accessed 9 May 2019

  7. Web Worker. https://html.spec.whatwg.org/multipage/workers.html#worker. Accessed 23 July 2018

  8. WebSocket. https://tools.ietf.org/html/rfc6455. Accessed 23 July 2018

  9. Transcrypt. https://github.com/JdeH/Transcrypt. Accessed 16 May 2019

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ryoya Fukutani .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fukutani, R., Okamoto, S., Sakamoto, S., Kohana, M. (2020). A Real-Time Programming Battle Web Application by Using WebRTC. In: Barolli, L., Nishino, H., Enokido, T., Takizawa, M. (eds) Advances in Networked-based Information Systems. NBiS - 2019 2019. Advances in Intelligent Systems and Computing, vol 1036. Springer, Cham. https://doi.org/10.1007/978-3-030-29029-0_73

Download citation

Publish with us

Policies and ethics