Huawei Cloud Cloud Server L Instance Evaluation | Cloud Cloud Server L Instance Deployment SpaceHuggers Web Game
- 1. Introduction to Yunyao Cloud Server L Instance
- 2. Introduction to SpaceHuggers mini-game
- 3. Introduction to the practical environment
- 4. Purchase an L instance of Yunyao Cloud Server
- 5. Check the server environment
- 6. Deploy SpaceHuggers web game
- 7. Visit the SpaceHuggers web game
- 8. Use experience and summary
1. Introduction to Yunyao Cloud Server L Instance
1.1 Introduction to Yunyao Cloud Server L instance
Yunyao Cloud Server L instance is a new generation of lightweight application cloud server, specially designed for small and medium-sized enterprises and developers, providing a convenient out-of-box experience. This product provides rich and strictly screened application images and can deploy applications with one click, greatly simplifying the process of customers building e-commerce websites, web applications, applets, learning environments, and various development and testing tasks in the cloud.
1.2 Features of Yunyao Cloud Server L instance
-
Intelligent and non-stuck: Huawei Cloud Qingtian architecture supports software and hardware collaboration combined with AI algorithm intelligent scheduling to provide you with high-quality performance. Huawei Cloud has a global storage and computing network with data transmission latency shorter than the blink of an eye, meeting the high requirements of low network latency scenarios such as games and audio and video.
-
Excellent price, easy to use: super cost-effective, ultra-low threshold, open to use as you like. Multiple instance specifications to balance performance and cost. Technology upgrades optimize cloud costs and benefit more start-ups and developers.
-
It’s easier to get started: order multiple images and resource combinations with one click. A variety of high-quality images have been carefully selected and rigorously tested by Huawei Cloud officials. They cover seven major scenarios and have preset templates, which are quick to build, safe and trustworthy. Automated orchestration, one-click activation of resources, and business online in minutes. Smooth learning curve, wizard-based application construction, and easy application activation.
-
Management is more worry-free: topology, resources, and mirroring are managed visually, and business architecture is transparently managed. Intimate service status reminders, one-click resource renewal and withdrawal, and simplified management. Real-time monitoring of resource load, security, and usage ensures that services are always online. A wide range of optional security services are available, including extensive backup, host security and other services, providing the highest level of security protection.
2. Introduction to SpaceHuggers mini-game
2.1 Introduction to SpaceHuggers
The name of this game is SpaceHuggers, which is translated into Chinese as Space Protector. It is a shooting game where you need to destroy all enemies. Multiplayer games can be played through external controllers, supporting up to 4 people. Not only that, there are also enemy and prop systems as well as particle systems such as rain, snow, blood, explosions, weapons, and water. Mobile operation requires an external controller.
2.2 SpaceHuggers gameplay
- Use WASD or D-Pad - move, jump and climb
- Z or left click - shoot - most things will break, some will burn
- X or middle click - scroll - briefly invincible, deals damage, gives boosts, extinguishes fire
- C or right click - Grenade - 3 per life, use wisely
- You can also use an Xbox or SNES style controller to connect up to 4 for cooperative play!
- Kill all enemies to complete the level
- The radar at the bottom of the screen shows nearby enemies
- You start with 10 lives and gain 3 more lives after completing each level
- For the best gaming experience, use Chrome in full-screen mode
- There is no end, but if you want a challenge, try to clear the first 5 levels
3. Introduction to the practical environment
3.1 This environmental plan
Server category | Application image | Intranet IP address | Docker version | Portainer version | Operating system version |
---|---|---|---|---|---|
Yunyao cloud server L instance | Docker visualization Portainer | 192.168.0.168 | 24.0.4 | 2.18.4 | Ubuntu 22.04.1 LTS |
3.2 Introduction to this practice
1. This practice is a personal test learning environment, aiming to quickly deploy applications. Please be cautious in the production environment;
2. This practice environment is a Yunyao Cloud Server L instance, and the application image used is Portainer 2.18.4;
3. This practice Practice deploying the SpaceHuggers web game on the Yunyao Cloud Server L instance.
4. Purchase an L instance of Yunyao Cloud Server
4.1 Purchase Yunyao Cloud Server L instance
1. Official website link: https://www.huaweicloud.com/product/hecs-light.html
2. Purchase specifications:
Region: North China-Beijing IV;
Application image: Docker visualization-Portainer;
Instance specifications: 2 cores 2G/system Disk 40G/peak bandwidth 3Mbps/traffic package 400G;
instance name: Customize it, edit it here as HECS-L-Portainer;
purchase duration: 1 month.
4.2 Check the status of Yunyao Cloud Server L instance
Check the purchased Yunyao Cloud Server L instance. It is already in normal operation.
4.3 Reset server password
- Click to remotely log in to Yunyao Cloud Server L instance
- To reset the password, click the reset password option on the right. Identity verification is required. After selecting mobile phone verification, the password can be reset successfully.
4.4 Xshell remote connection server
Copy the elastic public IP address of Yunyao Cloud Server L instance, enter the account and password information in the Xshell tool, and log in to the server remotely.
5. Check the server environment
5.1 Check operating system version
Check the operating system version of Yunyao Cloud Server. It is currently using Ubuntu 22.04.1 LTS.
root@hcss-ecs-f91c:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
5.2 Check the system kernel version
Check the server's kernel version
root@hcss-ecs-f91c:~# uname -r
5.15.0-60-generic
5.3 Check system load status
Use the top command to view the load status of the current server
top
6. Deploy SpaceHuggers web game
6.1 Install apache
- Update software source
apt update
- Install apache software
apt install apache2
6.3 Download SpaceHuggers source code
The github address of the SpaceHuggers mini game: https://github.com/KilledByAPixel/SpaceHuggers
- Enter the /var/www/html/ directory
cd /var/www/html/
- Download SpaceHuggers source code
git clone https://github.com/KilledByAPixel/SpaceHuggers.git
6.4 View the SpaceHuggers source code directory
View the SpaceHuggers source code directory
oot@hcss-ecs-f91c:/var/www/html# tree -L 2 ./SpaceHuggers/
./SpaceHuggers/
├── appCharacters.js
├── appEffects.js
├── app.js
├── appLevel.js
├── appObjects.js
├── engine
│ ├── build
│ ├── engineAudio.js
│ ├── engineDebug.js
│ ├── engineDraw.js
│ ├── engineInput.js
│ ├── engine.js
│ ├── engineObject.js
│ ├── engineParticle.js
│ ├── engineTileLayer.js
│ ├── engineUtil.js
│ └── engineWebGL.js
├── favicon.ico
├── index.html
├── LICENSE
├── README.md
├── screenshot.png
└── tiles.png
2 directories, 21 files
6.5 Restart apache service
Restart the apache service and be careful not to conflict with other services on port 80.
- Start apache service
systemctl start apache2 && systemctl enable apache2
- Restart apache service
systemctl restart apache2
7. Visit the SpaceHuggers web game
7.1 Release security group ports
Enter the security group management page of Yunyao Cloud Server L instance and allow port 80 in the inbound direction.
7.2 Browser access to SpaceHuggers web game
Access address: http://Elastic Public IP Address/SpaceHuggers
replaces the IP with the elastic public IP address of its own server
- Skill:
Roll to put out the fire!
Rolling will also cause melee damage to enemies.
Keep your distance from the experts (white), they roll and flip a lot!
You can hold jump to climb walls
Jump flip for more vertical height (roll immediately after jumping)
To get really high, try the grenade jump!
You can press the R key to restart the game
- operate:
WASD or arrow keys: move, jump and climb
Z or left click: shoot, most things break, some burn
X or middle click: scroll, brief invincibility, also extinguishes fire
C or right click: Grenades, 3 per life,
and up to 4 can be connected for cooperative play!
- Enemy type:
Recruit (Green): Slow, only takes 1 hit
Soldier (Blue): Normal speed, takes 2 hits
Captain (Red): Can climb walls and jump more often, takes 3 hits
Expert (White): Jumps often and rolling, requires 4 hits
Demolitionist (Purple): Throws grenades without catching fire, requires 5 hits
8. Use experience and summary
This practice "Huawei Cloud Yaoyun Server L Instance Evaluation | Yunyao Cloud Server L Instance Deployment SpaceHuggers Web Game" was successfully completed. It should be noted that port 80 of the security group is released to ensure that the apache service starts normally. The network of the cloud server is also very stable, and there are no lags or disconnections when trying out web games. The overall user experience of Huawei Cloud Yao Cloud Server L instance is good, simple to operate, and convenient to manage. It is a cost-effective cloud server product that is worth buying.