SMF Arcade Info


SMF Arcade v2.7.0.8 [Official Release]


Introduction
SMF Arcade adds an arcade section to your forum where users can play games.

You must uninstall any previous versions of the Arcade prior to updating this modification.
For self-hosted Ruffle or EMulatorJS libraries, you must ensure those packages are installed to your server via arcade maintenance after updating/installing this modification.

All your users should be using a modern mainstream browser with JavaScript support enabled for this modification to function as intended.


Due to the downloading of external libraries during the installation of this package, you are advised to only download this modification from the web-develop.ca download section to ensure those packages are legitimate.

Supported SMF Versions
This version supports the most recent SMF 2.1 branch.

Recommended Minimal Requirements
OS: Unix/Linux OS [latest version] (CentOS, Ubuntu, Fedora, etc.)
HTTP Server: Apache [v2.4.37+]
PHP [8.3+]
MySQL or MariaDB [latest version] (using UTF-8 Unicode)
Extensions/modules: curl, mbstring, zlib, phar, mime, rewrite, headers
Forum software/versions: SMF 2.1 branch ~ (using UTF-8 Charset)
Hypertext Transfer Protocol Secure (HTTPS) ~ HTTP over TLS or HTTP over SSL

Optional RAR compression support: RAR (command-line tool) -> shell_exec must be enabled in PHP to use RAR compression
Optional RAR decompression support: UNRAR (PECL RarArchive class) package for Unix -> Extension must be enabled in php.ini (check phpinfo() to confirm)
RAR archive package for PHP 8.3.0+ (check other PHP versions)
RAR compression for Unix: Install rar via yum, DNF or apt-get -> example: yum install rar
RAR compression for WIndows: Requires WinRAR to be installed in -> Program Files / Program Files (x86)

To use the game description translation feature, you must register at Microsoft Azure Translator Service to use their V3 API.
After registration, you must enter the Azure V3 API endpoint, path, subscription key (and region code if applicable) information into your Arcade Administration settings.

Supported game save types:
  • HTML5 v1 (requires specific SMF Arcade save code)
  • HTML5 v2 (IBP -> various HTML5 save codes)
  • HTML5 v3 (PHPBB -> various HTML5 save codes)
  • IBProArcade v1 / v2 / v3 / v3.2 (flash)
  • vBulletin v3Arcade (flash)
  • PHPBB (flash)
  • MochiAds are supported with external module
  • SMF v1 / v2 (flash)
  • General flash games are supported without score support
  • General HTML5 games are supported without score support
  • ROM games are supported without score support via the EmulatorJS plugin

All Flash games use the Ruffle Flash Emulator. Many Flash games will work but not all of them due to Ruffle still being in active development.
The Ruffle Flash Emulator is no longer included with this installation package.
You can use the Arcade Maintenance page to download that third party package to host the files on your server or you can opt to use the remote CDN from the main Arcade settings page.

All ROM games are supported via the EmulatorJS plugin which can be downloaded to your server via the Arcade Maintenance page.
There is now a remote CDN available for EmulatorJS where this plugin only uses the CDN for the "/data" path.

[HTML5 / Flash / ROM] Games
You can view this link for information regarding games for this arcade system: GAME RESOURCE LIST

Games Playable Using This Arcade
The ability to play HTML5, Flash & ROM games is provided but finding sources for those games is left up to each webmaster.
No games are included with this package.

Notes regarding application and modification conflicts:
Mod-Security should be disabled for SMF-Arcade's HTML5/JQuery chunk upload scripts to function properly which is used for large sized game archives.
If you are insistent on using that application, FTP may be necessary to upload your game archives to SMF-Arcade's upload folder paths.

Pretty URL's modification for SMF is not recommended as it may cause compatibility issues with SMF-Arcade due to URL manipulation.
Support for SMF-Arcade issues arising from using that SMF mod or any type of modification that facilitates URL manipulation will not be provided.



