*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has quit IRC (Read error: Connection reset by peer) | 03:22 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has joined #bzflag | 03:23 | |
*** spldart is now known as Foo_man_choo | 05:44 | |
*** ChanServ sets mode: -v Foo_man_choo | 05:44 | |
*** brad` <brad`!~brad@unaffiliated/brad> has quit IRC (Ping timeout: 245 seconds) | 06:09 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has quit IRC (Read error: Connection reset by peer) | 08:14 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has joined #bzflag | 08:15 | |
*** brad <brad!~brad@stupid.h-o-s-t.name> has joined #bzflag | 10:34 | |
*** brad <brad!~brad@stupid.h-o-s-t.name> has quit IRC (Changing host) | 10:34 | |
*** brad <brad!~brad@unaffiliated/brad> has joined #bzflag | 10:34 | |
*** Foo_man_choo <Foo_man_choo!~james@bzflag/contributor/spldart> has quit IRC (Remote host closed the connection) | 10:58 | |
*** Foo_man_choo <Foo_man_choo!~james@2601:2c5:c600:2365::518d> has joined #bzflag | 10:58 | |
*** Foo_man_choo <Foo_man_choo!~james@2601:2c5:c600:2365::518d> has quit IRC (Remote host closed the connection) | 11:46 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has quit IRC (Read error: Connection reset by peer) | 13:56 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has joined #bzflag | 13:56 | |
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has quit IRC (Read error: Connection reset by peer) | 15:53 | |
*** nadir <nadir!uid134094@gateway/web/irccloud.com/x-tewlownmhvusgfqa> has joined #bzflag | 18:49 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has quit IRC (Read error: Connection reset by peer) | 20:08 | |
*** Sgeo__ <Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net> has joined #bzflag | 20:09 | |
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has joined #bzflag | 21:47 | |
Zehra | In a few plug-ins, tracking the game state is required for them to operate properly. This works alright, but when having multiple plug-ins, it is excessive redundancy of code. So I am considering creating a single plug-in to track the game state and use inter-plug-in communication to minimize the amount of redundant code. | 22:23 |
---|---|---|
allejo | first, that's not something that should live in a plugin. secondly, what's redundant? | 22:25 |
Zehra | The code used for tracking the game state. | 22:26 |
blast007 | what kind of state are we talking about? | 22:26 |
Zehra | Last flag grabbed, last killer ID, last shot event...etc | 22:27 |
allejo | you're gonna have to elaborate more on the benefits of having this data available in some central location | 22:28 |
blast007 | I'm also not familiar with the performance overhead of inter-plugin communication | 22:29 |
allejo | no clue about performance, but using it isn't straightforward and limited | 22:31 |
Zehra | My thoughts are that I'll be able to avoid all this "tracking" of the game state in my plug-ins and simply have a "single" plug-in take care of that and simply get that data from the inter-plug-in communication. | 22:31 |
blast007 | what's the main motivation behind this? worried about performance, or just redundant source code? | 22:31 |
allejo | will your plugin have the ability to track when was the last time the US flag was grabbed by a non-rogue player who had a score of -5 or less? | 22:32 |
allejo | whose callsign also had 4 vowels | 22:32 |
Zehra | It's more of not having to constantly adjust and mess with a bunch of boilerplate to get something going with the part of having more maintainability. | 22:34 |
blast007 | you may be able to just have a base class that extends bzPlugin and then share that between your plugins | 22:34 |
blast007 | copying as needed, or something like plugin_utils | 22:34 |
blast007 | https://stackoverflow.com/questions/357307/how-to-call-a-parent-class-function-from-derived-class-function | 22:35 |
blast007 | have an Event method in both the parent and child class and call the parent method from the child class? never tried that myself | 22:35 |
blast007 | at least not in C++ | 22:36 |
blast007 | could have bools in the parent class like 'trackLastFlast' that controls if the parent class cares about stuff, and then registers events if needed | 22:37 |
blast007 | default them to false, and set the values of those to true in the child class Init method | 22:38 |
Zehra | I'd have to check into that a bit more as it is a bit above my current level of experience and might be a bit overly complex for my needs. | 22:41 |
*** spldart <spldart!~james@2601:2c5:c600:2365::518d> has joined #bzflag | 23:14 | |
*** spldart <spldart!~james@2601:2c5:c600:2365::518d> has quit IRC (Changing host) | 23:14 | |
*** spldart <spldart!~james@bzflag/contributor/spldart> has joined #bzflag | 23:14 | |
*** ChanServ sets mode: +v spldart | 23:14 | |
blast007 | trackLastFlag* | 23:50 |
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has joined #bzflag | 23:54 |
Generated by irclog2html.py 2.17.3.dev0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!