--------------------------------------------------------------------------------
StarCraft, Warcraft, civilization... These are well-known names of PC game players. It can be said that strategic games represented by these games are typical representatives of PC games, and strategic game players are also the most loyal players of many PC game types. Strategic games are divided into two categories: turn-based and real-time strategy. Both of them have a large number of players, and the latter has gradually overwhelmed the turn-based strategic game due to intense gameplay. In recent years, has been dominant in strategic games.
The topic of "developing online instant strategy games on the J2's platform" is no different from that of most of today's J2's developers. The instant strategy game name "instant" determines complex computing and data interaction, stable and fast network connection requirements, massive resources, and drawing tasks, we all know that the resources and performance of the j2_equipment are extremely limited, and the current GPRS network industry is not satisfactory ...... These seem to have become insurmountable difficulties in developing online real-time strategic games on j2s.
The difficulties are actually in front of us, but the huge potential real-time strategic players in China's 0.3 billion million mobile phone users have prompted us to overcome these difficulties, as long as there is a possibility, we also need to find a way to overcome these obstacles. How can we achieve online real-time strategic games on mobile phones?
In terms of performance and user volume, we chose the Nokia 60 series as the initial development platform.
We do not consider using the HTTP protocol, although it is a commonly used protocol in j2s devices, however, its low efficiency compared with SOCKET and its non-connection protocol determine that it is not suitable for instant strategy. From the table above, we can see that the connection establishment time is much longer than the data transfer time after the connection, and the HTTP protocol requires a lot of additional overhead to establish the connection; the average HTTP data transmission time is much higher than that of SOCKET. We tested most of the 60 models (7650,365 0, 3660,660 0, N-GAGE, N-GAGE QD), all the testing models support socket.
From the table above, we can see that the average round-trip time of socket connection data is 1 ~ In 2 seconds, this may be enough for a turn-based strategic game, but it is too long for a real-time strategic game. Is there any way to significantly reduce the data transfer time?
We can consider the server and the packet protocol.
The servers tested above are written using Serverlet, while serverlet is built on the Web server. Therefore, the server response and processing time contained in this data cannot be ignored, to achieve faster response and processing speed, we must redesign and build a dedicated Server for the game. The size of the transmitted data packet is also a key factor affecting the speed. Usually, we develop a network application based on j2m's, and are used to transmitting data using text streams. Because most application servers are based on Web servers, it is very intuitive to use text to represent information, which is also easy for the Server to process, however, it is still a waste of text that has not been compressed for the j2-based platform and gprs network.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.