Properties:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
RPM.PATH_BR |
string |
<optional> |
"" | |
RPM.ROOT_DIRECTORY_LOCAL |
string |
<optional> |
"." | |
RPM.PATH_FILES |
string |
<optional> |
"file:///" | |
RPM.PATH_DATAS |
string |
<optional> |
Platform.ROOT_DIRECTORY + "/Content/Datas/" | |
RPM.EXTENSION_JSON |
string |
<optional> |
".json" | |
RPM.FILE_MAPS |
string |
<optional> |
RPM.PATH_DATAS + "Maps/" | |
RPM.FILE_MAP_INFOS |
string |
<optional> |
"/infos" + RPM.EXTENSION_JSON | |
RPM.FILE_MAP_OBJECTS |
string |
<optional> |
"/objects" + RPM.EXTENSION_JSON | |
RPM.FILE_PICTURES_DATAS |
string |
<optional> |
RPM.PATH_DATAS + "pictures" + RPM.EXTENSION_JSON | |
RPM.FILE_VIDEOS_DATAS |
string |
<optional> |
RPM.PATH_DATAS + "videos" + RPM.EXTENSION_JSON | |
RPM.FILE_SONGS_DATAS |
string |
<optional> |
RPM.PATH_DATAS + "songs" + RPM.EXTENSION_JSON | |
RPM.FILE_SHAPES_DATAS |
string |
<optional> |
RPM.PATH_DATAS + "shapes" + RPM.EXTENSION_JSON | |
RPM.FILE_COMMON_EVENTS |
string |
<optional> |
RPM.PATH_DATAS + "commonEvents" + RPM.EXTENSION_JSON | |
RPM.FILE_ITEMS |
string |
<optional> |
RPM.PATH_DATAS + "items" + RPM.EXTENSION_JSON | |
RPM.FILE_SKILLS |
string |
<optional> |
RPM.PATH_DATAS + "skills" + RPM.EXTENSION_JSON | |
RPM.FILE_WEAPONS |
string |
<optional> |
RPM.PATH_DATAS + "weapons" + RPM.EXTENSION_JSON | |
RPM.FILE_ARMORS |
string |
<optional> |
RPM.PATH_DATAS + "armors" + RPM.EXTENSION_JSON | |
RPM.FILE_HEROES |
string |
<optional> |
RPM.PATH_DATAS + "heroes" + RPM.EXTENSION_JSON | |
RPM.FILE_MONSTERS |
string |
<optional> |
RPM.PATH_DATAS + "monsters" + RPM.EXTENSION_JSON | |
RPM.FILE_TROOPS |
string |
<optional> |
RPM.PATH_DATAS + "troops" + RPM.EXTENSION_JSON | |
RPM.FILE_BATTLE_SYSTEM |
string |
<optional> |
RPM.PATH_DATAS + "battleSystem" + RPM.EXTENSION_JSON | |
RPM.FILE_TITLE_SCREEN_GAME_OVER |
string |
<optional> |
RPM.PATH_DATAS + "titlescreenGameover" + RPM.EXTENSION_JSON | |
RPM.FILE_KEYBOARD |
string |
<optional> |
RPM.PATH_DATAS + "keyBoard" + RPM.EXTENSION_JSON | |
RPM.FILE_SYSTEM |
string |
<optional> |
RPM.PATH_DATAS + "system" + RPM.EXTENSION_JSON | |
RPM.FILE_CLASSES |
string |
<optional> |
RPM.PATH_DATAS + "classes" + RPM.EXTENSION_JSON | |
RPM.FILE_TILESETS_DATAS |
string |
<optional> |
RPM.PATH_DATAS + "tilesets" + RPM.EXTENSION_JSON | |
RPM.FILE_SPECIAL_ELEMENTS |
string |
<optional> |
RPM.PATH_DATAS + "specialElements" + RPM.EXTENSION_JSON | |
RPM.FILE_VARIABLES |
string |
<optional> |
RPM.PATH_DATAS + "variables" + RPM.EXTENSION_JSON | |
RPM.FILE_SETTINGS |
string |
<optional> |
RPM.PATH_DATAS + "settings" + RPM.EXTENSION_JSON | |
RPM.FILE_DLCS |
string |
<optional> |
RPM.PATH_DATAS + "dlcs" + RPM.EXTENSION_JSON | |
RPM.FILE_ANIMATIONS |
string |
<optional> |
RPM.PATH_DATAS + "animations" + RPM.EXTENSION_JSON | |
RPM.PATH_PICTURES |
string |
<optional> |
"/Content/Images" | |
RPM.PATH_VIDEOS |
string |
<optional> |
"/Content/Videos" | |
RPM.PATH_HUD |
string |
<optional> |
RPM.PATH_PICTURES + "/HUD/" | |
RPM.PATH_TEXTURES2D |
string |
<optional> |
RPM.PATH_PICTURES + "/Textures2D/" | |
RPM.PATH_BARS |
string |
<optional> |
RPM.PATH_HUD + "Bars" | |
RPM.PATH_FACESETS |
string |
<optional> |
RPM.PATH_HUD + "Facesets" | |
RPM.PATH_ICONS |
string |
<optional> |
RPM.PATH_HUD + "Icons" | |
RPM.PATH_WINDOW_SKINS |
string |
<optional> |
RPM.PATH_HUD + "WindowSkins" | |
RPM.PATH_TITLE_SCREEN |
string |
<optional> |
RPM.PATH_HUD + "TitleScreen" | |
RPM.PATH_HUD_PICTURES |
string |
<optional> |
RPM.PATH_HUD + "Pictures" | |
RPM.PATH_ANIMATIONS |
string |
<optional> |
RPM.PATH_HUD + "Animations" | |
RPM.PATH_AUTOTILES |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Autotiles" | |
RPM.PATH_CHARACTERS |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Characters" | |
RPM.PATH_TILESETS |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Tilesets" | |
RPM.PATH_WALLS |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Walls" | |
RPM.PATH_BATTLERS |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Battlers" | |
RPM.PATH_OBJECTS_3D |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Objects3D" | |
RPM.PATH_MOUNTAINS |
string |
<optional> |
RPM.PATH_TEXTURES2D + "Mountains" | |
RPM.PATH_SKYBOXES |
string |
<optional> |
RPM.PATH_TEXTURES2D + "SkyBoxes" | |
RPM.PATH_SONGS |
string |
<optional> |
"/Content/Songs/" | |
RPM.PATH_MUSICS |
string |
<optional> |
RPM.PATH_SONGS + "Musics" | |
RPM.PATH_BACKGROUND_SOUNDS |
string |
<optional> |
RPM.PATH_SONGS + "BackgroundSounds" | |
RPM.PATH_SOUNDS |
string |
<optional> |
RPM.PATH_SONGS + "Sounds" | |
RPM.PATH_MUSIC_EFFECTS |
string |
<optional> |
RPM.PATH_SONGS + "MusicEffects" | |
RPM.PATH_SHAPES |
string |
<optional> |
"/Content/Shapes/" | |
RPM.PATH_OBJ |
string |
<optional> |
RPM.PATH_SHAPES + "OBJ" | |
RPM.PATH_MTL |
string |
<optional> |
RPM.PATH_SHAPES + "MTL" | |
RPM.PATH_OBJ_COLLISIONS |
string |
<optional> |
RPM.PATH_SHAPES + "Collisions" | |
RPM.PATH_SHADERS |
string |
<optional> |
RPM.PATH_DATAS + "Scripts/System/shaders/" | |
RPM.PATH_SAVES |
string |
<optional> |
RPM.PATH_DATAS + "Saves" | |
RPM.SMALL_FONT_SIZE |
number |
<optional> |
8 | |
RPM.MEDIUM_FONT_SIZE |
number |
<optional> |
10 | |
RPM.BASIC_SQUARE_SIZE |
number |
<optional> |
32 | |
RPM.BATLLER_STEPS |
number |
<optional> |
9 | |
RPM.SMALL_SLOT_HEIGHT |
number |
<optional> |
30 | |
RPM.MEDIUM_SLOT_WIDTH |
number |
<optional> |
200 | |
RPM.MEDIUM_SLOT_HEIGHT |
number |
<optional> |
40 | |
RPM.LARGE_SLOT_HEIGHT |
number |
<optional> |
60 | |
RPM.MEDIUM_SPACE |
number |
<optional> |
5 | |
RPM.LARGE_SPACE |
number |
<optional> |
10 | |
RPM.HUGE_SPACE |
number |
<optional> |
20 | |
RPM.PORTIONS_RAY_FAR |
number |
<optional> |
0 | |
RPM.PORTION_SIZE |
number |
<optional> |
16 | |
RPM.MAX_PICTURE_SIZE |
number |
<optional> |
4096 | |
RPM.SCREEN_X |
number |
<optional> |
640 | |
RPM.SCREEN_Y |
number |
<optional> |
480 | |
RPM.NONE_PADDING |
Array.<number> |
<optional> |
[0, 0, 0, 0] | |
RPM.VERY_SMALL_PADDING_BOX |
Array.<number> |
<optional> |
[5, 5, 5, 5] | |
RPM.SMALL_PADDING_BOX |
Array.<number> |
<optional> |
[10, 10, 10, 10] | |
RPM.MEDIUM_PADDING_BOX |
Array.<number> |
<optional> |
[20, 20, 20, 20] | |
RPM.HUGE_PADDING_BOX |
Array.<number> |
<optional> |
[30, 30, 30, 30] | |
RPM.DIALOG_PADDING_BOX |
Array.<number> |
<optional> |
[30, 50, 30, 50] | |
RPM.SMALL_SLOT_PADDING |
Array.<number> |
<optional> |
[10, 5, 10, 5] | |
RPM.ONE_SECOND_MILLI |
number |
<optional> |
1000 | |
RPM.NUM_BOOL_TRUE |
number |
<optional> |
1 | |
RPM.NUM_BOOL_FALSE |
number |
<optional> |
0 | |
RPM.COEF_TEX |
number |
<optional> |
0.2 | |
RPM.LOADING_MIN_DELAY |
number |
<optional> |
100 | |
RPM.CLASS_HIDDEN |
string |
<optional> |
"hidden" | |
RPM.STRING_RGBA |
string |
<optional> |
"rgba" | |
RPM.STRING_EMPTY |
string |
<optional> |
"" | |
RPM.STRING_PARENTHESIS_LEFT |
string |
<optional> |
"(" | |
RPM.STRING_PARENTHESIS_RIGHT |
string |
<optional> |
")" | |
RPM.STRING_BRACKET_LEFT |
string |
<optional> |
"[" | |
RPM.STRING_BRACKET_RIGHT |
string |
<optional> |
"]" | |
RPM.STRING_COMA |
string |
<optional> |
"," | |
RPM.STRING_COLON |
string |
<optional> |
":" | |
RPM.STRING_SLASH |
string |
<optional> |
"/" | |
RPM.STRING_NEW_LINE |
string |
<optional> |
"\n" | |
RPM.STRING_EQUAL |
string |
<optional> |
"=" | |
RPM.STRING_DASH |
string |
<optional> |
"-" | |
RPM.STRING_SPACE |
string |
<optional> |
" " | |
RPM.STRING_ZERO |
string |
<optional> |
"0" | |
RPM.UNDEFINED |
string |
<optional> |
'undefined' | |
RPM.NUMBER |
string |
<optional> |
"number" | |
RPM.STRING |
string |
<optional> |
"string" | |
RPM.TAG_BOLD |
string |
<optional> |
"b" | |
RPM.TAG_ITALIC |
string |
<optional> |
"i" | |
RPM.TAG_LEFT |
string |
<optional> |
"l" | |
RPM.TAG_CENTER |
string |
<optional> |
"c" | |
RPM.TAG_RIGHT |
string |
<optional> |
"r" | |
RPM.TAG_SIZE |
string |
<optional> |
"size" | |
RPM.TAG_FONT |
string |
<optional> |
"font" | |
RPM.TAG_TEXT_COLOR |
string |
<optional> |
"textcolor" | |
RPM.TAG_BACK_COLOR |
string |
<optional> |
"backcolor" | |
RPM.TAG_STROKE_COLOR |
string |
<optional> |
"strokecolor" | |
RPM.TAG_VARIABLE |
string |
<optional> |
"var" | |
RPM.TAG_PARAMETER |
string |
<optional> |
"par" | |
RPM.TAG_PROPERTY |
string |
<optional> |
"pro" | |
RPM.TAG_HERO_NAME |
string |
<optional> |
"hname" | |
RPM.TAG_ICON |
string |
<optional> |
"ico" | |
RPM.DEFAULT_FONT |
string |
<optional> |
"sans-serif" | |
RPM.JSON_KEY |
string |
<optional> |
"k" | |
RPM.JSON_VALUE |
string |
<optional> |
"v" | |
RPM.COLOR_GREEN |
SystemColor |
<optional> |
SystemColor.createColor(25, 214, 25) | |
RPM.COLOR_RED |
SystemColor |
<optional> |
SystemColor.createColor(216, 33, 17) | |
RPM.COLOR_WHITE |
SystemColor |
<optional> |
SystemColor.createColor(255, 255, 255) | |
RPM.COLOR_BLACK |
SystemColor |
<optional> |
SystemColor.createColor(0, 0, 0) | |
RPM.elapsedTime |
number |
<optional> |
0 | |
RPM.averageElapsedTime |
number |
<optional> |
0 | |
RPM.lastUpdateTime |
number |
<optional> |
new Date().getTime() | |
RPM.keysPressed |
Array.<number> |
<optional> |
new Array | |
RPM.fontSize |
number |
<optional> |
13 | |
RPM.fontName |
string |
<optional> |
"sans-serif" | |
RPM.escaped |
boolean |
<optional> |
false | |
RPM.blockingHero |
boolean |
<optional> |
false | |
RPM.game |
Game |
<optional> |
null | |
RPM.textureLoader |
THREE.TextureLoader |
<optional> |
new THREE.TextureLoader() | |
RPM.requestPaintHUD |
boolean |
<optional> |
true | |
RPM.currentObject |
MapObject |
<optional> |
null | |
RPM.currentParameters |
Array.<SystemParameter> |
<optional> |
null | |
RPM.currentMap |
SceneMap |
<optional> |
null | |
RPM.currentReaction |
ReactionInterpreter |
<optional> |
null | |
RPM.displayedPictures |
Array.<Picture2D> |
<optional> |
[] | |
RPM.screenTone |
THREE.Vector4 |
<optional> |
new THREE.Vector4(0, 0, 0, 1) | |
RPM.allowSaves |
boolean |
<optional> |
true | |
RPM.allowMainMenu |
boolean |
<optional> |
true | |
RPM.isInMainMenu |
boolean |
<optional> |
false | |
RPM.BB_BOX |
THREE.Mesh |
<optional> |
MapPortion.createBox() | |
RPM.BB_BOX_DETECTION |
THREE.Mesh |
<optional> |
MapPortion.createBox() | |
RPM.BB_BOX_DEFAULT_DETECTION |
THREE.Mesh |
<optional> |
MapPortion.createBox() | |
RPM.BB_ORIENTED_BOX |
THREE.Mesh |
<optional> |
MapPortion.createOrientedBox() | |
RPM.OBJ_LOADER |
THREE.OBJLoader |
<optional> |
new THREE.OBJLoader() | |
RPM.CUBE_TEXTURE_LOADER |
THREE.CubeTextureLoader |
<optional> |
new THREE.CubeTextureLoader() | |
RPM.operators_compare |
function | |||
RPM.operators_numbers |
function |
Members
-
Check if a file exists
-
Open an existing file
-
Open and parse an existing file
-
Write a json file
-
Link the fontSize and the fontName to a string that can be used by the canvasHUD
-
Extract the z center from position
-
Draw HUD for the current stack
Methods
-
Describe a javascript object
Name Type Description obj
Object The javascript object Returns:
Type Description string -
Show alert dialog box
Name Type Description text
string text to display -
Return a string of the date by passing all the seconds
Name Type Description total
number Total number of seconds Returns:
Type Description string -
Return the string of a number and parse with 0 according to a given size
Name Type Description num
number Number size
number Max number to display Returns:
Type Description string -
Generate the map name according to the ID
Name Type Description id
number ID of the map Returns:
Type Description string -
Transform a json position to index position on X/Z axis
Name Type Description position
Array.<number> The json position Returns:
Type Description number -
Transform a quare position to index position on X/Z axis
Name Type Description position
Array.<number> The json position Returns:
Type Description number -
Transform a json position to a THREE.Vector3
Name Type Description position
Array.<number> The json position Returns:
Type Description THREE.Vector3 -
Transform a json position to a THREE.Vector3
Name Type Description position
Array.<number> The json position Returns:
Type Description THREE.Vector3 -
Get the complete number of Y of a position
Name Type Description position
Array.<number> The json position Returns:
Type Description number -
Extract the layer from position
Name Type Description position
Array.<number> The json position Returns:
number -
Extract the x center from position
Name Type Description position
Array.<number> The json position Returns:
number -
Extract the angle from position
Name Type Description position
Array.<number> The json position Returns:
number -
Extract the angle from position
Name Type Description position
Array.<number> The json position Returns:
number -
Extract the angle from position
Name Type Description position
Array.<number> The json position Returns:
number -
Get the pixel position transformation according to screen size
Name Type Description x
number The position on screen Returns:
Type Description number -
Get the pixel position transformation according to screen size
Name Type Description y
number The position on screen Returns:
Type Description number -
Get the pixel position transformation according to screen size
Name Type Description xy
number The position on screen Returns:
Type Description number -
Get the min pixel position transformation according to screen size
Name Type Description xy
number The position on screen Returns:
Type Description number -
Get the pixel position transformation according to screen size, but without rounding it
Name Type Description x
number The position on screen Returns:
Type Description number -
Get the pixel position transformation according to screen size, but without rounding it
Name Type Description y
number The position on screen Returns:
Type Description number -
Get the position according to the square size
Name Type Description x
number The position Returns:
Type Description number -
Get the number of fields of an object
Name Type Description obj
Object The object to count fields Returns:
Type Description number -
Check if an array is empty
Name Type Description array
Array.<any> The array to test Returns:
Type Description boolean -
Get the cos
Name Type Description w
number The value Returns:
Type Description number -
Get the sin
Name Type Description w
number The value Returns:
Type Description number -
Get portion according to a position
Name Type Description position
THREE.Vector3 The position Returns:
Type Description Array.<number> -
Get portion according to array position
Name Type Description p
Array.<number> The array position Returns:
Type Description Array.<number> -
Get an array position according to position
Name Type Description position
THREE.Vector3 The position Returns:
Type Description Array.<number> -
Check if two portions are equals
Name Type Description portion1
Array.<number> portion2
Array.<number> Returns:
Type Description boolean -
Show an error object
Name Type Description e
Error The error message -
Show an error message
Name Type Description msg
string The error message -
Give a modulo without negative value
Name Type Description x
number m
number Returns:
Type Description number -
Get the list max ID
Name Type Description list
Array.<number> A list containing only IDs Returns:
Type Description number -
Create a new array list initialed with null everywhere
Name Type Description size
number The list size Returns:
Type Description Array.<any> -
Create a random number between min and max
Name Type Description min
number max
number Returns:
Type Description number -
Load a texture
Name Type Description path
string The path of the texture Returns:
Type Description THREE.ShaderMaterial -
Load a texture empty
Returns:
Type Description THREE.MeshBasicMaterial -
Create a material from texture.
Returns:
Type Description THREE.ShaderMaterial -
Update the background color
Name Type Description color
SystemColor -
Convert 3D vector to a 2D point on screen
Name Type Description vector
THREE.Vector3 The 3D vector camera
THREE.Camera The three.js camera Returns:
Type Description THREE.Vector2 -
Get random value according to value and variance
Name Type Description value
number variance
number Returns:
Type Description number -
Eval a formula
Name Type Description formula
string The formula user
GamePlayer The user target
GamePlayer The target damage
number Damage value Returns:
Type Description any -
Eval a script
Name Type Description script
string The script Returns:
Type Description any -
Check if formula contains user string
Name Type Description formula
string The formula Returns:
Type Description boolean -
Check if formula contains target string
Name Type Description formula
string The formula Returns:
Type Description boolean -
Return default value if undefined, else the value
Name Type Description value
any The value defaultValue
any The default value Returns:
Type Description any -
Check if the value is undefined
Name Type Description value
any The value Returns:
Type Description boolean -
Check if the value is a number
Name Type Description value
any The value Returns:
Type Description boolean -
Check if the value is a string
Name Type Description value
any The value Returns:
Type Description boolean -
Convert a number to boolean
Name Type Description num
number The number Returns:
Type Description boolean -
Convert a boolean to number
Name Type Description b
boolean The boolean Returns:
Type Description number -
Convert number to string
Name Type Description n
number The number Returns:
Type Description string -
Get the index of an object in a array containing a property with a specific value
Name Type Description array
Array.<Object> The array to check attr
string The attribute of the object to check value
any The value to check on the object attribute Returns:
Type Description number -
Read a json list and create a system list sorted by ID
Name Type Default Description jsonList
Array.<Object> The json list to read func
function The function to apply isConstructor
boolean true optional Indicate if the function is a constructor class Returns:
Type Description Array.<any> -
Read a json list and create a system list sorted by index
Name Type Default Description jsonList
Array.<Object> The json list to read func
function The function to apply isConstructor
boolean true optional Indicate if the function is a constructor class Returns:
Type Description Array.<any> -
Read a json list and create a system list by ID and another list by index (containing IDs), and return the max possible ID
Name Type Default Description jsonList
Array.<Object> The json list to listIDs
Array.<any> The system list by ID listIndexes
Array.<number> The IDs list by index func
function The function to apply isConstructor
boolean true optional Indicate if the function is a constructor class Returns:
Type Description number -
Read a json list and create a hash list
Name Type Default Description jsonList
Array.<Object> The json list to read func
function The function to apply isConstructor
boolean true optional Indicate if the function is a constructor class Returns:
Type Description Array.<any> -
Try catch for async functions
Name Type Description func
function The async function to apply Returns:
Type Description any -
Initialize the game stack and datas
-
Load the game stack and datas
-
Clear the HUD canvas
-
Initialize the openGL stuff
-
Set the camera aspect while resizing the window
-
Update the current stack
-
First key press handle for the current stack
Name Type Description key
number The key ID pressed -
First key release handle for the current stack
Name Type Description key
number The key ID released -
Key pressed repeat handle for the current stack
Name Type Description key
number The key ID pressed Returns:
Type Description boolean false if the other keys are blocked after it -
Key pressed repeat handle for the current stack, but with a small wait after the first pressure (generally used for menus)
Name Type Description key
number The key ID pressed Returns:
Type Description boolean false if the other keys are blocked after it -
Draw the 3D for the current stack
-
Main loop of the game