Recently, SmileBasic is released in Europe.
Now, there are 3 different SmileBASICs. JP, US, and EU versions.
If we know the region of Smile BASIC, we can add region specific stuff such as language option or different easter eggs for each region.
When SmileBASIC was released in US years ago, I made region check routine that detects JP or US system.
I used the region check in many of my games such as Slime vs Ninja.
When the game is running for the first time, SmileBASIC detects region and show Japanese title screen on JP 3DS, English title screen on US 3DS.
(language setting can be changed and saved later)
The most important aspect is the "first time" part.
Sure, you can ask player for language or region and use that information.
My routine eliminates that action.
It just detects region at start up silently. no need for user input. simple.
Now the upgraded routine can detect EU version of SmileBASIC too.
You can add special greeting for European user at the start up of game... without asking player if he/she has EU SmileBASIC.
Instructions:
How it detects the region:
SmileBoom logo sprites are different in the JP/US/EU SmileBASIC.
The region check routine simply checks the pixel of logo and determine if it is JP/US/EU SmileBASIC.
how to use:
I made region check routine as library file.
the library contains 2 routines.
REGION() - this routine returns region info as number (0 is JP, 1 is US, 2 is EU)
REGION$() - this routine returns region as string ("JP", "US", or "EU")
*WiiU version is treated as JP region.
load library file into one of slots.
activate the slot using USE command.
call region check routine at the beginning of code and save the value into some variable for later use.
LOAD "PRG1:REGION.LIB",0
USE 1
VAR A=REGION()
IF A=0 THEN ?"This is JP SmileBASIC"
IF A=1 THEN ?"This is US SmileBASIC"
IF A=2 THEN ?"This is EU SmileBASIC"
This routine is not just for game.
It can be used in other project such as graphic editor (with multi language)
Feel free to use in your project.
If this routine is used for language option, then don't forget to add language select menu.
the player may want to change language later.
Library limits :
When region check routine is called, it resets all graphics using ACLS.
so call the region check only once at the beginning of code and store value into variable and use it.
(if you use custom graphics, load custom graphics after checking the region)