FL
Pokémon Island Creator
- 2,453
- Posts
- 13
- Years
- Seen May 10, 2024
In Essentials, in weak computers and/or big maps I have lag (FPS down in truth, but I'll call lag in this topic), but only for more bottom-right positions that I go in these maps.
An example in a 150x150 map. Near the point where x=10 and y=10 (top-left) I've no lag. Near x=140 and y=10 (top-right) or x=10 and y=140 (bottom-left) or x=75, y=75 (center) I've little lag. Near x=140 and y=140 I've the big lag.
My question is: Why this occurs?
My plain is to load backward the map data when the player is more near of the end that the start. In the above example, when x=10 and y=140, I will load the y dimension backward. If I manage to do this, I will remove most of the lag (except when x=75 and y=75, the center).
I know that the Essentials use a different way to load the maps, the $MapFactory (an instance of PokemonMapFactory class) have a map for every map that is near the connections of the current map in the maps variable, and the Scene_Map control a spritesets hash that uses a map id as key and have one instance for every map in $MapFactory.maps. Every Spriteset_Map class have a tilemap variable that loads the TilemapLoader, and then the CustomTilemap. The CustomTilemap is a custom tilemap (obvious), that M A N U A L L Y done the entire system of drawing the tiles from the tilesets for each map, probably this cause to Essentials games to lag more that the standard RPG Maker XP games, since the RGSS API functions for this are more quicker than Essentials way, but I've no sure. Essentials also came with a antilag system that only update the events that are in a range (near of the screen) and the autorun and parallel processing ones.
I spend several hours making research tests, without success. And yes, I also know about connections.
I've no problem sharing with the community my discoveries, so if someone know any clue, please comment.
An example in a 150x150 map. Near the point where x=10 and y=10 (top-left) I've no lag. Near x=140 and y=10 (top-right) or x=10 and y=140 (bottom-left) or x=75, y=75 (center) I've little lag. Near x=140 and y=140 I've the big lag.
My question is: Why this occurs?
My plain is to load backward the map data when the player is more near of the end that the start. In the above example, when x=10 and y=140, I will load the y dimension backward. If I manage to do this, I will remove most of the lag (except when x=75 and y=75, the center).
I know that the Essentials use a different way to load the maps, the $MapFactory (an instance of PokemonMapFactory class) have a map for every map that is near the connections of the current map in the maps variable, and the Scene_Map control a spritesets hash that uses a map id as key and have one instance for every map in $MapFactory.maps. Every Spriteset_Map class have a tilemap variable that loads the TilemapLoader, and then the CustomTilemap. The CustomTilemap is a custom tilemap (obvious), that M A N U A L L Y done the entire system of drawing the tiles from the tilesets for each map, probably this cause to Essentials games to lag more that the standard RPG Maker XP games, since the RGSS API functions for this are more quicker than Essentials way, but I've no sure. Essentials also came with a antilag system that only update the events that are in a range (near of the screen) and the autorun and parallel processing ones.
I spend several hours making research tests, without success. And yes, I also know about connections.
I've no problem sharing with the community my discoveries, so if someone know any clue, please comment.
Last edited: