RMRK RPG Maker Creation => VX => Topic started by: 104251 on May 12, 2014, 08:34:41 AM
Title: [RESOLVED][VX] Efficient eventing, distance checking and massive lag
Post by: 104251 on May 12, 2014, 08:34:41 AM
Hello.
As I'm not experienced in scripting, I do most of the things by eventing, and often it causes extreme lag ingame. I know there are ways to do things more efficiently, so I came here for your advice!
So what I want to do and how I managed it to work:
Pretty large field (17 by 29), covered in very tall grass.
Spoilerfor:
(https://drive.google.com/uc?export=view&id=0B46TossVzc2neFhIbE16Q0dlaG8) (Don't mind empty tiles, it's for testing - all of the tiles will be covered)
The grass reacts to player movements (splits when stepped on).
Insects can attack, if player steps on the wrong tile (there is a safe path, it can be navigated by carefully observing your surroundings - if grass moves near you, don't step there). If player gets caught again and again, attacks get progressively harder.
You can (if you want to) burn the whole field, but that will summon a tough boss. The fire should start at the center (wherever the player stands at) and go to the sides, until all of the grass is burned.
----------------------- I've managed to do all of it, but the last part gave me some trouble. How it works: First, the switch turns on (triggers everything else below) Then the ticker goes off as parallel process (it adds every 5 frames and counts from 1 to 29 - that's for the distance checking)