...Someone Wanted!
The challenge was accepted and is on the way to full completion by Galladite27. See the progress here.Are you a native English speaker who knows his way around C++ and would like to make up to a couple hundred bucks not so easily, but with no requirement ever to get up from your chair?
Well, the world is in need of a new ONScripter-EN build with a few features and fixes backported from the main branch, and a working method to replicate the build on Windows.
I am not a programmer, but I am extremely well-versed specifically in the ONScripter-EN visual novel engine. I know its bugs, its shortcomings, and generally what it lacks compared to the other branches. It does not need a full-time maintainer (unlike PONScripter); it is almost perfect as it stands. What the engine needs in order to be useful going forward are a few small updates and bug fixes which will make it the definitive NScripter derivative.
The Requirements section consists of what must be completed satisfactorily in order for the minimum $100 to be provided. If all requirements are not done and approved by my rigorous testing (I'm a really mean scripter) no reward will be given.
The Bonuses section consists of unneeded but suggested additions to the engine. Each one completed satisfactorily shall earn you $20 more: taking the total reward up to $200 if all are completed.
Requirements:
- Backport the few commands which the main branch has over ONS-EN, including ;$ and getbgmvol.
- Backport the behavior from the main branch which allows the player to save (access the right-click menu) during choices and possibly other engine waits. This is essential for games like Tsukihime, and a certain Korean tetris script. Also backport a few select improvements from a later source code update of ONS-EN.
- Update the dependencies to their latest possible versions, and ideally, slim down each dependency to eliminate features not used by the engine, for de-bloating purposes.
- Be ready and willing to undo any change made, if it proves to do more harm than good (such as dependency updates which may add regressions, or loss of compatibility with the original NScripter).
- With all other requirements satisfied, provide a 32-bit Windows build with working DirectSound, and with all dependencies* built into the executable which will run on every Windows system from 98SE to 10, as the current ONS-EN already does.
* DirectSound apparently doesn't work unless SDL is built as an external DLL. If this cannot be fixed, leaving it external is fine.
Bonuses
- Add support for Opus music, and fix support for MOD/XM music.
- Rewrite or fix significant instances of spaghetti code, and provide proof of improvement and/or de-bloating.
- Add optional support for bitmap font rendering and proportional font rendering (but not UTF-8) to be set primarily by config or command-line option.
- Add in-engine support for multiple font files to be used in one game and switched mid-line, the ONScripter way, as in default.ttf, default2.ttf, default3.ttf, and so forth. This would allow for real bolds and italics.
- Fix or migrate ONS-EN's build system so that it may be built more painlessly on more systems. As it stands, it won't really build on anything.
Details
Concessions may be made if one requirement or bonus makes it impossible to achieve another. Payment shall be made through Paypal.
Basically, ONScripter is Japanese, and albeit still maintained, is missing many improvements which were added to ONScripter-EN. ONS-EN was abandoned in 2011, with the final rolled-out version being 2011-06-28, and the final version ever being 2011-09-30.
ONS-EN 2011-09-30 fixed some bugs and updated some dependencies and some things relating to the build system, but it also migrated the dependencies over to onscrlib, which is gone from the internet, and now outdated regardless.
To this day, ONS-EN 2011-06-28 is the only proper way to run English-translated NScripter games on Windows, or anywhere else. The translations were made for ONScripter-EN, and version 2011-06-28 still works perfectly on all the latest systems (except Mac, which is a full-time job to maintain for).
Your job basically is to take ONS-EN 2011-06-28, add improvements from ONS-EN 2011-09-30 and the latest ONScripter, update and fix dependencies, and get it built properly for Win32.
Relevant information pages are:
- The current home of the main branch of ONScripter.
- The archived home of ONScripter-EN.
- The archived information page for ONS-EN 2011-09-30.
- My resource page for ONScripter-EN and more.
Relevant sources/builds are:
- onscripter-en-20110628-fullsrc.tar.bz2 - The base ONS-EN source to be updated.
- onscripter-en-20110930-src.tar.bz2 - The later version which was reworked to use a dependency repository which is gone from the Web.
- onscripter-20220123.tar.gz (external link) - The latest source code to the main branch of ONScripter, from which we will need improvements backported.
- onscripter-en-win32_dsound-20110628.zip - The most recent surviving Windows build of ONS-EN. It is the ideal, and your final product must look and work like this, but better.
Technical Details - Requirements
1. All documented commands which have been added to ONScripter after ONScripter-EN's abandonment are: special mode setting ;$; save/load setting autosaveoff; music/SFX playback commands getbgmvol, getmp3vol, getsevol, getvoicevol.
The ;$ command is crucial as it allows custom resolutions to be set in the game script, and today is used for most NScripter games -- said games cannot be run on ONS-EN without this command. autosaveoff is used in many recent games. Each get- command only fetches current sound volume values and can be replicated with variables, but adding these would save a lot of headaches and script bugs.
2. ONScripter-EN's behavior during engine waits -- as in select, btnwait, wait, and all of their derivatives -- is to halt the processing of all inputs and commands, except the expected choice/button clicks in the case of the former two commands. In gameplay, this means that it is impossible to save a game while a choice is being displayed, which means that if you should make a wrong choice, you cannot load the game state from when the select prompt was displayed. Games with many choices presently require you to guess when a choice is about to be displayed and save before it is.
The only real solution is to make it possible to access the right-click menu (whether system or rgosub) during select, and maybe btnwait as well.
The improvements which should be backported from the ONS-EN 2011-09-30 source are as follows:
2011-09-27 Fix for textwindow not refreshing properly after loading a game, when the "setwindow" cmd is not used before saving [Mion] 2011-09-26 Fix to skip ID3v2 tags in mp3 files, since SMPEG doesn't handle them [Mion] 2011-07-03 Bugfix for text not displaying when textspeed is 0 and no clickwait [Mion]
3. An acquaintance on IRC called namtsui ported ONS-EN to OpenBSD as a one-off project, which involved updating the dependencies to their latest versions. What he found is that all dependencies could be updated, but SDL_ttf had a known regression which caused text within ONS-EN not to be rendered. Namtsui made a patch which backports the correct behavior to SDL_ttf 2.0.11.
My hope in updating all of the dependencies is that any remaining bugs will be worked out, such as one which causes audio at low or high sample rates to play sped-up or slowed-down, respectively.
The previous maintainer provided specialised versions of ONS-EN's dependencies in the "fullsrc" tarball which were slimmed down to eliminate features not used by the engine, such as SDL's extra media-playing capabilities. These now are out of date, but may be used as a reference.
4. If a change made proves to be fully detrimental to the whole program and its stability, user experience, or compatibility, be prepared to revert back to the previous state.
5. The ideal ONS-EN build will have all dependencies built into the Windows executable. If possible, try to find out why DirectSound was not working with built-in SDL. The issue may simply fix itself once SDL is updated to the latest version. DirectSound eliminates sound effect lag specifically on Windows, so it is absolutely essential to the end product.
Technical Details - Bonuses
1. (O)NScripter separates audio into compressed and uncompressed, including within it a number of compressed audio codecs that the original NScripter did not have. It should be very beneficial for the Opus codec to be added, as NScripter games often were sold on CDs, so translators would be able to rip CD audio tracks and provide their translated games with near-lossless music at much smaller file sizes than MP3 and OGG allow. As it stands, ONScripter-EN supports MP2, MP3, and OGG.
In ONS-EN version 2009-12-07, support for MOD and XM files was added, but seems no longer to work, and was removed in version 2011-09-30 due to an issue with libmodplug.
2. ONScripter is a Japanese program from around the turn of the millennium, so it is known for significantly unintuitive spaghetti code. If ONS-EN can be cleaned up, slimmed down, and made more efficient, this bonus gladly will be given.
3. Many TTF font files have bitmaps embedded, which display text in pure pixels without anti-aliasing. A config/command-line option which could force the use of a bitmap font would be appreciated, as it would lend well to the style of designers who prefer aliased text.
Additionally, add support for handling proportional fonts. Without changing text-handling fundamentally, make it possible to use a proportional font as the default.ttf by adding a command-line option which would tell SDL_ttf to recognise the given font as proportional. Otherwise, do not touch the way ONS-EN handles character size and width. It is intentionally wrong in order to match NScripter, and many translators depend on the specific width of the fonts they've chosen.
4. It should be appreciated and should open many opportunities if it were made possible to add additional default.ttf files, to be switched within game scripts with a new command specific to ONS-EN. For example, the engine can be halted for one second by placing !w1000 within an English line, so we might add !f2 to switch to a provided default2.ttf.
Multiple fonts in one game would make it possible for English translations to use italic and bold typefaces for emphasis, in addition to different typefaces for different modes of storytelling.
5. The previous maintainer had considered migrating ONS-EN to autoconf at some point due to the issues which were turning up as a result of the basic ./configure and make build system. See what proves to be most practical for getting ONS-EN to build more reliably.
Updates Intentionally Omitted
There are improvements added to the main branch of ONScripter and other derivatives which are popular, but which we will not be pursuing for ONScripter-EN. These are:
1. Lua support. Lua was added to NScripter for all versions after 2.82. It since has been added to the main branch of ONScripter, but we will not be pursuing it for ONScripter-EN because I believe it is unnecessary bloat. I have worked with two NScripter games which used Lua, and they were impossible or near-impossible to translate because they required an Lua programmer; not an NScript scripter. It may be possible to hack an Lua-based NScripter game to support English properly even on ONScripter proper, so why would you want Lua in ONS-EN?
2. UTF-8 support. This will be controversial, but UTF-8 support is best left out of ONScripter-EN in order to maintain its practically perfect compatibility with Japanese NScripter games. NScripter uses Shift-JIS and nothing else, and so does ONS-EN. UTF-8 support is the reason for PONScripter and ONSlaught, and rudimentary support has been added to ONS, so ONS-EN does not need to be weighted down with it.
3. Vector graphics support. This was added to ONSlaught. I think it's a bad idea.
If you want UTF-8, go develop PONScripter or ONSlaught. Both engines are in desperate need of a new maintainer.
Contact Me
If you have read all of this and still are not deterred, you may contact me on Discord @chaoskaiser72#3969, by e-mail chaoskaiser72 (at) yandex (dot) com, or arrange for us to communicate somewhere on IRC.