Simplifying Map Creation
I was thinking of map creation and handling multi player. Iterating through all the scripts that initialize a map but don't run again is a waste. Instead of simply having "event" types on the map, I'd like to add "init" type. This would only be run once when the map loads.
You should probably have a lot of things you can interact with. It annoying to map creator to have to specify the same two conditions on the event. In the multi player setup these will need to be checked for each player. If a player is not pressing enter, we know we could skip checking all of those. How about an "interact" type instead of "event". If it is "interact", we keep them in a separate list which is only checked when a player presses enter.

By RalmonM 30 Aug 2016 11:21
Member · 13 commentsThis seems to be a great idea for optimizing the game. Developers, what do you think?

By ShadowApex 1 Sep 2016 18:56
Lead Developer · 374 commentsI was thinking of map creation and handling multi player. Iterating through all the scripts that initialize a map but don't run again is a waste. Instead of simply having "event" types on the map, I'd like to add "init" type. This would only be run once when the map loads.
You should probably have a lot of things you can interact with. It annoying to map creator to have to specify the same two conditions on the event. In the multi player setup these will need to be checked for each player. If a player is not pressing enter, we know we could skip checking all of those. How about an "interact" type instead of "event". If it is "interact", we keep them in a separate list which is only checked when a player presses enter.
I think having an "init" type is a great idea. I also like the idea of having an "interact" type to lower the number of condition checks each frame. As long as both of these types are documented well and available for map creators, I wouldn't be opposed to adding these event types.

By dulsi 2 Sep 2016 02:01
Member · 27 commentsI think having an "init" type is a great idea. I also like the idea of having an "interact" type to lower the number of condition checks each frame. As long as both of these types are documented well and available for map creators, I wouldn't be opposed to adding these event types.
About documenting this and the previous actions I worked on, should I put the documentation on the wiki now or wait until a release with the new feature.

By bitcraft 2 Sep 2016 02:53
Champion · 167 commentsThere was some talk earlier about "init" actions. It would be a great feature. I've added a github issue to track progress on it.

By dulsi 15 Oct 2016 03:43
Member · 27 commentsI have init implemented in my repository now. I converted "Play Music" on two maps to init scripts.

By dulsi 30 Mar 2017 01:38
Member · 27 commentsAbout documenting this and the previous actions I worked on, should I put the documentation on the wiki now or wait until a release with the new feature.
I've started updating the wiki for the new actions I added like dialog_choice. I'll do the different event types next.
EDIT: Documentation for init and interact event types added.
Last edited by dulsi (30 Mar 2017 12:56)

By bitcraft 30 Mar 2017 19:12
Champion · 167 commentsSounds great dulsi. I wonder if this fixes the issue where sound doesn't play after battle? You may want to also dig around in the tuxemon source, as there are a few instances of the music being hardcoded (as I remember).
Also, the map preload feature that was implemented... Will your init events be triggered when a map is preloaded? OR will it trigger when the map is actually used?

By dulsi 30 Mar 2017 19:30
Member · 27 commentsMy first guess is that my change caused the music to not be played after battle. These changes went in a while ago but I only just got around to documenting them. I believe init events will trigger when a map is used not preloaded.
I've been busy playing with Legos mostly so I haven't done much with tuxemon recently.

By bitcraft 30 Mar 2017 21:53
Champion · 167 commentsI think many of us have taken a break from the project. It was dominating my time before I took a break. I'm still catching up now as I prepare to do some more work.... Have your changes been merged in yet? If not, feel free to open a PR and we can merge what you have so far, if you don't feel like doing documentation or clearing up the hard references to music.
Last edited by bitcraft (30 Mar 2017 22:17)

By dulsi 31 Mar 2017 02:33
Member · 27 commentsAll my changes had been merged. I wanted to wait for that before updating the documentation.
Fix for the music issue has been created. Pull request created.
By dulsi 30 Aug 2016 10:59
Member · 27 comments