#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2012-04-10

Timestamps are in GMT/BST.

00:23:48Watusimoto Quit (Ping timeout: 245 seconds)
04:44:49raptor Quit ()
06:07:14sam686 Quit (Ping timeout: 245 seconds)
07:03:24kodaws has joined
08:10:18watusimoto has joined
08:10:18ChanServ sets mode +o watusimoto
11:10:41Watusimoto_ has joined
11:41:18Watusimoto_ Quit (Ping timeout: 246 seconds)
14:19:30LordDVG has joined
14:56:02raptor has joined
14:56:02ChanServ sets mode +o raptor
14:56:09raptorgood morning!
14:57:35watusimotohi
14:57:39raptorhello
15:16:23raptori posed a question last night about bot 'control ticks'
15:16:35raptoror rather, ideas
15:17:05raptorwe could have a default control tick of like 66ms (or whatever)
15:17:16raptorand then exposed a method to change it for bots
15:17:37raptoror
15:18:01raptorwe could require a control tick setting for all bots
15:18:11raptorand impose a minimum speed
15:27:38watusimotoI think we should try the speed limit approach first, as it will be easier
15:27:50watusimotowe already have a method for calling onTick()
15:28:09raptorsorry.. control tick = speed limit
15:28:13watusimotowe just record the accumulated time since the last call to a bot's onTick()
15:28:30watusimotoif we are under our threshold, we simply copy the bot's last move (or don't clear it, or whatever)
15:28:44watusimotoand if we are over the threshold, we call onTick() and reset the accumulator
15:28:56raptoryes, that is exactly what i'm thinking
15:29:05watusimotothis will be very easy to implment
15:30:27raptoryes
15:30:53raptor67 ms = 30 fps
15:30:55watusimotolook for EventManager::get()->fireEvent(EventManager::TickEvent, timeDelta);
15:31:18watusimotothough this fires onTick for all bots, but that should be ok
15:31:23raptorah...
15:31:34raptorso you are thinking of a global default
15:31:59watusimotowell, we just wrap that in a if(time > timeToTick) { }
15:32:17watusimotoand right above it is clearBotMoves
15:32:20raptori was thinking of a per-bot settings
15:32:25raptorthat could be set to slower
15:32:43watusimotolet's try a global setting first since it would probably be 5-10 lines of code
15:32:50watusimotoand see how it works in general
15:33:05watusimotocan we discern a difference in bot behavior?
15:33:20watusimotoif not, then we can look to refine the technique
15:33:23raptori doubt we will
15:33:35raptorok, what tick-per-second limit do you think?
15:33:35watusimotoif it looks like it will suck, then we can remove our 10 lines of code and think of something different
15:33:38raptor30 fps?
15:33:41watusimotosure
15:33:41raptor20?
15:33:55watusimotolet's start with 50ms btween bot runs
15:34:09watusimotobots will still respond to other events between those ticks, but that's ok
15:35:37raptorso just for the onTick event?
15:35:48watusimotofor now, yes
15:35:56watusimotofor s_bot, that's 99% of bot activity
15:36:05watusimotocould also do this less frequently:
15:36:05watusimotocomputeWorldObjectExtents
15:36:16watusimotothat's relatively expensive and probably not really necessary
15:37:47raptoris TickEvent map to onTick?
15:38:17watusimotoyes
15:41:16raptorso i was thinking of using a Timer
15:44:04watusimotoperfect
15:44:31watusimotomore elegant than the quick and dirty method I was thinking of, and probably no harder
15:50:39raptoryay for Timers
15:57:54raptorok, does fireEvent get fired synchronously?
15:58:31watusimotoyou mean in-line with the rest of the game?
15:58:33watusimotoyes
15:58:37raptorok
15:58:40watusimotodo you mean all bots get fired at once?
15:58:41watusimotoyes
15:58:56raptorok phoew
15:58:56watusimotoyeah, I really like that timer class
15:58:58raptorthanks
15:59:15watusimotoideall, we'd fire each bot independently so we don't get "pulses" of bots going off
15:59:24watusimotobut it may not be a real problem
15:59:40watusimotobot surges
16:00:30watusimotoI'd think the default BM bot behavior (circling opponent) would be relatively sensitive to timing
16:00:41watusimotoso it may be a good easy test; it's what s_bot wants to do
16:00:55raptorBM?
16:00:58watusimotobitmatch
16:01:18watusimotoyou can bump up the timing until the orbit starts to decay, and get some sense for what values might work
16:01:24raptori htink at 20fps, it'd be hard to notice any difference...
16:01:33watusimotoprobably right
16:01:48watusimoto20fps = 50ms btwn cycles?
16:02:58watusimotoyes
16:02:59raptoryes
16:06:49raptorbrb... i have something to test but have to switch machines
16:06:54raptor Quit ()
16:13:28raptor has joined
16:13:28ChanServ sets mode +o raptor
16:14:03raptorok, time to tes...
16:14:05raptortest
16:17:43raptori messed something up spectacularly
16:18:58raptorwatusimoto: here is my diff, what did i do wrong?: http://pastie.org/3762830
16:27:30raptorso shooting is ok, but moving and module usage is stuttery
16:29:06watusimotofigure it out?
16:29:13watusimototo use timer, use like this:
16:29:40watusimotoif(controlTickTimer.update(deltaT)) { timer_went_off; controlTickTimer.reset() }
16:29:41raptori think my timer is ok - is the bot movement tied to onTick, too?
16:29:58raptoryes, i did something similar to that
16:30:04raptorthe timer is OK, i think
16:30:06watusimotook, the code you posted looks wrong
16:30:08watusimotook
16:30:42raptorhow does it look wrong?
16:31:28watusimotomaybe I'm reading the diff wrong
16:31:35watusimotootherwise it looks fine
16:31:44watusimotopost the whole chunk
16:31:48watusimotorather than the diff
16:32:30raptori think the bot movement and modul processing is tied to ontick, so it only moves a bit
16:32:33raptorhttp://pastie.org/3762904
16:32:36raptoris the whole method
16:33:43raptormaybe i need to modify deltaT as the interval...
16:35:04watusimotooh, I see what you did
16:35:13watusimotocontrolTickTimer.getCurrent() == 0
16:35:19watusimotothat bit is not typical usage
16:35:31raptorit's because i don't trust the boolean return of update
16:35:37raptorit seems wrong to me
16:35:38watusimotoif(controlTickTimer.update(deltaT))
16:35:41watusimotook
16:35:49watusimotowell, that's how the rest of the app does it :-)
16:36:13watusimotoand don't do this in fireEvent
16:36:29watusimotobecause this event handler might be used for other events with the same signature in future
16:36:35watusimotothis is a generic handler
16:36:51raptorok, then i misunderstood where you thought it should be done
16:37:02watusimotoEventManager::get()->fireEvent(EventManager::TickEvent, timeDelta);
16:37:14watusimotoServerGame.cpp 1395
16:37:18watusimotoor so
16:37:24raptorOOOooooo
16:37:41watusimotojust wrap that line and the clearBtMoves() inside the timer
16:38:03raptorok, i'll move the timer
16:38:05raptorthanks
16:38:10watusimoto if(timer.update(timeDelta))
16:38:10watusimoto {
16:38:10watusimoto // Clear all old bot moves, so that if the bot does nothing, it doesn't just continue with what it was doing before
16:38:10watusimoto Robot::clearBotMoves();
16:38:10watusimoto // Fire TickEvent, in case anyone is listening
16:38:10watusimoto EventManager::get()->fireEvent(EventManager::TickEvent, timeDelta);
16:38:11watusimoto timer.reset()
16:38:11watusimoto }
16:38:17watusimotosomething like that
16:40:55watusimotoI was totally confused about where you were doing this
16:41:08raptorhehe, yeah i completely misunderstood
16:45:16raptorTimer::update still doesn't look right...
16:45:46raptorit's supposed to return true if it runs out, right?
16:46:13raptorif so, why is this a part of the method?:
16:46:15raptorif(mCurrentCounter == 0)
16:46:16raptor return false;
16:49:57raptorwell, in any case, bots work MUCH better now
16:51:32raptorhuh
16:51:51raptorthe lower tick rate is pulling out bugs in the bot code: they seem to get stuck on the walls for a few cycles
16:52:00watusimotointeresting...
16:52:12watusimotoI hope to get my bots working again tonight, so I can see your new fix
16:52:16watusimotoanyway, heading home
16:52:18watusimotolater!
16:52:19raptorok
16:52:21raptorbye
16:56:24watusimoto Quit (Ping timeout: 245 seconds)
17:07:17BFLogBot - Commit 7ac6d84cdd37 | Author: buckyballreaction | Log: Bots now have a control tick; they run onTick using an interval. Set to 30 fps at the moment
17:07:18BFLogBot - Commit b79f00791a92 | Author: buckyballreaction | Log: Don't have s_bot in two places
17:41:11raptor Quit ()
17:42:40kodaws Quit (Ping timeout: 260 seconds)
17:49:04raptor has joined
17:49:05ChanServ sets mode +o raptor
17:51:21raptor Quit (Client Quit)
18:08:07raptor has joined
18:08:07ChanServ sets mode +o raptor
18:41:50sam686 has joined
18:41:50ChanServ sets mode +v sam686
18:44:56raptorhi sam686
18:45:05sam686hi
18:45:16raptori am curious
18:45:25raptorcracatoa has a server up called 'Supernova'
18:45:33raptorbut it shos up 4 times
18:45:36raptor*shows
18:45:52raptorhe says only one bitfighter.exe is running on his windows xp box
18:46:13raptorwould you have an idea of what is happening?
18:48:10sam686parhaps becasue they are actually multiple different servers coming from same ip address, possibly coming from same computer
18:49:22sam686they are multiple dedicated servers, tested with multiple clienbts
18:49:41raptoryes
19:02:57raptori was thinking that it may be better to put static const and enum in the cpp
19:03:08raptorthat way a header change won't require a complete recompile
19:03:25raptorso if in the header you have something like this: static const U32 someValue = 1000;
19:03:42raptorthat could be changed to: static U32 someValue;
19:04:04raptorand in the cpp just add someValue = 1000;
19:04:55sam686yes, that mean the value could change at any time, and the compiler won't be able to optimize the way it can for constant values that never changes..
19:05:12raptorah
19:05:18raptorso const is good
19:06:20raptori wonder what the compiler does for enum
19:06:24raptorsame thing?
19:06:52sam686probably yes, though, enum is always constant
19:07:03raptorah ok
19:09:06sam686although, you can have "class Object1{ static const U32 someValue;}; const Object1::someValue = 1000;
19:09:24raptorreally?
19:09:35raptori thought that game compile warnings...
19:09:50sam686but then, the compiler that compiles one .cpp file at a time will be blind and won't know that the real const value is..
19:10:08sam686until it come to linking
19:12:12mollie has joined
19:12:22molliesup
19:12:37molliehello
19:12:38raptorhi
19:12:45molliesup
19:12:48sam686hi
19:12:54molliehi
19:13:26molliedo you still have the old veison of bitfighter
19:13:32raptorwhich one?
19:13:41mollie16
19:13:47raptoryou can find all old ones here: http://bitfighter.org/releases
19:13:53raptorwell.. *most* of them
19:14:05mollieok
19:14:20molliebut I still have
19:14:36mollie16 and nobody else has it
19:14:47raptorso you want the new version?
19:14:50raptorget 017a
19:15:02raptoreveryone else has upgraded
19:15:06mollieyes but it has a vires
19:15:10raptorahh....
19:15:12sam686http://code.google.com/p/bitfighter/downloads/list?can=1 lists old version too
19:15:15raptoractually it doesn't
19:15:22raptorthat is the virus scanners fault
19:15:36mollieI guess
19:15:38raptorit is a 'false positive'
19:16:00raptorwe even contacted norton about it and they said they'd update their virus database
19:16:04mollieI will try again I will be back
19:16:13sam686if you can disable such anti-virus from scanning, install bitfighter, then i guess you can re-enable anti-virus scanner
19:16:18raptorbut they still haven't done their part i guess
19:16:35mollie Quit (Client Quit)
19:16:50sam686since it only flags the installer (incorrectly) as a virus, i think
19:17:48mollie has joined
19:17:56molliesup
19:18:04raptorhi again
19:18:32mollieit still isn't working
19:18:42sam686which anti-virus are you using?
19:18:52mollieNorton
19:18:53raptornorton is wrong
19:19:00raptoryou have to disable norton to install it
19:19:02mollieI know right
19:19:08raptorthen after installation, re-enable norton
19:19:14raptorand it'll work ok
19:19:29sam686you may have to disable norton, and try downloading and installing bitfighter 017a
19:19:41raptorah yes - disable norton before re-downloading
19:19:48sam686then i think it is safe to re-enable after done installing bitfighter
19:20:02mollie@ rapor do you play Club Penguin
19:20:14raptorno. sorry - i don't really play any games
19:20:33molliebut you play bitfghter
19:20:48raptoryes, but i code more than play...
19:20:57raptori have to play to test the code :)
19:21:16molliewhat code
19:21:30raptorcode = program
19:21:37raptori program bitfighter
19:21:40raptorwith sam686
19:21:43mollieahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
19:22:16sam686this kind of code: http://code.google.com/p/bitfighter/source/browse/zap/ClientGame.cpp in bitfighter
19:23:44molliewow
19:28:01mollie Quit (Quit: Page closed)
19:32:24raptorsam686: did you see that I added a 'control tick' to robots?
19:32:40raptorbasically onTick will only be fired at 30 fps right now
19:35:21sam686not sure if limiteing control tick of robots to only 30 fps will help, especially if the server happens to be running slower then 30 fps...
19:37:01raptorwell, i used callgrind
19:37:17raptorand it seems to have helped tons
19:37:25raptorbut my computer is fast anyways...
19:37:55sam686if you happen to make your servergame go slower then 30 fps (with 100 bots or more), then it won't hardly make a difference on improving any speed
19:38:08raptorvery true
19:38:27raptorbut now it is harder to make the server go slower
19:38:35raptorbecause many bots won't slow it down as much
19:39:02sam686yes, it may use less CPU usage if the server running higher then 30 fps
19:39:12raptorwhat is the default for a server 100fps?
19:39:16sam686yes
19:39:31raptori know of no one ever changing that
19:43:17sam686possible problem with timer bot with the new 30 fps robot limit, instead of chat every 2 seconds of timer stats, it chats like every 4-12 seconds, due to relying on adding a counter by milliseconds passed using timeDelta in onTick
19:44:57raptorahh... maybe i should change the timeDelta to be the interval?
19:45:13sam686yes
19:46:22raptorwill that be precise enough?
19:47:59sam686maybe just do timeDelta2 += timeDelta; if(timeDelta > 30) {do_Robot_Idle(timeDelta); timeDelta == 0;}
19:48:13sam686oops, all, but one should be timeDelta2
19:48:23sam686timeDelta2 += timeDelta; if(timeDelta2 > 30) {do_Robot_Idle(timeDelta2); timeDelta2 == 0;}
19:48:28raptorso replace the timer
19:48:39raptorthat seems messier
19:49:17sam686thats the most accurate way
19:50:22sam686fireEvent(EventManager::TickEvent, 30/1000); if the server running only 10 fps, then the robot time ticks for timer bot will be chatting every 6 seconds anstead of 2
19:50:43sam686(and that makes timer bot completely useless if it only see one number all the time)
19:51:22raptorTry testing the accuraty with just changing timeDelta to BotControlTickInterval on ServerGame.cpp:1399
19:51:53raptori mentioned to watusimoto that each bot should be able to specific their control tick
19:52:04raptorbut have a default if not specified (like 30fps)
19:52:46Watusimoto has joined
19:53:50sam686you can get timer bot (and other bots i have) here: http://sam686.maxhushahn.com/bitfighter/robots/
19:54:00raptorgreat, thanks
19:57:02raptorok, what is the default rate? 10 seconds?
19:58:03sam686i think it is 2 seconds..
19:58:11raptorhmm... it's still taking like 8
19:59:19sam686in a timer bot code, rate = tonumber(arg[1]) or 2000 in main() controls the rate (you can also do "/addbot timer 0 500" for 0.5 seconds
20:04:21raptorstill once every 8 seconds...
20:04:22raptorweird
20:07:24raptori even did your way without the Timer
20:07:32raptorno difference
20:08:30raptormust be a bug elsewhere
20:09:29raptorbut i pushed an accurate fix anyways...
20:09:52sam686maybe (robot.cpp line 634) have something to do with the problem
20:10:53raptorit's returning the move time??
20:10:57raptorthat doesn't seem right..
20:12:34BFLogBot - Commit 545c0c18fd4e | Author: buckyballreaction | Log: Send in proper time change for bot control tick
20:12:35sam686i will be back in about 25 minutes..
20:19:49raptorok
20:38:28LordDVG Quit (Remote host closed the connection)
20:57:03Watusimotoso how are the bots working out?
20:57:11raptorbots are OK-ish
20:57:16raptorexcept
20:57:31raptorwe expose the deltaTime to the Lua scripts
20:57:38Watusimotoyes
20:57:53raptorthe problem is that it is exposed via currentMove.time
20:58:09Watusimotoit's passed in onTick
20:58:25raptorok, then that shouldn't be a problem...
20:58:42raptorfor whatever reason, sam's timer bot is going at 8 second intervals instead of 2
20:59:17Watusimotoare you passing accumulated time via the onTick event, or just the time for that iteration of idle?
20:59:26raptoraccumulated
20:59:34raptor(after my latest commit) :)
20:59:36Watusimotoyou are accumulating it somehow?
20:59:37Watusimotook
20:59:52Watusimotothe code I proposed earlier did not include that
21:00:08raptoryes, i pass in the timer ellapsed time + timeDelta
21:01:05Watusimotothat could be an error, depending on how elapsed time is handled
21:01:26raptori grab the elapsed time before the timer is updated
21:01:53Watusimotook. well, there is no other source of the problem, unless the timer bot is doing somehting hokey
21:02:01Watusimotolike using time from currentMove.time
21:02:09raptorhehe
21:02:15raptori thought you said that is ok?
21:02:26WatusimotocurrentMove.time is not right
21:02:38Watusimotobut I don't think the bot can get that
21:02:44raptorwell, that is what is exposed to the scripts in LuaRobot::getTime
21:02:59Watusimotommmm.... well that's probably a bug
21:03:05Watusimotoit was probably right at one point
21:03:11Watusimotobut isn't if you are skipping cycles
21:03:33raptorso how to get the correct time now?
21:03:43raptorsorry if i'm a little new at the bot event stuff...
21:03:58Watusimotowhat time do you want? time since last tick, or cpu time?
21:04:21WatusimotogetTime should return cpu time (if we want to expose it)
21:04:30Watusimototime since last tick is passed as an arg to ontick
21:04:32raptorwell, the case at hand is sam's timer bot
21:04:39raptorwhich uses onTick
21:04:50raptorhttp://sam686.maxhushahn.com/bitfighter/robots/timer.bot
21:05:14Watusimotoit's wrong
21:05:16Watusimotoshould be
21:05:22Watusimotofunction onTick(deltat)
21:05:32Watusimotosum = sum + deltat
21:05:46Watusimotosomething like that
21:06:06Watusimotowe shoudl either get rid of getTime or have it return cpu time
21:07:55raptorso the signature of the lua-exposed onTick should have deltaT passed in?
21:08:00Watusimotoyes
21:08:06raptori have no idea how to do that
21:08:45WatusimotoTickEvent onTick(timeSinceLastTickInMs) Called every frame of the game. Unlike other events, robots are subscribed to this event by default.
21:09:03Watusimotoit is passed. just change the bot
21:09:23Watusimotofrom function onTick() to function onTick(deltat)
21:10:16raptortesting...
21:10:24raptorwhere is that method in the cpp?
21:13:33raptorit works!
21:14:35Watusimotofunction onTick(deltat)
21:14:38Watusimotooops
21:15:14Watusimotovoid EventManager::fireEvent(EventType eventType, U32 deltaT)
21:15:40Watusimotolua_pushinteger(L, deltaT); is where the time actually gets pushed onto the Lua stack
21:17:23raptorso sam686's timer.bot needs a change
21:17:31raptorand do we even want getTime() ?
21:22:39WatusimotoI don't know
21:23:06WatusimotoPossibly cputime would be useful if a bot sleeps a while, or wants to track time elapased without implementing ontick
21:23:49Watusimotothough we have timers and such so bots proabblay don't need time for all that much
21:24:12raptorit seems to me that onTick should be used for 'judgement changes' in bots behavior
21:24:15raptoris that correct?
21:24:48Watusimotoor detailed changes; orbiting requires constant adjustments
21:24:52Watusimotofor example
21:26:01raptori think all the bots are broken except s_bot: no main()
21:26:12Watusimotothey don't need one
21:26:21Watusimotoat this point, it's more of a recommendation
21:26:28raptorwell orbit bot is quite stationary...
21:26:43Watusimotoah, well, they;re all stationary for me at the moment
21:26:50raptorohhhh
21:27:07raptorthat's right... you're in the middle of a lua system rewrite...
21:27:14raptorok, i'll forebear
21:27:18raptorand sit tight
21:27:40Watusimotoorbitbot is probably broken because it has function getMove()
21:27:40Watusimotoand not ontick()
21:28:00Watusimotorename getMove to onTick and it should work
21:28:12WatusimotogetMove was the old design
21:32:55raptorit's still borken
21:33:27raptor***ROBOT ERROR*** Robot error handling event Tick: scripts/robot_helper_functions.lua:86: attempt to index local 'loc' (a vec value). Shutting bot down.
21:35:18Watusimotorobot_helper_functions has a function function findClosest(items, teamIndx)
21:35:18Watusimotothat's probably broken
21:35:56raptormaybe no one is building bots because our examples have been slowly breaking....
21:36:09Watusimotowho would build bots?
21:36:30raptorthe hordes of bitfighter enthusiast lua programmers?
21:36:53Watusimotobesides them, I mean
21:37:06raptorprobably just sam686...
21:37:09Watusimotothis will require a little testing when bots work again
21:37:11Watusimotoprobably
21:37:20Watusimotoeven I'm a little scared of it
21:45:05raptorwhat are you currently doing? ripping out lunar for luawrapper?
21:57:50Watusimototrying to find a lua bug
21:58:00Watusimotothat keeps scripts from running
21:59:14WatusimotoI've optimized it so the helper scripts only get loaded and compiled once, instead of once per bot
22:07:33Watusimotothe thing about luawrapper is I have no idea if it will be better in any way aside from providing subclassing support
22:11:06raptori have more profile data with the new bot control tick: http://sam686.maxhushahn.com/upload/callgrind.out.21927
22:12:12raptori want to say it does about 1/4 to 1/2 as many calls
22:12:25raptorprobably clsoer to 1/4
22:16:00raptorsha256_compress is now like 45% of resources spent...
22:17:09Watusimotowow
22:25:13Watusimotois that happening at start up, or throughout the process
22:25:25raptorno way to tell...
22:25:31raptorcomes from ServerGame::Idle
22:26:08raptormNetInterface->processConnections()
22:26:53raptorthen NetInterface::continuePuzzleSolution
22:37:56Watusimotoyou could put a print statement in there and see if it gets called alot
22:38:19raptorthat' what i'm doing now - it get's called twice
22:38:29raptoractually wait, i'm not doing a server...
22:38:50Watusimotoi bet it only gets called when clients connect
22:39:35raptorheh
22:39:36raptoryep
22:39:38raptorthat's it
22:41:04raptorhave one more test to do...
22:43:08Watusimotook, then probably not a big deal
22:43:30Watusimotowould be nice to back it off a bit when connecting locally :-)
22:43:50raptoryep, just the once...
23:09:27Heyub has joined
23:10:05HeyubGood evenin'!
23:21:37Watusimotohi
23:27:12raptorok, i'm out
23:27:17raptorgood night!
23:28:45HeyubGood night
23:28:57raptorwell, mostly good night to Watusimoto
23:29:09raptorsince it's gotta be past midnight at his place
23:29:09Watusimotomostly
23:29:14Watusimoto1:29
23:29:15WatusimotoAM
23:29:18raptor!!
23:30:04Heyublol
23:30:27raptor exlamation points
23:31:03raptorok bye now
23:31:13raptor Quit ()

Index Search ←Prev date Next date→

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