Did you see that I have done little work in my public repositories during February and at the start of March 2020? So, I did a lot of work which I am going to present for you all: it's a full C++ port of the original SMBX engine which now works on multiple platforms (tested on Linux, Windows, macOS, Haiku, and Android), and it does accurately represent original gameplay with the rest of features and bugs!
- Some screenshots
How I made it?
Since February 2, SMBX's original source code is now open. This fact gave me a lot of helpful material which will help me to make the Moondust Engine better and faster! However, dealing with the VB6 environment is not convenient, and at the same time, it's not stable on Linux (because of the graphical engine and risk of VB6 IDE's crash due to using external DLL libraries). So, to get it to work easier, I remembered my very old idea to port the whole SMBX code to C++. So, after a week of initial research, I began working. After a week and a half, I got a fully working (but buggy in some places) thing. Then, I spent time debugging it and making it usable by everyone. It's the full replica of SMBX 1.3 with the rest of its logical bugs (with some exceptions: I did fix several crash bugs that were a big annoyance while playing a game). It works on multiple platforms: it works on Windows both 32 and 64 bits, on Linux, on macOS, (also may work on Haiku and xBSD). Since version 1.3.5 has Android support!
Frequently Asking Questions
This paragraph contains a list of several questions you would to ask me, I'll give answers to most of them.
- Frequently Asking Questions
- What is this?
It's a port of an old VB6 engine, purely written in C++. It reproduces an old engine completely (except an Editor), includes lots of its logical bugs (crashy bugs where they were found and then fixed).
Why did you make it?
Why? I have several purposes for why I made it:
- It's a very convenient life model for research I want to use in PGE Engine development.
- To make it work without it being necessary to use Wine on non-Windows platforms and allow it to run on any other than x86 platforms.
- To be able to optimize it to make it use fewer hardware resources than the original VB6-based build of a game.
You have PGE Engine, why you have spent over one month crafting this thing?
I need it for PGE Engine development directly, it's much easier to hack and inspect rather than deal with the old and inconvenient VB6 environment.
What's the future of Moondust Engine as TheXTech now exists?
I'll continue the development of the Moondust Engine as I still have to pass the second goal of the Moondust Project.
Since the foundation, Moondust Project had two goals: 1) save SMBX; 2) give a flexible toolkit for new platform games. Opening of SMBX sources and introducing TheXTech has solved the first goal: SMBX has been saved and now it's free and open-source cross-platform software. Moondust Engine will be used to pass the second goal - giving a toolkit for new games. Unlike TheXTech, Moondust Engine gives full flexibility that allows anyone to build something new from scratch without inheriting an old game base. However, TheXTech is needed for Moondust Engine as a working research model to develop a new engine. It will be similar to GZDoom and Chocolate Doom ports of the Doom game: GZDoom is a powerful and functional engine, the best choice of modders; a Chocolate Doom is an accurate port of the original game to a modern platform with a purpose to represent an original game including even bugs. The Moondust Engine intends to be like a GZDoom while TheXTech is an analog of Chocolate Doom to represent an original game on modern platforms.
Can LunaLua work on this?
No, LunaLua won't work: this project is binary-incompatible with LunaLua. This also means that SMBX2 content is incompatible.
How to use this?
Here are many ways to play games with it:
- there are some ready-for-use packages, just take and use as you did it with SMBX.
- [macOS users, skip this]: use by the same way as an original game: put an executable file into the game root folder with a "thextech.ini" that contains the next text:
Code: Select all
force-portable = true
, music.ini, sounds.ini and additional "graphics/ui" folder. An important note: all default graphics must be converted into PNG, use the GIFs2PNG tool from PGE Project over your "graphics" folder with a "-d" switch. Don't use the "-r" switch to keep original GIFs together with new-made PNGs if you plan to continue the use of the original VB6-written SMBX.
- use it for debug mode: in your home directory, create the ".PGE_Project/thextech" folder (on macOS the "~/Library/Application Support/PGE Project/thextech") where you should put a full set of game resources and worlds stuff, this folder will work as a game root in the original game. This mode allows you to run an executable file from any folder location of your computer and use the same location of resources for all builds (except these are marked as portable by an INI file).
How to add custom episodes for the macOS version?
If you have a bundled build of TheXTech, all default resources are inside your .app: "Content/Resources/assets/". You can modify the content, but it's not recommended! Instead, after the first run of a game, in your home directory will appear the next directory:
Code: Select all
In this directory, you will find an empty "battle" and "worlds" folder to put your custom stuff. At the "~/Library/Application Support/PGE Project/thextech" path logs, settings, and game saves will be stored.
If you want to replace default assets with your own, you can modify the content of the app bundle or compile a new build by giving the necessary CMake arguments needed to pack your custom assets root and icon into the new bundle or make the assets-less build (if you give no arguments, the assets-less build will result). Therefore, you need to put the full content of the game root into the "~/Library/Application Support/PGE Project/thextech" folder, include default assets (graphics, music, sounds, intro and outro levels, default battle, and worlds folders).
How to develop episodes targeted to TheXTech?
This engine has full compatibility with almost all old episodes developed for SMBX 1.3 with some minor exceptions (if the certain level or episode do rely on the bug of the old game, you can add the "compat.ini" file at your level or episode to re-enable certain bugs which are required for level or episode to work normally).
You can use the same tools as you used to develop episodes for the original SMBX 1.3 (include the classic built-in editor of the old game). The engine doesn't include its own editor anymore, instead, you have two options to get the editor for this engine: do use the vanilla Editor and have all limits as SMBX 1.3, or do development in the modern Moondust Editor that will allow you to use brand-new features of the engine were inaccessible from the old editor.
You need to simply download the standalone Moondust (PGE Project) toolchain and take the latest "SMBX 1.3 Compatible" configuration package. Once you will start the PGE Editor, to get the direct level testing work, you should open (or create a new) any level file, open the Test->TheXTech menu, and choose the "Change path to TheXTech..." menu item. You should specify (or browse) the full path to the actual executable of the game, and press the Ok button. Once you set this properly, you can press the F5 key to start the level testing now.
You can save your level and world maps in LVLX and WLDX format, they are natively supported by TheXTech include the numerous unique features that came from Moondust and SMBX-38A standards, for example, the full ability to use the Z-Layer and Z-Offset, the warp enter the event, the custom "stars needed" message text, two-way warps, portal warps, vertical section wrap, support for more than 21 section, etc. On world maps, there are more than 5 credit lines available and the ability to set up the custom music file provided. The engine does the full support for PNG graphics and a lot of music and sound formats, customizable player hitbox calibration files (the same as for PGE Engine and SMBX2 being used).
What is different with this thing in comparison to the original VB6 build?
- First off, it's written in C++ while original (as we already know) is written in VB6.
- Doesn't have an Editor. Instead, in nearest future, it will have deep integration with PGE Editor that will allow to use it with the same functionality as in the original editor (the "magic hand" functionality was kept to allow real-time editing of the level while testing, it's needed to use IPC communication with PGE Editor to get the ability to use it better).
- Full support of UTF-8 in filename paths and internal text data (original game had only 8bit ANSI support).
- For graphics and controlling, it uses an SDL2 library while the original game has used WinAPI calls and GDI library.
- It uses PGE-FL that has better file format support.
- A support for WLDX world maps is allowing unlimited credits lines and custom music without it being necessary to use a music.ini for music replacements.
- Some LVLX exclusive features now working: vertical section wrap, two-way warps, custom "star needed" message, warp enter the event, ability to disable stars printing in HUB episodes for specific doors, ability to disable interscene showing when going to another level through a warp.
- Built-in support for the episode and level wide music.ini and sounds.ini to override default music and sound assets.
- World maps now support a custom directory to store any specific resources like custom tiles/scenes/paths/levels and not spam the episode root folder with world map resources anymore.
- Default config format is INI, old config.dat format is no longer supported, mainly because of incompatible key code values (SDL_Scancode versus VirtualKeys enum of Windows API).
- Game saves now using the SAVX format instead of a classic SAV. However, if you already have an old game save, you still can resume your game by using a new engine now (the next gamesave attempt will result in a SAVX file, an old gamesave in SAV format will be kept untouched).
- Built-in PNG support for custom and default graphics. Masked GIFs are still supported for backward compatibility, however, without making an unexpected auto-conversion as SMBX-38A does.
- Checkpoints now have multi-points! You can use them in your levels multiple times without limits!
- It does use a lazy-decompress algorithm to speed up the loading of a game and reduce memory usage.
- For music and SFX, the MixerX library is used to give support for a wide amount of sound and music formats!
- It doesn't embed any graphics: there are NO truly hardcoded graphics, everything is now represented by external graphics!
- Some internal limits have been expanded.
- Built-in GIF recorder by F11 key (F10 on macOS, F11 is reserved by system UI for a "show desktop" action)
How to build it?
You can read a guide on how to build this project from a source code which you can find here: https://github.com/Wohlstand/TheXTech/wiki/Building-the-game
To build it, you need to have the next things:
- Ninja optionally (to speeds-up the build process)
- Compatible C/C++ compiler (GCC, Clang, MSVC haven't been tested yet)
- Git (required to pull submodules and clone source of dependent libraries to build them in place)
- Mercurial (required to clone an official SDL2 repository to build it in place here)
- Optionally: system-wide installed dependencies: SDL2, libFreeImageLite (a modded implementation of the FreeImage), MixerX sound library, AudioCodecs collection of libraries. Having them be installed in a system gives a major build speed up. However, it's possible to build all these dependencies in place here with the cost of extra build time being added.
The official TheXTech documentation
Here you'll find a lot of guides and explanations for most of the TheXTech.
Feel free to try it out in action now:
There are ready for use packages, equipped with original SMBX 1.3 assets and "The Invasion 2" episode.
- Needed more episodes?
- If you are looking for more episodes, please visit the archive of preserved SMBX episodes (You can browse these directories where episodes will be compatible: SMBX 1.3, SMBX 1.0 - 1.2, and TheXTech. All other directories will contain incompatible episodes that will not properly work, see details here).
Also, you can find some episodes at SMBX Episodes section of WohlSoft Forum, or browse the episodes sub-section at SMBX forum where you still can find any compatible episodes (which was originally targeted to SMBX 1.3).
- Changes for 188.8.131.52
- Fixed the ARM64 building
- Updated the log writer
- Disabled the "Boss Dead" event hook to stop the episode speed-run timer by default, added the compat.ini options to enable and configure it
- Fixed the unexpected Swooper flap sound played after the Swooper has gone far away
- Fixed the vanilla bug: The Swooper has avoided being started to fly when inactive
- Added the compatibility level command-line option separated from the speed-run modes (However, the speed-run mode will still override the compatibility level)
- Added an option to enable the background game controller input handling
- Portal warps have been allowed to be used for level entrances and level exits (Instant warps kept unsupported to avoid possible compatibility issues)
- Added the cannon pipes that can shoot the player with a given speed
- Added the workaround for custom background2-42 that has non-multiple 4 height (there are several custom sprites with the 3455 invalid height, they must be 3466)
- Fixed an incorrect speed-run timer render at multiplayer mode
- The controller state print has been replaced with a controller drawing to indicate the pressure state of buttons
- Added the opt-in 2x scale down optimization for all textures to reduce the memory usage
- Fixed the confusion when using the modern section auto-scroll settings when an auto-scroll fix was disabled
- License was changed into GPLv3 (see details: https://github.com/Wohlstand/TheXTech/issues/162)
- Enabled the work on the Android TV
- Fixed the game start error after granting the storage permission on Android 9 and lower
- Added an ability to change the look of the launcher screen on Android via gameinfo.ini (Change the logo, change the background, and set up the simple animation)
- Added mask fallback support for custom graphics mask compatibility for old episodes
- Fixed vanilla bug: Attempt to enter the locked warp or take the star with star-locked warp the game will crash if a level has no BGO at all
- Make turn blocks (block-90) work as bricks when SMBX19 and lower-level file version is open
- Added a workaround for the yellow platform (NPC-60) at "The Invasion 1" episode where it won't move at level42
- Added Billy Gun (NPC-22) behavior compatibility with SMBX 1.2 and 1.1.x and older file formats
- Added wireless game controllers battery status displaying when enabled at the settings
- Added device battery status displaying at the right-top corner when enabled at the settings
- Fixed an inability to save the game when game assets were stored at SD Card on an Android device
- Added support for gamecontrollerdb.txt at the assets root and at the user directory
- Fixed vanilla bug: World map music won't resume after going through the warp that leads to no music points or the music point with the same song
- Fixed the improper custom music change when going through the warp on the world map
- Fixed vanilla bug: Offscreen NPC can now respawn during the stopwatch freeze
- Added Thwomp (NPC-37) behavior compatibility with SMBX 1.0.x
- Added the Yoshi mode support for specified songs at the music.ini: mute selected track number without Yoshi, enable it back when Yoshi is presented
- Fixed a bug when a last world map music is not remembered when sound is disabled
- Fixed the wrong restart place when running the lasagna of levels and the "restart level after death" option is enabled
- Fixed the NPC logic distortion caused by early gfx update
- Added an ability to customize an outro behavior using gameinfo.ini
- Battle mode access can be disabled via gameinfo.ini
- Two-player game mode access can be disabled via gameinfo.ini
- The Scores of Power-Ups (NPC-9, NPC-14, NPC-34, NPC-169, NPC-170, NPC-182, NPC-183, NPC-184, NPC-185, NPC-249, NPC-250, NPC-264, NPC-277) can be changed via npc-X.txt
- Added a fixed behavior for rail platforms and grinder (NPC-60, NPC-62, NPC-64, NPC-66, NPC-104, NPC-179). It can be enabled using new-added custom values
- Fixed the collision bug when an attempt of the player with the shoe to jump up at the moving NPC being pushed into the wall, causes the player to go through the wall
For Windows (XP/Vista/7/8/8.1/10+):
- Downloads for Windows
- - Download for 64-bit (modern platforms)
- Download for 32-bit (old platforms and 32-bit operating system installs)
- Download for ARM64 (for Windows-based tablets that use an ARM processor, or other compatible devices)
Note: To unpack 7z archives you need to use the 7-zip tool (it's free!). For ARM devices try this version of 7-zip.
For macOS (10.11 is minimal, if not works even on 10.11, report me please. The AppleSilicon version requires the macOS 11.0):
- Downloads for macOS
- - Download DMG image, universal for both Intel and Apple Silicon
Note: because of macOS specifics, using the game here is different than other systems: after install, running a game,
and then, to add your custom episodes, look into your home directory and find the "TheXTech Episodes" folder, the "worlds" and "battle" inside is for your own stuff!
To replace default media, look inside the bundle and find the "Content/Resources/assets" folder!
Caution 1: bundle is unsigned, make sure you know how to deal with a Gatekeeper to make able to use this! On Catalina it may not start the first time after Gatekeeper's question, try to run the game again!
Caution 2: On Apple Silicon (M1) devices, you will need to run the xattr -rd com.apple.quarantine "Super Mario Bros. X.app" from your terminal at the applications directory to get the game work.
For Linux distros (x86_64 and i386):
- Downloads for Linux
- Portable archives
There are static portable builds that should work almost everywhere. If you run a different Linux distro than Ubuntu, you may use the Ubuntu 16.04 version for the game. The confirmed work on the Debian 10, on the OpenSUSE, on the Fedora, on the CentOS. Also, the game could work on ArchLinux and Monjaro. If all builds won't work on your distro, feel free to report to me and try to compile the game from the sources to get it to work on your side. Right now there are x86_64 and 32-bit x86 builds that were made, ARM wasn't built by the CI yet (probably I'll try to set up the CI to produce such builds).
- Download for Generic Linux (built on Ubuntu 20.04) 64-bit, works also on Fedora and, possibly, on Arch and Monjaro. If it doesn't work, please try the Ubuntu 18 build.
- Download for Generic Linux (built on Ubuntu 18.04) 64-bit, works also on OpenSUSE. If it doesn't work, please try the Ubuntu 16 build.
- Download for Generic Linux (built on Ubuntu 16.04) 64-bit, works also on Debian 10+, CentOS 7+. If it doesn't work, please try to build the game from the source code.
- Download for Generic Linux (built on Ubuntu 16.04) 32-bit, works also on other 32-bit Linux systems.
Debian and Ubuntu-compatible packages
The game will be installed at system, default assets will appear atx, and user directory for game saves, custom worlds, logs, screenshots will appear at
Code: Select all
/usr/share/games/thextech/smbdirectory on the first launch.
Code: Select all
- Download for Debian-like Linux (built on Ubuntu 20.04) 64-bit
- Download for Debian-like Linux (built on Ubuntu 18.04) 64-bit
- Download for Debian-like (built on Ubuntu 16.04) 64-bit
- Download for Debian-like Linux (built on Ubuntu 16.04) 32-bit
There is an AUR package, maintained by YidaozhanYa. The game will be installed at system, default assets will appear at /usr/share/games/thextech-smbx, and user directory for game saves, custom worlds, logs, screenshots will appear at ~/.thextech-smbx directory.
Code: Select all
yay -Sua --batchinstall thextech-supermariobrosx
- Downloads for Android
- - Download for Android (Minimum version is 4.1)
Note: this is the plain runtime package that doesn't include any game assets. You should download the SMBX assets pack archive and unpack it into any convenient place. On the first run (or at the Settings), you should select the directory that contains your unpacked assets. That directory will serve the same as the SMBX game directory on the desktop versions. You can easily add more episodes to it by unpacking archives into the "worlds" directory in the same way as on desktop versions. At the Settings, you can switch between different game asset directories that allow you to play different games (such as "Adventures of Demo") by the same engine.
WebAssembly (Play game in the browser):
- Web version
- - Play SMBX in the browser NOW! (Note, the game may work slow from some places like China, please ask people for any local mirrors, or get the self-hosted version below).
- Download the Self-hosted version of the game if you want to upload the game copy on your WEB-server and make the game get better availability.
Note: Adding custom episodes and replacing default music/sounds/graphics require you to build the game from the sources with giving of your assets directory. You can find the detailed manual on how to build the web version of the game here.
Plain desktop runtimes
There are packages that contain the runtime engine binary only. Use this to update your existing game without re-downloading game assets. Especially if you did your own remix of the assets and you don't want to re-remix them again.
- Plain runtime downloads
- Generic Linux (built on Ubuntu 16.04) amd64
- Generic Linux (built on Ubuntu 16.04) i386
- Generic Linux (built on Ubuntu 18.04) amd64
- Generic Linux (built on Ubuntu 20.04) amd64
The full C++ source code repository:
If you have any questions, problem reports, or suggestions, feel free to write to me!