taxing events and variables
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
taxing events and variables
I have noticed my era is a bit slower on my laptop, and I am currently trying to rewrite some code to speed it up a bit. I use a lot of events and variables (including unit variables), as well as some menu items and was wondering if there are any events or variables that are particularly taxing on wesnoth. Thank you.
Re: taxing events and variables
what exactly is slow? does it take long to load? or maybe the AI is slow?
Re: taxing events and variables
loading speed is a little slow, but that is not big deal. turns ending/starting, recruiting, attacks. That does give me a clue for what events to look through, however I'm not sure what kind of content may be slowing the game. Is it likely just too many events? or may there be particular wml fragments that are slow to process?
Re: taxing events and variables
I think [terrain] and [terrain_mask] cause a slight delay when the new terrain is redrawn. Also, naturally if you have several large loops (like iterate over all units, doing something to each one) then that can take a perceivable amount of time too, especially if they contain a lot of costly operations like [filter_wml] (?). And the more animations and halos and such there are on-screen, the laggier everything gets, so the number of units can also be a thing.
Re: taxing events and variables
thank you. I have several filter_wml but no large loops. I think the problem may just be many events and an old laptop.