Board Game Points Simulation Platform Source Code Setup: LNMP Deployment and Points System Secondary Development Notes

Disclaimer: This article is for technical education and demonstration only. It is not professional or financial advice. Any real-world deployment must comply with applicable laws and regulations.

Last month, a friend who runs a local board game studio asked me to set up an online points-based board game simulation platform for member activities, demos, and technical learning. The package I received was a secondary build based on an older entertainment framework, with fairly complete gameplay modules. It took me three evenings to get everything running smoothly. This write-up records the environment configuration, deployment order, and the pitfalls I hit, so I can reuse it next time.

1. System Functionality Test: More Complete Modules Than Expected

Let me start with the overall architecture. The frontend is an H5 client, the admin panel runs on a separate backend, the database is MySQL, and Redis sits in the middle for caching and room state synchronization. The whole package is a little over 600 MB once extracted, with static assets and protocol configuration neatly separated. The directory structure clearly shows the original author had real production experience.

Gameplay Modules

The system ships with rule demos for several classic card-based board games: a point-comparison game, a suit-combination comparison game, and a point-sum game. Each game mode supports multi-player rooms and spectator mode. I tested the room creation flow end to end β€” from creating a room to settling the points takes about three seconds, and latency is well controlled.

Clubs, Alliances, and the Points System

The most interesting part of this system is the social layer. Users can create clubs, and club owners can set entry requirements and points distribution rules. Multiple clubs can also form alliances for cross-club activity leaderboards. All points are handled as virtual ledger entries, paired with a room ticket system β€” each ticket covers a fixed number of room creations. The admin backend supports batch generation and recovery of tickets, and the transaction history is crystal clear.

2. Deployment Environment and Setup Essentials

Server Configuration

For the test machine I used a 2-core 4 GB instance running CentOS 7.9, with aaPanel 7.9, Nginx 1.20 + PHP 7.2 + MySQL 5.7 + Redis 6.2. On the PHP side you need the redis, swoole, and gd extensions. Don’t install too new a swoole version β€” 4.8.x is the most stable. For production, start with at least 4 cores and 8 GB of RAM, and make sure bandwidth can keep up if room concurrency grows.

Pitfall Notes

The first pitfall was database import. The bundled SQL file uses utf8mb4 encoding, but the table-creation statements hardcode utf8, which triggers an index length error on import. I fixed it by manually switching everything to utf8mb4. The second pitfall is ports: besides 80 and 443, the communication service needs two custom TCP ports opened, and both the firewall and the cloud security group must allow them, or the client simply cannot connect to rooms. The third is scheduled tasks β€” the points settlement script runs via crontab, and in aaPanel you need to add two cron jobs, one per minute and one every five minutes.

Highlight: in this secondary build, room tickets and points transactions were turned into standalone modules. The admin backend can export reconciliation data by club and by time range, which makes statistics work for points-based activity planning incredibly convenient β€” a huge improvement over the original framework.

3. Secondary Development and Customization Directions

My friend’s use case was member activities, so I did a few lightweight customizations. First, I swapped the login page and default color scheme to the studio’s brand colors β€” the frontend assets come pre-bundled, so after editing you just recompress and upload them. Second, I hooked up a payment callback interface for a room ticket sales test, following the standard async notification pattern; the signature verification logic lives in a separate service file, so modifying it was painless. Third, I added an operation log query to the admin panel β€” who changed points configuration and when tickets were issued can all be traced, which makes troubleshooting much easier.

4. Frequently Asked Questions

Q: Are there hard requirements on the PHP version?
A: In practice it runs fine on PHP 7.2 through 7.4. Version 8.0 and above throws swoole compatibility errors directly, so I don’t recommend it.

Q: Does the client need a separately packaged app?
A: No. The H5 client works directly in a browser, or you can wrap it in a WebView shell to package it as an app. The source package includes configuration instructions for the shell project.

Q: Does it support multiple languages?
A: The admin backend ships with Chinese and English language packs out of the box. Frontend text goes through config files, so adding a new language is just a matter of copying a language pack and editing the key-value pairs.

Q: How many concurrent rooms can it handle?
A: My 2-core 4 GB test machine ran thirty rooms without any strain. In production, after adding Redis master-replica replication and load balancing, the ceiling can multiply several times over β€” it depends on the message frequency of each room.

5. Who This System Fits and Compliance Notes

This system suits board game studios running member points activity demos, development teams studying room communication and points ledger design, and also works well for teaching probability algorithms. One point worth emphasizing: all points inside the system are virtual ledger entries and have nothing to do with real money. Please comply with all applicable laws and regulations, and never use the platform for any illegal purpose. It should only be used for legitimate technical learning, product demos, and internal activities. This article is for technical education only.

Disclaimer: This article is for technical education and demonstration only. It is not professional or financial advice. Any real-world deployment must comply with applicable laws and regulations.

#source code setup #aaPanel #deployment notes #secondary development #points system demo