SmartFoxServer and Jelastic for Mobile Game Development

本文介绍如何使用SmartFoxServer和Jelastic平台快速部署多人移动游戏。通过简单的步骤即可搭建测试环境,并展示了一项压力测试,该测试下系统能够轻松处理25,000个并发用户。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SmartFoxServer and Jelastic for Mobile Game Development  

2013-11-25 11:08:47|  分类: unity3d |  标签:unity3d  |举报|字号 订阅


http://www.smartfoxserver.com/forums/viewtopic.php?f=18&t=16175

Mobile gaming is a growing phenomena that has exploded with the rapid propagation of smartphones and tablets, in particular those running Apple iOS and Android.

In 2009 the smartphone game sales on those two platforms amounted to 19% of the market. Two years later it was 58% and it’s now leading the apps market, with expected revenues in excess of $8 million for 2013 and twice as much for 2014.

Every day new developers are joining the community of mobile gaming. We have prepared a simple tutorial that will demonstrate how easy it is to get started with Jelastic and SmartFoxServer 2X.

SmartFoxServer 2X is a comprehensive platform for rapid development of multiplayer game s and applications, supporting Adobe Flash, HTML5, Android, Unity3D, iOS, Java, C++ and more. SmartFoxServer 2X comes for free with a 100 CCU (concurrent users) license, 100% of the features and no time limitations.

Thanks to its simplicity of use, versatility and performance, it currently powers hundreds of projects all over the world, from simple turn-based games to massive virtual worlds and real-time action games.

In this post we will show how to rapidly setup a Jelastic environment and deploy SmartFoxServer for testing and production. The whole operation takes no longer than 5 minutes.

Create environment

1. Log into Jelastic Manager and click on Create environment button.

2. Select the Expert Environment topology, click on the VDS button and specify the cloudlet limit for your node. After that type the name of your environment and click Create.

smartfoxserver-environment

3. After you environment is successfully created establish SSH connection using any SSH client suitable for your OS (MacOS, Linux, BSD or Windows) or Jelastic web-based client.

Install server

1. Download SmartFoxServer community addition for Linux x64.

# wget http://www.smartfoxserver.com/downloads/sfs2x/SFS2X_unix_2_7_0_64.tar.gz

2. Unpackage the archive you’ve just downloaded.

# tar -xvf SFS2X_unix_2_7_0_64.tar.gz

Configure the server’s public IP address. In the <unpacked-folder>/SFS2X/config directory open the server.xmlfile and edit the following line by replacing 127.0.0.1 with the real address of your Jelastic VDS.

<socket address="127.0.0.1" port="9933" type="TCP"/>

4. Navigate to /SFS2X/ directory and enter the next command:

# cd SmartFoxServer_2X/SFS2X/
# ./sfs2x-service start

Now you can navigate to your SmartFoxServer in a browser using the public IP address of your VDS. For example: http://10.11.12.13:8080. The default credentials for the administrator are: sfsadmin / sfsadmin.

smartfoxserver 2x documentation

Success! You have completed the process.

Performance test

The engineers at SmartFoxServer helped Jelastic testing the overall performance of the proposed solution. We used a custom built tool that allows to spawn thousands of clients and generate huge traffic towards the server.

For our simple stress test we set up a cluster of 3 client machines (1 master + 2 slaves) to overload a single SmartFoxServer 2X instance with traffic. Every client runs in its own Jelastic VDS, configured with 32 cloudlets and generating 8333 clients each.

The following are the essential statistics:

  • 25000 total concurrent clients
  • Approximately 5000 Rooms are created
  • Login phase = 30 clients/sec joining the server
  • 6250 messages/sec going to the server
  • 31250 messages/sec going out of the server (this is because each messages is broadcast to 5 users in each Room)
  • The generated network traffic is approximately 8Mb/s IN, and 32Mb/s OUT
  • The whole test uses less than 15% of the CPU and approximately 1.2GB of RAM on the SmartFox instance.

The test was run using the SmartFoxServer’s default configuration for three days, setting the JVM maximum memory at 2GB.

With 25K CCU consuming less than 15% of the computing resources it is immediately clear the massive scalability potential of the SmartFox and Jelastic combination. Paired with the natural horizontal scalability of the cloud, this solution can satisfy projects of all sizes and easily grow with its audience.

smartfoxserver hosting

Finally, with the ability of Jelastic to dynamically allocate resources on the fly, according to the minimum and maximum configured by the user, the solution can satisfy the technical requirements and budgets of every game developer.

If you’re interested in learning more about large SmartFoxServer deployments and relative architectures you can consult these white papers.

Testing a mobile game

SmartFoxServer 2X comes with a large pool of example games for all major supported platforms that can be tested and studied out of the box.

In this white paper we will use the Android version of the Tic-Tac-Toe to get started with SmartFoxServer 2X.

1. Start by downloading the Android example pack.

2. Extract the files from the package you’ve just downloaded and install the .apk on your Android device (Tris/deploy/client/ in our case). You will need to have Android SDK Tools installed.

# adb install SFS_Example_Tris.apk

3. Copy the tris/ folder from the Tris/deploy/extensions/ folder to your SFS2X installation folder, under SFS2X/extensions/

In order to start the game on the client launch the app and change the connection details of your SmartFoxServer using its public IP address.

phone smartfoxserver documentation

Conclusions

The multiplayer aspect in mobile game plays a central role in improving the longevity and popularity of your products, allowing users to enjoy live interaction with friends and other players.

For more information about SmartFoxServer:

For more information about Jelastic:

内容概要:本文详细探讨了基于MATLAB/SIMULINK的多载波无线通信系统仿真及性能分析,重点研究了以OFDM为代表的多载波技术。文章首先介绍了OFDM的基本原理和系统组成,随后通过仿真平台分析了不同调制方式的抗干扰性能、信道估计算法对系统性能的影响以及同步技术的实现与分析。文中提供了详细的MATLAB代码实现,涵盖OFDM系统的基本仿真、信道估计算法比较、同步算法实现和不同调制方式的性能比较。此外,还讨论了信道特征、OFDM关键技术、信道估计、同步技术和系统级仿真架构,并提出了未来的改进方向,如深度学习增强、混合波形设计和硬件加速方案。; 适合人群:具备无线通信基础知识,尤其是对OFDM技术有一定了解的研究人员和技术人员;从事无线通信系统设计与开发的工程师;高校通信工程专业的高年级本科生和研究生。; 使用场景及目标:①理解OFDM系统的工作原理及其在多径信道环境下的性能表现;②掌握MATLAB/SIMULINK在无线通信系统仿真中的应用;③评估不同调制方式、信道估计算法和同步算法的优劣;④为实际OFDM系统的设计和优化提供理论依据和技术支持。; 其他说明:本文不仅提供了详细的理论分析,还附带了大量的MATLAB代码示例,便于读者动手实践。建议读者在学习过程中结合代码进行调试和实验,以加深对OFDM技术的理解。此外,文中还涉及了一些最新的研究方向和技术趋势,如AI增强和毫米波通信,为读者提供了更广阔的视野。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值