Meet TheXTech: a full working cross-platform port of SMBX engine [1.3.6.6]

Description: General discussion regarding the current engine development.
Moderators: Moderators, Semi-moderatos

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #1by Wohlstand » 14 Mar 2020, 16:18

Hello everybody!

Image


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 to 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
Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

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), and 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

[Main]
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

~/TheXTech Episodes

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/TheXTech/TheXTech/wiki/Building-the-game

To build it, you need to have the next things:
  • CMake
  • 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
Image
- https://github.com/TheXTech/TheXTech/wiki
Here you'll find a lot of guides and explanations for most of the TheXTech.


DOWNLOADS
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.

Download the game:
All stable downloads were at the project's home page

If you are looking for fresh in-development versions, please see this page.

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).



The full C++ source code repository:
Image
- https://github.com/TheXTech/TheXTech

If you have any questions, problem reports, or suggestions, feel free to write to me!

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #2by Wohlstand » 15 Mar 2020, 23:07

A small update: I did added into the main post a link to Emscripten build which can be played in a browser now!

Emscripten (Play in browser now)
- Play game in your browser now!
Image

+KZ
Close friend
Close friend
Avatar
+KZ
Close friend
Close friend
Reputation: 2
Posts: 89
Joined: 13 Dec 2018

Post #3by +KZ » 22 Mar 2020, 3:36

this is great! Finally, smbx is for several platforms :D, although I would like an Android version to be released, since it is what I have at hand.
:ɔ ଇ ଈ :Ɖ :ɛ
GOOGLE TRANSLATE

Image
Image
Image
Image
Image


SEE MY PROJECT
lol, it's a fake link

Anuja16
Passerby
Passerby
Anuja16
Passerby
Passerby
Reputation: -5
Posts: 4
Joined: 28 Jul 2019

Post #4by Anuja16 » 28 Mar 2020, 18:18

It would be nice if you can convert the character actions and enemies actions from your reprogramming into the PGE Engine.

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #5by Olhi » 8 Apr 2020, 22:15

Oh my gawd, this is beautiful :cry:

SMBX being a webgame now will make it so much easier to get people to play it in the future!

But I am even more happy about the GNU/Linux version. This is a decade old dream coming true.

I came across an issue: For both, my wired Xinput and wireless X360 Controller, the D-Pad doesn't work, only the Analog Stick. This is true for the Linux version, and the Windows version when ran via Wine.

And a suggestion/request: Would it be possible to have the Purple Yoshi's ground pound be triggered by "Alt Run" instead of "Down"? As he is now, he is a walking death trap, which is a shame, since he could easily be one of the best Yoshis.

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #6by Wohlstand » 8 Apr 2020, 22:36

Olhi wrote:I came across an issue: For both, my wired Xinput and wireless X360 Controller, the D-Pad doesn't work, only the Analog Stick. This is true for the Linux version, and the Windows version when ran via Wine.
That I guess because of no support for arrows controls setup, I can add that support easily ;-)
You can try how PGE Engine will work with your controller to verify how arrows will work (they can be set up here). If will work fine, I'll just backport some code, otherwise I will need to use SDL_Controller API for some things.

Olhi wrote:And a suggestion/request: Would it be possible to have the Purple Yoshi's ground pound be triggered by "Alt Run" instead of "Down"? As he is now, he is a walking death trap, which is a shame, since he could easily be one of the best Yoshis.
Good idea, and there are not only purple: yellow also, and every Yosho who ate a yellow shell will also have a ground pound.
Image

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #7by Olhi » 8 Apr 2020, 22:55

Wohlstand wrote:You can try how PGE Engine will work with your controller to verify how arrows will work (they can be set up here).

Works perfectly fine!

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #8by Wohlstand » 8 Apr 2020, 22:57

Perfect! :good:
So, I'll just backport PGE Engine's joystick module and I'll allow to set up arrow keys also.
Image

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #9by Olhi » 12 Apr 2020, 11:58

Another request: When the game window loses focus, the game freezes until the focus is back. This causes 2 disadvantages:

1. During grindy moments, such as doing a 1Up-Trick, it forces me to keep my eyes on the screen when I could rather use the time to check my E-Mails or social media.

2. For Twitch Streams, when the player has to briefly stop to do something else, the music is muted, which makes the wait bothersome for viewers. This is especially problematic for Streamers without mic who have to switch between Chat Window and Game, as they interrupt the music frequently.

I recognize that this has advantages, so a good solution would be to have the game only freeze when focus is lost while on the pause menu. Maybe a hotkey to disable in-game audio would work, too.

If that's not possible, I would appreciate an option to disable the freeze entirely.

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #10by Wohlstand » 12 Apr 2020, 12:44

You want to make game never freeze when unfocused? I already have a solution:
Run game from a command line with a next argument:

Code: Select all

thextech --never-pause

(Or make a shortcut that adds this argument into the command)
And game will always run and never watch for a focused state. ;-)
Image

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #11by Olhi » 12 Apr 2020, 12:53