Features:
  • Arena for users to challenge other users (disabled in this version)
  • Category Champions as well as Arcade Champions
  • Daily challenge
  • Sort games
  • Installs tar, tar.gz, zip and rar game files
  • Admin settings for added features
  • Notifications for high scores and tournament matches
  • Responsive/mobile support
  • Users can Report game errors
  • Download game option
  • Post new game to forum
  • Alternate game templates available
  • Option to allow auto adjustment of improper save types
  • Allows other mods to use hooks containing score or match information
  • Ability to add custom skins & lists via database entries
  • Ability to use Flash games via Ruffle emulator
  • Ability to play a variety of ROM games via the EmulatorJS plugin

Arcade Hooks

integrate_arcade_match
  • Called from: ArcadeGame.php, just after arena match data has been saved.
  • Purpose: Allows you to use the arena score data variables (read only).
  • Accepts: 1 function name.
  • Sends: $id_match, $user_info['id'], $matchInfo['current_round'], $submit_info['score'], $submit_info['duration'], $submit_info['end_time']
    • $id_match - match id number
    • $user_info['id'] - user id of submitted score
    • $matchInfo['current_round'] - round number
    • $submit_info['score'] - game score
    • $submit_info['duration'] - length of time game was played
    • $submit_info['end_time'] - when the score was submitted


integrate_arcade_score
  • Called from: ArcadeGame.php, just after a game score has been saved.
  • Purpose: Allows you to use the game score data variables (read only).
  • Accepts: 1 function name.
  • Sends: $context['game'], $member, $score
    • $context['game'] - array of game data
    • $member - array of member data (id, name, ip)
    • $score - array of score data (score, duration, endTime)


integrate_arcade_guest
  • Called from: ArcadeGame.php, just after a guest game score has been saved.
  • Purpose: Allows you to use the game score data variables (read only).
  • Accepts: 1 function name.
  • Sends: $context['game'], $submit_info['score']
    • $context['game'] - array of game data
    • $submit_info['score'] - game score


The $_SESSION['arcade']['highscore'] array contains data that is relevant to the 3 hooks shown above.
The array keys are as follows:

$_SESSION['arcade']['highscore'] = array(
 'id' => score id,
 'position' => save position,
 'game' => game id,
 'newChampion' => new champion,
 'personalBest' => is Personal Best,
 'score' => score,
 'start' => highscore page index,
 'saved' => was score saved to database
);


Example usage for the above hooks:
add_integration_function('integrate_arcade_match', 'modName_arcade_match');
add_integration_function('integrate_arcade_score', 'modName_arcade_score');
add_integration_function('integrate_arcade_guest', 'modName_arcade_guest');


For future reference regarding Arcade hooks and useful functions, please use this link:
Arcade Hooks & Functions

Reporting Bugs
Please report bugs to the Official Support Thread!
This helps make this modification better!



Copyright (c) 2004 - 2012, Niko Pahajoki
Copyright (c) 2015 - 2025, Chen Zhen
Current support provided by Chen Zhen @ web-develop.ca
SMF Arcade License: BSD 2

Beta / RC  Testers (past & current):
Dave, Ronald, Skhilled, Bigguy, Legionaire, Origon, Hero, Vince, Lesmond, Rowdy

Many thanks to our beta testers and all those that provide feedback to help improve this modification package.



We would like to thank both Ruffle & EmulatorJS developers plus everyone involved in those projects for their time, effort & great work.
Both emulator projects are essential parts of SMF-Arcade, we are greatful for your contributions to the public domain & indirectly to this project.

EmulatorJS @ https://emulatorjs.org/
Owners, developers & contributors: Ethan O'Brien, Allancoding, Binbashbanana, Michael-J-Green, Electronicarchiver & all others involved.

Ruffle @ https://ruffle.rs/
Owners, developers & contributors: Michael Welsh, Kmeisthax, Nathan Adams & all others involved.




Disclaimer:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.