#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2014-07-13

Timestamps are in GMT/BST.

01:30:35fordcarsNight!
01:31:35fordcarsI'll be away for around 2 weeks, going up north, so, no internet (probably). So, see you in 2 weeks!
01:31:38fordcars Quit (Quit: Page closed)
02:04:14destroyerimo_clo has joined
02:04:53destroyerimo Quit (Ping timeout: 240 seconds)
02:09:00Watusimoto has joined
02:18:43Watusimoto Quit (Remote host closed the connection)
05:06:18Watusimoto has joined
07:04:18Flynnn Quit (Quit: This computer has gone to sleep)
07:29:30sam686 has joined
07:29:30ChanServ sets mode +v
07:37:48Flynnn has joined
08:02:06Flynnn Quit (Quit: This computer has gone to sleep)
09:58:35raptor has joined
09:58:35ChanServ sets mode +o
09:58:44raptorgood morning!
10:03:02raptorWatusimoto: if you're around - I'd like to solve the GameSettings issues once and for all
10:03:39raptorright now we're in this quasi state where I finally got the game to load, but no settings are actually loaded
10:03:56raptorI was discussing this with kaen last night, and I think we should do one of two things:
10:05:04raptor1. make a true singleton out of GameSettings, doing it like this: https://stackoverflow.com/questions/1008019/c-singleton-design-pattern/1008289#1008289
10:05:42raptorthen we'd just do GameSettings::get() or something like that whenever we want it. But we'd have to provide an override for tests that set up their own GameSettings object
10:06:13raptor2. Don't use a singleton and just bass the GameSettings* to the UI class, then just use mSettings from the editor
10:06:41raptorafter reading a lot about singletons and global objects, I'm starting to favor #2 over a global like we have now
10:06:49raptorthoughts?
10:24:23Watusimoto Quit (Ping timeout: 240 seconds)
10:28:22sam686in project 'master' fatal error LNK1104: cannot open file 'master_lib.dir\$(OutDir)\database.obj'
10:28:47sam686but if I rename Debug directory into $(OutDir) it then works
10:29:38raptorhi sam686, everything is broken at the moment - watusimoto has started changing the GameSettings architecture, and I'm not sure what exactly we should do about it
10:29:39sam686interesting that this isn't the problem on 'bitfghter' which also use $(OutDir)
10:29:50raptoryou make have to do a 'make clean
10:31:14raptor*maybe
10:32:54sam686trying a cmake again, then full clean and rebuild
10:35:30sam686now it seems to work fine, except the 'test' errors. http://sam6.25u.com/upload/text1407/140713_09-34-15.txt
10:35:41raptoryes
10:35:50raptorthose are broken because of the new gSettings object
10:35:56raptormuch of the game is broken, in fact
10:36:14raptorbitfighter doesn't load the settings from the INI anymore and will overwrite the old ones when exiting
10:36:39sam686oh my the way, notice the 'Win64" part? After finding 64 bit libraries and DLLs it runs ok
10:36:39raptorri want to talk over a solution with watusimoto, then fix it
10:36:46raptoroh really?
10:36:52raptorthat's great!
10:38:20sam686now i get "Unable to connect ot master" but it worked on earliear revisions as 64 bit windows build
10:40:07sam686theres an obvious problem of something not reading my bitfighter.ini
10:40:21raptoryep, that's one of them
10:40:44sam686because of that, it can't find any levels to host/edit
10:41:39raptoryes, same problem here
10:43:36raptori don't want to change much right now until I can talk to watusimoto - he's playing with the code a lot..
10:43:54BFLogBot Commit: bb59f1eabf | Author: sam8641 | Message: Fixed some compile errors
10:44:17sam686There is a small cmake change (added one line)
10:44:26raptori see it, thanks!
10:46:46sam686AT some revision earliear, where ini loading and saving did worked (mostly), the volumes keeps going to zero (mute)
10:47:06raptoryes, there is also a config issue that many values fail to actually work
10:49:59sam686Im starting to see more global variable, like gSettings
10:50:27raptoryes, i'm not sure that's a good idea...
10:51:34sam686I was thinking of combining 2 separate master connection into 1 when hosting, as of now in 019, it creates a second connection to master when hosting (or testing from editor)
11:58:07raptorI have to go, but, I have gSettings actually working now and loading some settings (others still don't work)
11:58:18destroyerimo_clo Quit (Ping timeout: 240 seconds)
11:58:20raptorbut I don't want to check in my changes until i talk to watusimoto
11:58:27raptorso later!
11:58:32raptor Quit ()
11:58:40Watusimoto has joined
13:34:22LordDVG has joined
13:48:58Watusimoto Quit (Ping timeout: 240 seconds)
13:56:20YoshiSmb has joined
13:56:35YoshiSmbhi guys
14:19:49YoshiSmb Quit (Ping timeout: 246 seconds)
14:33:48YoshiSmb has joined
14:50:58YoshiSmb Quit (Ping timeout: 246 seconds)
14:53:10Flynnn has joined
15:47:07Watusimoto has joined
15:48:44Flynnn Quit (Quit: This computer has gone to sleep)
16:43:23Flynnn has joined
16:56:45raptor has joined
16:56:46ChanServ sets mode +o
16:56:50raptorgood day!
17:08:03raptorWatusimoto: may I refer you to my question this morning: http://bitfighter.org/irclogs/?date=2014-07-13#l17
17:08:22WatusimotoI'll reply after the match is over... 1/2 hr!
17:08:28raptorhaha ok
17:38:27Flynnn Quit (Quit: This computer has gone to sleep)
17:47:48Flynnn has joined
17:48:08Flynnn Quit (Client Quit)
17:57:45raptorha
17:57:51raptorGermany pulled it off at the end
18:04:45Watusimotohi
18:04:47Watusimotoyes
18:04:59Watusimotonot the most awesome game, but the last 15 mins or so was exciting
18:05:15WatusimotoI was hoping germany would win, and I thought they would, so I am happy with the outcome
18:05:23Watusimotoso
18:05:44Watusimotoyour question about the singleton vs. global objects?
18:05:54Watusimotois that what you wanted to discuss?
18:06:09raptornot vs
18:06:19raptorsince a singleton is global in the instance
18:06:31Watusimotoyes
18:06:34raptordid you read my question from this morning?
18:06:48Watusimotowith the 2 options you presented?
18:06:49LordDVG Quit (Remote host closed the connection)
18:06:54raptoryes...
18:06:56Watusimotoif so, yes
18:07:09raptorright now our code base is in a weird state
18:07:16raptorand I want to make it go one way or the other
18:07:23Watusimotoso the issue I see with putting settings on the UI object is that the server can't access it there
18:07:44raptorah ok, and that's why it was chosen to put on Game before
18:07:50Watusimotoand we don't want to have two different ways to get it, depending on whether we;re server or client
18:07:56Watusimotothat would obviuosly suck
18:08:24Watusimotoso before there was always a game; now there isn't... well there is, but not all objects have a good connection to it anymore
18:08:25raptoryeah
18:08:46Watusimotohence the global
18:08:52raptorI wasn't thinking of putting it exclusively on UI, but just passing the pointer around to wherever we needed it
18:08:56Watusimotobut I take it you are experiencing initialization issues
18:09:08raptoryes, so initialization issues are not fun
18:09:12Watusimotono
18:09:26raptorlet me get you a quick diff...
18:09:36Watusimotoso we need a way to ensure that we don't have them anymore
18:10:13raptoryes, and I did that... one moment with the diff
18:10:45raptorlike this: http://pastie.org/9386915
18:11:04raptorthis solves initialization issues, with the following 2 downsides:
18:11:13sam686extern int a; int b = a; int a = b; something like that is the problem, if it were string instead of int it may crash before running main()
18:11:18raptor1. We have to specify GameSettings::get() everywhere
18:11:39raptor2. Tests become difficult since there is only ever *one* object
18:14:25raptor#1 is a downside because of verbosity...
18:14:51sam686you could get rid of gSettings, and put GameSettingsPtr mSettings; everywhere gamesettings needed, all pointing to the same single gamesettings
18:16:55Watusimotothe testing is manageable, I think
18:17:10Watusimotoyou can reset the global object to some state before running your tests
18:17:23Watusimotobut I do not like the ::get() bit
18:17:31Watusimotomainly for aesthetic reasons
18:17:36Watusimotoand verbosity
18:18:15Watusimotowe could, I suppose, revert to passing a settings object around everywhere
18:18:29Watusimotothough i don't really like that
18:18:57Watusimotobut it is probably the best solution from a technical standpoint
18:20:45raptor#typedef GameSettings::get() gGameSettings
18:21:24raptori wonder if we shouldn't be using typedefs more specifically for the aesthetic purposes
18:21:59raptorIf we just pass settings* everywhere, then we don't have to change much infrastructure
18:22:14raptorI can think of two major places that need it: UI and BfObject
18:22:17raptorbut...
18:22:36raptoranother idea: We could have a Bitfighter object
18:22:54raptorwhich sort of becomes the new Game, but really is the whole-program-level wrapper
18:23:05raptorand it would contain a GameSettings object
18:23:31sam686All i mostly seeing in a past 100 commits is code changes that barely add 1 feature and adds more then 10 bugs/crashing that doesn't exist back on 019c
18:23:55raptorhaha, such is the fate of refactoring
18:25:14sam68690% of users that play bitfighter don't look at C++ code so those that don't look don't care about such code changes like refactoring
18:26:28Watusimoto>>> #typedef GameSettings::get() gGameSettings<<< an interesting idea!
18:27:45raptoralthough, since making the constructor private, i'm not sure how to integrate that code with tests
18:28:20raptoralso it feels really weird to instantiate the class within itself
18:28:24Watusimotoa Bitfighter object is also interesting
18:28:27raptorthat's gotta be wrong on some level
18:30:10Watusimotothe other thing we could do (in either case, I suppose) is create a method for setting the settings object to a new settings object for testing. that method could be private, and we could declare the tests to be friend classes
18:30:31Watusimotohow would the Bitfighter object get instantiated?
18:30:42Watusimotofrom main?
18:30:47raptorthinking about that Bitfighter object, and trying to remember something that kaen mentioned - it seems as though the Game object was partly originally supposed to be that whole-program-level wrapping object
18:30:49raptoryes from main()
18:31:06Watusimotowe could initialize gSettings from main()
18:31:14raptorthat doesn't work
18:31:31raptorwell, it does, most of the time
18:31:40raptorbut can still have the ordering problems
18:31:56raptorright now we do new GameSettings from main()
18:32:01raptorthen pass it around
18:32:13sam686main() runs after all the global/static initalizing
18:32:44Watusimotodo we have statics that depend on gSettings?
18:32:56raptorah yes, that's why it doesn't work sometimes from main() - initialization has already completed
18:33:06raptoryes
18:33:08raptoror
18:33:23raptormore like, we have statics that are part of objects that use gSettings
18:33:33Watusimotothen the Bitfighter object won't work either, right?
18:33:40raptorit's not to be a static
18:33:57raptoror a global
18:34:18Watusimotooh, so we'd pass that around then
18:34:21raptoryes
18:34:24Watusimotoah, ok
18:34:44raptorbut we could fill it out with what ever other objects, like GameSettings, we needed
18:34:46Watusimotowell, I'm not sure that would be better than just passing around the settings
18:35:12raptorthe 'better' part is having one object vs. a potential more-than-one as there may be other objects
18:35:24Watusimotoso it seems we have two options: 1) Settings::get() and 2) passing settings around everywhere
18:35:38raptoryes, those were my two from this morning
18:35:40Watusimotoyes, but at least currently, settings is it
18:35:53raptorwe can round off #1 with a typedef and some other access for tests
18:36:04sam686I can try GameSettings &gSettings = NULL; and see where it crash first
18:36:06Watusimotook, yes
18:36:11raptor#2 is already implemented
18:36:24raptormostly
18:36:32Watusimotoyes
18:36:37Watusimotowe just need to undo my undos
18:36:46raptorhaha
18:37:00Watusimotoand figure out how to get settings into the BfObject hiearchy
18:37:02raptorI'm willing to fully convert the code base to #1 or #2
18:37:11raptorI just want to settle on one or the other
18:37:25Watusimotosam686, what are your thoughts?
18:37:38raptori think sam686 just wants it to not be broke
18:37:51Watusimotowe all want that!
18:37:58raptoryes!
18:38:06Watusimotook, I'll give my vote
18:38:14WatusimotoI would vote for #2
18:38:28raptorI find a lot of online vitriol against having singletons
18:38:47Watusimotothough I think it is kind of messy
18:38:50sam686globals initalizing that depends on another to be already initalized in another .cpp file just makes things randomly broken depending on linker order
18:39:06sam686and we can't always control linker order mostly on windows
18:39:12raptoroh the horror of initialization + linker
18:39:15Watusimotoyes, so that idea won't work
18:39:47WatusimotoI actually did think about initialization order before starting down the gSettings road
18:40:01Watusimotoand I didn't think it would be a problem
18:40:07raptorwith #2, our tests will work again...
18:40:11Watusimotoyes
18:40:17raptorok, i'll do #2
18:40:19sam686the problem was hallening on colors.h colors.cpp, until I deside to ditch colors.cpp to fix black color initalizing problem
18:40:29sam686happen (not hallening)
18:40:40Watusimotook
18:41:19raptori have to go, but i'll be back in about an hour or so and get to work
18:41:24Watusimotook
18:41:29WatusimotoI'll probaby be asleep
18:41:34Watusimotobut you never know!
18:41:45raptori think that putting the *settings object on UI will remove a *lot* of method arguments
18:42:00raptorso we may find that this will be cleaner in the end
18:42:28raptorok, back alter
18:42:29raptorlater
18:42:39raptornight! (maybe(
18:42:41raptor))
18:43:04raptor Quit ()
18:45:06sam686it looks like nothing uses gSettings before main() runs
18:46:41sam686im probably falling asleep, later
18:46:44sam686 has left #bitfighter
19:04:58Watusimotosome good website design ideas here:
19:04:58Watusimotohttp://eu.wargaming.net/
20:17:16raptor has joined
20:17:16ChanServ sets mode +o
20:17:23raptorhello again
20:18:01raptorWORLD OF WARPLANES
20:19:51raptoron to the settings refactor!
20:20:42raptorWatusimoto: are you planning on committing anything tonight?
21:26:07Flynnn has joined
21:28:10BFLogBot Commit: 78ceb04ee3 | Author: watusimoto
21:28:12BFLogBot Commit: 2495fd6496 | Author: watusimoto
21:28:13BFLogBot Commit: 3b72eea5b7 | Author: watusimoto
21:28:15BFLogBot Commit: 7b16e2c36a | Author: watusimoto
21:28:16BFLogBot Commit: 1efa8b37ea | Author: watusimoto
21:28:18BFLogBot Commit: 019ca7dbdf | Author: watusimoto
21:28:24raptorOH NO
21:32:44Watusimoto Quit (Ping timeout: 264 seconds)
22:38:41raptorkaen: do you remember why we chose to move the global lua functions outside of LuaScriptRunner and into LuaGlobals?
22:38:51raptorthis was the relevant commit: https://code.google.com/p/bitfighter/source/detail?r=e4feff844b46
22:59:50raptoractually, i thin i foudn it in the logs
23:47:56raptor Quit ()

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.