Wohlstand wrote:And game will always run and never watch for a focused state. ;-)

Many thanks! :hi:

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #12by Olhi » 14 Apr 2020, 0:13

I found a bug on the Linux version that occurs when starting the Classics Collection version of The Great Empire 3:

https://streamable.com/x4iuoh

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #13by Wohlstand » 14 Apr 2020, 0:19

streamable.com
Damn it won't work without Proxy, but good that I have a proxy.

I need to test this thing on my latest build to see what's wrong, however, my guess is that here is a possible case-sensitive FS path problem :wacko: (on EXT4 Meow.txt and mEoW.txt are different files while on HFS+ and FAT/NTFS a same). I have some idea for a workaround to allow case insensitive path beingn recognized correctly.
Image

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #14by Olhi » 14 Apr 2020, 0:28

Wohlstand wrote:Damn it won't work without Proxy, but good that I have a proxy.

Oh, I see. Can you recommend any convenient sites that are good for you? I like Streamable because it doesn't require an account.

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #15by Wohlstand » 14 Apr 2020, 2:26

You can upload short examples even here by a built-in forum's file uploader ;-)

Added after 12 hours 9 minutes:
Olhi wrote:streamable.com
Okay, I had to search and I found that it's really banned, and reason is absorduous:
Spoiler
https://dtf.ru/life/49487-servis-streamable-zablokirovan-na-territorii-rossii
25 апреля Роскомназдор внёс в реестр запрещённых сайтов сервис коротких видео "Streamable", согласно решению Мосгорсуда.

Иск к "Streamable" и еще одному сервису подала компания-учередитель "Матч-ТВ" (российский федеральный телеканал, сфокусированный на спорте). Основанием для подачи иска явился тот факт, что на сайте "Streamable" показывались матчи, лицензия на которые была у телеканала "Матч! Футбол 1".

Само судебное заседание прошло без присутствия обвиняемой стороны. С компании "Fastly" (владелец "Streamable") также взыскали 3 тыс. рублей госпошлины.
In a short words: because of a copyright violation: "Match-TV" have sued it because of match show publishing without license.
Image

Olhi
Contributor
Contributor
Avatar
Olhi
Contributor
Contributor
Reputation: 10
Posts: 38
Joined: 7 Apr 2020

Post #16by Olhi » 14 Apr 2020, 19:53

I'll make attachments in the future then, in addition to sharing a Streamable link.
Attachments
2020-04-13 22-58-33.mkv
"The Great Empire 3" crash on Linux version of TheXTech 1.3.1
(5.76 MiB) Downloaded 2923 times

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #17by Wohlstand » 14 Apr 2020, 20:27

Yes, it's a case sensitivity problem:
Снимок экрана от 2020-04-14 20-26-06.png
Снимок экрана от 2020-04-14 20-26-06.png (11.05 KiB) Viewed 257256 times

So, you have to manually rename or try to use PGE Maintainer's case fixer tool (be careful it's incomplete and may work incorrectly) until I'll provide a workaround.

Added after 27 minutes 54 seconds:
At least I had to test PGE Maintaner's case fixer, with an "All to lower" mode, and episode became playable.
Image

[Deleted]
[Deleted]

Post #18by [Deleted] » 16 Apr 2020, 20:25

+KZ wrote:this is great! Finally, smbx is for several platforms :D, although I would like an Android version to be released, since it is what I have at hand.

umm pge for android is here and I think pge is smbx

+KZ
Close friend
Close friend
Avatar
+KZ
Close friend
Close friend
Reputation: 2
Posts: 89
Joined: 13 Dec 2018

Post #19by +KZ » 16 Apr 2020, 21:35

Chanceux2 wrote:
+KZ wrote:this is great! Finally, smbx is for several platforms :D, although I would like an Android version to be released, since it is what I have at hand.

umm pge for android is here and I think pge is smbx


but thextech is a complete engine, pge engine is on development and still dont have all the characteristics of smbx, anyway its editor is very advanced and i use it






by the way, i have 2 suggestions for thextech:

- enable a key that skip the episode credits

- port the online feature that originally are on vanilla editor


thanks :p
Last edited by +KZ on 16 Apr 2020, 22:16, edited 2 times in total.
:ɔ ଇ ଈ :Ɖ :ɛ
GOOGLE TRANSLATE

Image
Image
Image
Image
Image


SEE MY PROJECT
lol, it's a fake link

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 32
Reputation: 513
Posts: 1846
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #20by Wohlstand » 16 Apr 2020, 21:38

+KZ wrote:- enable a key that skip the episode credits
Already can be done via ESC key, isn't that?

+KZ wrote:- port the online feature that originally are on vanilla editor
Networking for collaboration editing is planned but with a lower priority. Mainly because a base of PGE Engine is a most main goal right now. I desired to don't make anything huge on Editor side yet and pull a full effort on PGE Engine after I'll complete some preparation works I am doing now...
Image


Return to “Engine Development”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest