Autotiles are way too slow

Mister-ABC

Grumpy Artist
Member
Joined
Jul 20, 2018
Messages
16
Reaction score
11
First Language
luxembourgish
Primarily Uses
RMMV
The waterfall tiles moves more slow than my dead grandma and with 48x48 tiles it looks really atrocious. ...Because more frames don't seem to be possible is there any method to speed it up? ...except creating ten thousands events just for a waterfall...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
What Version is your projects core?

There was a bug with the animated tiles in 1.0 and 1.1 or so that made the animation look bad, but that had been fixed in a Version that is already years old...
 

Mister-ABC

Grumpy Artist
Member
Joined
Jul 20, 2018
Messages
16
Reaction score
11
First Language
luxembourgish
Primarily Uses
RMMV
I actually use the new one: version 1.6.1 .... but still:

 

Tea's Jams

I'm human
Global Mod
Joined
Mar 28, 2017
Messages
1,039
Reaction score
2,578
First Language
English
Primarily Uses
RMMZ
You can turn them into animated doodads if all else fails.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Update rate is locked to 2 frames per second by default. I think it's because animated tile updates can cause lag on slower devices.

Couldn't find a plugin that did this, so made something myself (attached). It seems to be working for me! ^_^ Full code in spoiler below.
Code:
//=============================================================================
// Cae_TileAnimRate.js
//=============================================================================

/*:
 * @plugindesc v1.0 - Lets you specify the rate at which animated map tiles cycle their animation.
 * @author Caethyril
 *
 * @help Plugin Commands:
 *   None.
 *
 * Compatibility:
 *   Aliases update method of the Tilemap class.
 *
 * Terms of use:
 *   Free to use and modify.
 *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 * Update log:
 *   1.0: Initial release.
 *
 * @param Tile Animation Rate
 * @text Tile Animation Rate
 * @type number
 * @min 0
 * @max 60
 * @desc Tile animation rate in frames per second.
 * Default: 2
 * @default 2
 */

var Imported = Imported || {};			// Import namespace, var can redefine
Imported.Cae_TileAnimRate = 1.0;		// Import declaration

var CAE = CAE || {};				// Author namespace, var can redefine
CAE.TileAnimRate = CAE.TileAnimRate || {};	// Plugin namespace

(function (_) {

'use strict';

	_.params = PluginManager.parameters('Cae_TileAnimRate');			// Process user parameters

	_.rate = Number(_.params['Tile Animation Rate']) || 0;

	// Adjust animationCount prior to the standard +1 per call
	_.Tilemap_update = Tilemap.prototype.update;		// Alias
	Tilemap.prototype.update = function() {
		this.animationCount += (_.rate / 2) - 1;	// -1 to balance the +1 from default code
		_.Tilemap_update.call(this);			// Callback
	};

})(CAE.TileAnimRate);
 

Attachments

Mister-ABC

Grumpy Artist
Member
Joined
Jul 20, 2018
Messages
16
Reaction score
11
First Language
luxembourgish
Primarily Uses
RMMV
Update rate is locked to 2 frames per second by default. I think it's because animated tile updates can cause lag on slower devices.

Couldn't find a plugin that did this, so made something myself (attached). It seems to be working for me! ^_^ Full code in spoiler below.
undefined
So much work for an old grumpy man? I looked into your code and didn't understood anything, have only a bit experience with C and C# -.- But yes, it works like a charm. Thanks!

...Thread close? Solution found?
 

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
506
Reaction score
422
First Language
English
Primarily Uses
RMMV
@caethyril do you think you could include either a switch or an option in the options menu to turn the effects your plugin on/off? that way, if someone's device they're playing it on is lagging with the faster frame rate of autotiles, they could turn that feature off. otherwise, nice plugin c:
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
@caethyril do you think you could include either a switch or an option in the options menu to turn the effects your plugin on/off? that way, if someone's device they're playing it on is lagging with the faster frame rate of autotiles, they could turn that feature off. otherwise, nice plugin c:
Good idea! That was also easier to do than I'd expected. Updated plugin attached, full code in spoiler like before. :kaojoy:
Code:
//=============================================================================
// Cae_TileAnimRate.js
//=============================================================================

/*:
 * @plugindesc v1.1 - Lets you specify the rate at which animated map tiles cycle their animation. Can also add an on/off switch to the in-game options.
 * @author Caethyril
 *
 * @help Plugin Commands:
 *   None.
 *
 * Compatibility:
 *   Aliases update method of the Tilemap class,
 *       and addGeneralOptions method of Window_Options.
 *   Defines new Boolean property tileAnimRate on the ConfigManager.
 *
 * Terms of use:
 *   Free to use and modify.
 *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 * Update log:
 *   1.1: Added on/off switch to the in-game options.
 *   1.0: Initial release.
 *
 * @param Tile Animation Rate
 * @text Tile Animation Rate
 * @type number
 * @min 0
 * @max 60
 * @desc Tile animation rate in frames per second.
 * Default: 2
 * @default 2
 *
 * @param Options Label
 * @text Options Label
 * @type text
 * @desc Text shown for this setting in the in-game options.
 * Leave blank to not add the option.
 * @default
 */

var Imported = Imported || {};			// Import namespace, var can redefine
Imported.Cae_TileAnimRate = 1.1;		// Import declaration

var CAE = CAE || {};				// Author namespace, var can redefine
CAE.TileAnimRate = CAE.TileAnimRate || {};	// Plugin namespace

(function (_) {

'use strict';

	_.params = PluginManager.parameters('Cae_TileAnimRate');			// Process user parameters

	_.rate  = Number(_.params['Tile Animation Rate']) || 2;
	_.label = String(_.params['Options Label']) || '';

	_.active = true;		// Default option value

	// Adjust animationCount prior to the standard +1 per call
	_.Tilemap_update = Tilemap.prototype.update;			// Alias
	Tilemap.prototype.update = function() {
		if (_.active) this.animationCount += _.rate / 2;	// animationCount cuts off at 30 so divide by 2 here
		this.animationCount -= 1;				// Cancel out +1 from default code
		_.Tilemap_update.call(this);				// Callback
	};

	// Add option to ConfigManager
	Object.defineProperty(ConfigManager, 'tileAnimRate', {
		get: function() 	{ return _.active;  },
		set: function(value) 	{ _.active = value; },
	configurable: true });

	// Adds option to Window_Options
	_.Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions;
	Window_Options.prototype.addGeneralOptions = function() {
		_.Window_Options_addGeneralOptions.call(this);
		if (_.label !== '') this.addCommand(_.label, 'tileAnimRate');
	};

})(CAE.TileAnimRate);

(Edit: as suggested, this plugin now has its own thread https://forums.rpgmakerweb.com/index.php?threads/tile-animation-rate.98377/ )
 

Attachments

Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top