https://joookiwi.github.io/smm-encyclopedia
A simple project made to retrieve most (if not every) information in all 3 Super Mario Maker games. It contains:
The information is mostly based on the SMM2 game.
This project is intended to be a simple project to help on research.
It is also there give the details as simple as they can get.
More is to add once this huge project is finished.
The languages supported by the project are the ones available in the games:
- English (american & european)
- French (canadian & european)
- German
- Spanish (american & european)
- Italian
- Dutch
- Portuguese (american & european)
- Russian
- Japanese
- Chinese (traditional & simplified)
- Korean
The other languages seen in the project can include Hebrew, Polish, Ukrainian & Greek. Although, they are only there for some names.
- When giving an url example.com/path, it would be based on the browser language.
And for example.com/en-US/path, then the language would be set to American English. - Font family
- from the Super Mario Maker games
- from SMB, SMB3, SMW, NSMBU & SM3DW specifically
- Colour mode implementation (independent of each and another)
- Dark mode
- Colour-blind mode
- Search engine.
- Options that would change the URL based on the application loaded.
- Sub-pages with reactive URL.
- Secret pages
- by URL
- by key combination
- maybe other ways to create them
In order to have a clean way to navigate to the project, multiple standards have been made.
They are separated in different sections
- Import ordering
- SCSS files (for React components)
- Dependencies import
- Type import (not useful to debug)
- Real import (if used at compile time →
import type
)
- Spacing for the import is aligned for better readability
- Ordered alphabetically by group
Since some visibilities are present in other languages (like Kotlin, Java, PHP or C#), the project utilizes some standard on the visibilities.
It utilizes the Typescript system for the pre-established visibilities. Then, for those that are not in the system, it uses somme pattern for it.
Syntax | in project | in Typescript | in Javascript | Example |
---|---|---|---|---|
public [name] | public | public | public | public anExample |
[name] | package | public | public | anExample |
_[name] | protected | protected | public | protected _anExample |
__[name] #[name] |
private | private | __ -> public # -> private |
#anExample |
Folder structures the files. Most of them are self-explanatory.
Path | Meaning | Things to do |
---|---|---|
src/app | Application | |
src/core | The core elements of the project | |
src/lang | The languages | |
src/routes | The routes of the project | |
src/util | The utilities | They should me moved into separate projects |
src/bootstrap | External dependencies to Bootstrap | |
src/navigation | The application navigation (& footer) | |
src/resources | The application resources (mostly CSV files) | Move this directory outside of the src folder |
src/resources/compiled | The compiled (json files) from the CSV (this should always be empty) | |
public/[any-folder] | The images (& sounds) of the project |
The names of the files are important since some of them are for Typescript and others give meaning to them.
Syntax | Type of file | Javascript | Typescript |
---|---|---|---|
[singular-name].ts [singular-name].container.ts [singular-name].builder.ts [singular-name].component.ts |
A file declaration A file description A Builder class A React component |
No Yes Yes Yes |
Yes Yes Yes Yes |
[plural-name].types.ts [plural-name].ts |
An enumeration declaration file An enumeration file |
No Yes |
Yes Yes |
[lower-case-name].ts | Not a class, but some files or functions | Yes or No (not both) |
Yes |
The variables, methods & classes use a different format, but they all share at some point the standard.
They don't follow directly the standard, but have a general format followed.
Syntax | Description | Applicable for | Example |
---|---|---|---|
[upper-case-name] | An upper case name (using _ as a word separator) |
Constant, Enum instance |
AN_EXAMPLE |
[lower-case-name] | A lower case name (using camel case) | Variable | anExample |
[capital-case] | A capital case name (using Pascal case) | Class, Interface, Type, Dynamic import method for class |
AnExample |
[name][_[nameX]*] | Multiple different names following each others | Variable, Method |
anExample_withSomething_secret |
#[name] | (always) private |
Variable, Method |
#anExample |
$[name] | something that starts with a number (Not a PHP variable) |
Variable, Method |
$1Example |
_[name] | (always) protected |
Method | _anExample() |
__[name] | private (with private field) |
Getter & setter methods | get __anExample() { |
_[name](…) | protected with possibility of arguments(only called once by getter) |
Create methods | protected _anExample() { |
, |
Ending with a leading , |
Creation (Array / Object), Call (method / constructor), Generic type |
[a, b, c,] |
| |
(always) Before a join | Type | type AnExample = | TypeA | TypeB |
' not " |
For a string variable, ' is used instead of " (This will be changed to be recognizable by other languages) |
String → " ,Character → ' |
type AnExampleString = 'something' |
no ; |
(never) Ending with a ; |
Variable, Class, , Interface Type |
const anExample = 420 / 69 |
000_000 no 000000 |
To be less ambiguous in the reading of really long numbers | Number | const anExampleNumber = 123_456 |
null no undefined |
To be like Kotlin, Java, C#, PHP & others, the use of null is the only one for the nullable variables |
Type | type AnExample = | AType | null |
In the core (src/core/...
), the files have some formatting that each have their responsibility.
The only ones that are used outside are:
- Interface
- Enum (sometimes even in the
src/util/DynamicImporter.ts
) - The loader types (
Loader.types
)
The rest should not be used outside the same package (folder).
Format | Type | Description | Dependencies |
---|---|---|---|
[name].template.ts | Template | The template associated to the CSV file | Type |
[name].loader.ts | Loader | The file loader (main core) | Builder Template Type |
loader.types.ts | Type | Types only applicable to the file loaders | |
[name].builder.ts | Builder | The class that create the class with builder pattern methods | Template Class Enum (some times) |
[name].creator.ts | Creator | A class that create the class with a singular create method,or a stateless method createContent() |
Template Class Enum (some times) |
[name].provider.ts | Provider | The provider class that will get or create the specific instance (will never create duplicate instance) |
Interface Class |
[name].ts | Interface | The class description that is used elsewhere | Type |
Empty[name].ts | Singleton | The empty class instance | Interface |
[name].container.ts | Class | The class instance | Interface |
[plural-name].ts | Enum | Every elements as an enum instance | Loader (dynamic) |
The types used in the interface:
Type | Use case |
---|---|
boolean | Most of the time |
number | Most of the time |
string | translation key acronym name fields comment |
object | Properties |
enumeration | Properties use other scr/core elements |
Every dependency are described bellow with the direct dependency
and the indirect (via the DynamicImporter
utility class)
Name | Direct dependency | Indirect dependency |
---|---|---|
Entity | Clear condition, Limit, Entity category, Theme, Time, Game, Game style, Mystery Mushroom, Entity behaviour, Editor voice, Instrument, Version |
Entity group, Night effect |
Character name | Editor voice | |
Clear condition (SMM2) | Clear condition category | Entity |
Clear condition category (SMM2) | Clear condition | |
Limit | Entity | |
Entity projectile | Entity | |
Entity object | Entity | |
Entity category | Entity | |
Entity group | Entity | |
Theme | Time, Game |
|
Time | ||
Game reference | Game, Game style |
|
Game | Game reference | |
Game style | Game reference, Night effect |
|
Entity behaviour | Entity | |
Sound effect | Sound effect category | Entity, Entity group, Game |
Sound effect category | Sound effect | |
Course tag (SMM2) | ||
Predefined message (SMM2) | ||
Sample courses (SMM1) | Themes, Game style |
|
Medals (SMM1) | Entity, Character name |
|
Super Mario Challenges levels (SMM3DW) | ||
Job (SMM2) | Entity | |
Official notification (SMM2) | Entity, Mii costume |
|
Ninji speedrun (SMM2) | ||
Mystery Mushroom (SMM1) | ||
Mii costume (SMM2) | Mii costume category | Entity |
Mii costume category (SMM2) | Mii costume | |
Editor voice | Entity, Character name |
|
Instrument | Entity | |
Version | Game style |
Every route in the project has a reason to exist. It can either be to have a default value or to be accessible by the URL directly.
So far, the paths are separated by multiple parts:
- The optional language (
en-AM
,en-EU
,fr-CA
,fr-EU
,de
,es-AM
,es-EU
,it
,nl
,pt-AM
,pt-EU
,ru
,ja
,zh-tw
,zh-cn
orko
) - The game (
game-
+1
,3ds
and/or2
) with its defaultgame-2
- The display option (
list
,card
ortable
) - The ending paths:
Path (in the URL) | Small description |
---|---|
home |
|
about |
A small description about this application and its purpose |
source |
Those who helped and the tools used to make this application |
every/ [ power-up |ride |hat ](+ [power-up |ride |hat ]{0,2}?)/priority |
A visualisation of the priority about the power-ups, rides and hats |
every/character-name |
The character name told in the editor |
every/game-reference |
Every game referenced in any games |
every/game-style |
The game style used in the games |
every/entity |
The entities only used in the games |
every/entity-category |
The category made to group the entity (from the Super Mario Maker 2 game) |
every/entity-group |
A group of entity associated by relation, color or other kind of attributes |
[every |play |editor ]/limit |
The limit applicable and usable in the games |
[every |course |world ]/theme |
The theme (in a level or a world) |
every/sound-effect |
The sound effect placeable on any surface or entity |
every/sound-effect-category |
The category (from the Super Mario Maker 2 game) of the sound effect |
every/mii-costume |
The costume applicable to a Mii online only in Super Mario Maker 2 |
every/mii-costume-category |
The type of Mii costume that can be used only in Super Mario Maker 2 |
every-mystery-mushroom |
The Mystery Mushrooms usable only in Super Mario Maker |
every/predefined-message |
The predefined message used online |
every/sample-course |
The sample courses (in Super Mario Maker only) |
[every |official |unofficial |maker-central ]course-tag |
The course tags used online or by the community |
every/instrument |
The instrument applicable to anything that can make a sound out of a Music Block |
every-editor-voice |
The voices applicable to anything placed in the editor |
Before running the application, make sure that npm
is installed.
Then, from there,
- run
npm install
to install thenode_modules
package
To run the project, the command npm run start
is the only thing to do.
- Start the execution of the tools;
- Start the development mode;
- Reload on edits (and save);
- In the console (and command prompt), display any lint errors.
The project could also be run with npm run fast-start
to omit:
- CSV → Json (
resources/csv
→src/resources/compiled
) - Copy images for CSS (
public/*
→src/resources/images
) - Copy the locales from
resources/locale
to thesrc/lang/locale
- (Other things in the future)
By default, it will open it in the default browser automatically. If it has not worked, then open localhost:3000/smm-encyclopedia to display the application.
If it needs to be tested on other devices than the local machine, there will be another address. An example could be 192.168.4.20:3000/smm-encyclopedia.
The tests are not part of the validations on the server. They are only done locally.
It has:
- Testing the CSV files
npm run test-file
- Testing the entity types (upcoming tests)
The command to execute the test command tool is npm run test
.
Then, from that, it will start an interactive watch mode. For more details, see how to run the tests.
Since the project uses the workflow (in .github/workflows/workflow.yml), it will automatically push the changes once there is a commit in the main branch.
It automatically calls the command npm run deploy
(implicitly calling npm run predeploy
).
With the deployment, it will automatically call npm run build
and will:
- Minify of the files;
- Contain files formatted in static/js/[420.jank69].chunk.js and static/css/[420.jank69].chunk.css.
See the application's deployment to know in details how the React build is done.
The code will be pushed in the branch github-pages branch by the workflow.