#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-04-01

Timestamps are in GMT/BST.

01:20:35Platskies has joined
01:25:04Platskies Quit (Ping timeout: 255 seconds)
01:33:55Platskies has joined
01:55:46raptor has joined
01:55:47ChanServ sets mode +o raptor
01:55:50raptorok
01:56:00raptordo I even want to know what's going on in off-topic??
01:56:07bobdaduckprobably not
01:56:07kaennope.
01:56:13bobdaduckWHAT DID YOU DO TO MY BEAUTIFUL LUADOCS
01:56:56bobdaduck*checks off topic*
01:57:11bobdaduckNOPE.
01:57:20bobdaduckNothing to see there!
01:57:23kaenI posted some latin
01:57:25bobdaduckI saw that
01:57:30bobdaduckI tried to read it but couldn't
01:57:36raptorso... luadocs are being revised slowly...
01:57:39kaenIt didn't help as much as I'd hoped
01:58:17bobdaducklol
01:59:03bobdaducky'know
01:59:09bobdaduckmost of our community doesn't read latin.
01:59:24kaen<bobdaduck> most of our community doesn't read
01:59:26raptorsooo... nothing I should be worried about?
01:59:39bobdaduckxDD
01:59:43bobdaduckWell maybe
01:59:51bobdaduckWe did get Lisanna to quit bitfighter like forever
02:00:00kaenoh?
02:00:12bobdaduckYeah
02:00:34bobdaduckQuartz called her out on her being mean to everyone and she was like "You know what, all of you can go screw yourselves"
02:00:36bobdaduckand then she left
02:00:40kaenwell I don't mark that as much of a loss.
02:00:41kaenyes
02:00:52kaenshe was rude and was intentionally working to create hostility
02:00:52bobdaduckand then she went on the bitfighter steam group and raged at little apple and then left the group.
02:00:55bobdaduckSo... Uh.
02:00:57raptorI am saddened we lost a female player
02:00:57bobdaduckYeah that.
02:01:07kaenso good riddance to bad rubbish
02:01:13bobdaduckLine between trolling and being mean
02:01:18bobdaduckgets pretty fine
02:01:21raptorbut also saddened at the apparent behavior of a female player
02:01:22bobdaduckbut she wasn't really very close at all.
02:02:33bobdaduckhah, yeahhhh
02:03:15bobdaduckscripts/timer.lua:128: expected function in Timer:scheduleRepeating()!
02:03:27bobdaduckline 128: end
02:03:31kaenyou need to pass it a function
02:03:42kaeneither the name of one or an anonymous function definition
02:04:01bobdaduckthere's no code at line 128, just an end...
02:04:17bobdaduckAll my timers look something like this: Timer:scheduleRepeating(spawnBursts(spot1), 3000)
02:04:23kaenokay
02:04:30kaenspawnBursts(spot1)
02:04:33kaenis a function *call*
02:04:39raptoryou can't do that sadly
02:04:40kaenyou need to pass it a *function*
02:04:50raptoronly 'spawnBursts'
02:04:53kaenyes, it can take no arguments (usefully)
02:04:54raptorno argument :(
02:05:03kaenbut
02:05:07kaenif you do
02:05:25kaenTimer:scheduleRepeating(function() do spawnBursts(spot1) end, 3000)
02:05:46kaenthat creates an anonymous wrapper function, and because of lua's closures the value of spot1 is the same
02:06:01bobdaduck tries it
02:06:04kaenassuming I guessed the anonymous function syntax correctly
02:06:36raptorkaen: does that work??
02:06:37bobdaduckI'm gonna say you probably did not guess the syntax correctly.
02:06:43kaenpost the error
02:06:50bobdaduckunexpected symbol near ','
02:07:19raptoryou *could* look in the timer class int he scripts folder..
02:07:23kaenfixing...
02:08:03kaenhttp://pastebin.com/scT2SaqF
02:08:21kaenI think the one-line needs a semicolon
02:08:55kaenraptor, I do it in javascript all the time
02:09:01kaenI imagine it works in lua too
02:10:03bobdaduckuse your code directly?
02:10:15kaenbroken like that over the lines
02:10:20kaenshould be able to copy/paste
02:10:31bobdaducksame error
02:10:36bobdaduckunexpected symbol near ','
02:10:46bobdaduckon line 1
02:11:04kaenis that line 1 of the script?
02:11:14bobdaduckline one of your code
02:11:18bobdaduckthe timer:schedule part
02:12:34bobdaduckraptor do you know a fix for what I'm trying to do?
02:12:43bobdaduckshort of creating four different function
02:12:48raptorpass in an argument for a timer function?
02:12:57bobdaduckyeah
02:13:32raptoryou may have to make 4 simple functions called by the timer, then each just calls your one function with the logic and a parameter
02:13:41raptorbut I am actually researching it too..
02:13:57kaenI am 100% sure the closures and anonymous functions works
02:14:13kaenI just tried it on the lua demo
02:14:27raptorso different problem with bobdaduck's syntax?
02:14:42kaensounds like it
02:14:52bobdaduckspot1 = point.new(blah, blah)
02:16:16kaenhttp://pastebin.com/FUrehRy1
02:16:29kaen^ this works as expected, and is essentially what we're doing here
02:17:14bobdaduckI can't translate it to my code
02:17:29kaenright, but three-line code I gave you should work fine
02:17:35kaenbut the*
02:17:42bobdaduckI pasted it directly...
02:18:04kaenas three lines?
02:18:09bobdaduckyeah
02:18:24kaencan you paste the whole thing for me?
02:19:10bobdaduckMind if I just paste directly into the channel?
02:19:14raptorYES
02:19:19bobdaducknot the entire thing
02:19:27bobdaduckjust the ten relevant lines
02:19:29kaenjust put it on pastebin man
02:19:32bobdaduckfineee
02:19:47bobdaduckNot pasting entire code though
02:19:50bobdaduckhttp://pastie.org/7248289
02:19:55bobdaduckthis is my secret level project so
02:20:03kaenin case I steal your leet lua hacks?
02:20:13bobdaducklol
02:20:13bobdaduckno
02:20:25bobdaduckin case you figure out more of the level than I want people to know yet
02:20:31bobdaduckI WANT IT TO BE A SURPRISSEEEEE
02:21:10bobdaduckerror says unexpected symbol ',' on line 8
02:22:08kaenokay, and replacing those three lines with Timer:scheduleRepeating(spawnBursts(spot1), 3000) gives you the original error?
02:22:12bobdaduckof the pasted code
02:22:56bobdaduckit gives a weird error
02:23:19bobdaduckexpected function in Timer;scheduleRepeating()! on line 128
02:23:33bobdaduckline 128 just has an end on it
02:23:42raptorkaen you 're right!
02:23:45kaenwell, then I am absolutely baffled
02:23:47raptorbobdaduck: this works fine: http://pastie.org/7248549
02:23:56kaenbecause that syntax is fine.
02:24:38kaenraptor, enjoy that trick :)
02:24:41kaenI use it almost daily
02:24:46raptori love it!
02:24:46bobdaduck*tries it*
02:24:48kaenworks in all ecma-scripten
02:24:59kaenwith closures and anonymous functions anyway
02:25:06bobdaduckhey it worked!
02:25:09kaenhey!
02:25:12kaenkaen knows lua
02:25:16raptorhah
02:25:24bobdaducklol
02:25:25raptorkaen knows everything..
02:25:44kaenbut actually raptor found the right syntax
02:25:53kaenso actually kaen specifically does *not* know lua
02:27:50bobdaduckso the script is working technically, but its behaving really funny
02:28:06bobdaduckI should be able to solve it though
02:28:07bobdaduckthanks!
02:28:15raptordoesn't that descript all of your scripts?
02:28:20raptor*describe
02:28:29bobdaduckxD
02:32:01bobdaduckCan I remove these timers later?
02:32:08bobdaduckThese might get a little... Intensive...
02:33:25raptor?
02:34:01raptoryou can try using Timer:scheduleRepeatWhileTrue
02:34:46raptorthere's an example in the Timer.lua script
02:37:39raptorhey kaen, I have a question that maybe you might know..
02:37:59raptorI'm looking to convert the old Lunar classes to LuaW
02:38:06raptorbut we have some classes like TeamInfo
02:38:18raptorthat have a constructor used like so: TeamInfo(teamNumber)
02:38:36raptorso: local team = TeamInfo(1)
02:38:51raptorthen team:getPlayerCount() or whatever
02:39:43raptorbut if I convert to LuaW, I don't think I have a constructor anymore
02:40:38raptorso what to do...
02:41:05bobdaduckrepeatwhile true, good idea
02:48:08bobdaduckI don't understand how to use it though... gimme a sec
03:02:00raptori'm not sure I like the new style luadocs..
03:05:13bobdaduckI'm not sure I do either
03:05:52raptorthe new ones are smarter... but seem less polished
03:05:57bobdaduckyeah
03:15:17raptorfalling asleep... heading in early. night!
03:16:05raptor Quit ()
03:42:23Platskie_ has joined
03:42:25Platskies Quit (Read error: Connection reset by peer)
03:46:49Platskie_ Quit (Ping timeout: 246 seconds)
03:54:44Platskies has joined
03:56:01kaenbobdaduck, make your timer function return true when it should happen again and return false when it should stop
03:56:08kaenthen you can use it with repeatwhiletrue
04:00:12Platskies Quit (Remote host closed the connection)
04:08:41bobdaduckI just used a normal schedule repeating timer
04:08:52bobdaduckand inside the timer function put in an if statement.
04:30:14bobdaduck Quit (Ping timeout: 258 seconds)
04:32:31kaenthat works. as long as you aren't spawning many fibers (that is, you're using one heavy function and not many light ones)
04:32:43kaenoh he's not even here
04:32:53kaenhell BFLogBot, ChanServ
04:32:57kaenhello*
04:33:05kaenmy most faithful companions.
05:09:20bobdaduck has joined
05:27:23bobdaduck Quit (Remote host closed the connection)
07:40:18CrazyLinuxNerd Quit (Quit: Leaving)
10:05:06Platskies has joined
11:05:39Darrel has joined
14:36:49Platskies Quit (Remote host closed the connection)
15:46:56Watusimoto has joined
16:58:15Watusimoto_ has joined
16:58:50Watusimoto Quit (Ping timeout: 245 seconds)
17:43:49Watusimoto_ Quit (Ping timeout: 272 seconds)
19:36:06Watusimoto has joined
20:17:44LordDVG has joined
20:21:41bobdaduck has joined
20:23:40bobdaduckGoodmorning, gentle#bitfighters.
20:23:49kaengood morning
20:24:01kaennot five minutes ago I got in-client level uploading working.
20:24:06kaenso a good morning indeed
20:25:53bobdaducknice!
20:31:16kaenwow I didn't even break any tests while mucking around with the authentication
20:31:37bobdaducknice
20:34:54kaenWatusimoto, can you tell me where to find size limits for levels and levelgens?
20:36:19Watusimotohi
20:36:28kaenhello
20:36:35Watusimotoas far as I know there are no size limits for levelgens
20:36:39Watusimotoas for levels...
20:36:46Watusimotohold on sec, I'll look
20:37:48bobdaduckSon of airlock crashes kaen test
20:37:56bobdaduck(its the very last level in the list)
20:38:11Watusimotounfortunately, my kids were playing torchlight on this machine, so everything is swapped out of memory, and the machine is nearly unresponsive...
20:38:24kaenhaha oh wow
20:40:22bobdaduckso bitfighter pleieiaiaiaidese
20:40:35kaenheh
20:40:36bobdaduckcan you make it show level maker along with uploader on the view levels screen?
20:40:50bobdaduckSeems a whole lot more relevant than uploader.
20:40:53kaenlevel maker is supposed to be the uploader
20:41:01kaenuploader will become author
20:41:28bobdaduckSo what about cases where the mods upload someone elses level?
20:41:44kaenssshhhh
20:41:52kaendon't bring up edge cases right now
20:41:56bobdaduckxD
20:41:56bobdaduckkay
20:42:02kaen(by which I mean I don't know yet)
20:42:18WatusimotoWe have this:
20:42:21Watusimotostatic const S32 MAX_LEVEL_LINE_LENGTH = 4096;
20:42:22bobdaduckWe're eventually going to have folders and some organizational structure, yes?
20:42:25Watusimotowhich is part of your answer
20:42:34kaenbobdaduck, no
20:42:37kaentags is all you get
20:42:50bobdaduckhmmmmmmmm
20:42:56kaenand then some searching for gametype etc.
20:43:09kaenbut I'll let mods add/edit tags as needed
20:43:44Watusimotoand these, which are not totally relevant to the question you actually asked
20:43:46kaenunless you have a cogent argument for folders and some organizational structure beyond what I've mentioned
20:43:47Watusimotostatic const S32 MAX_LEVEL_LINE_ARGS = 128; // Most args on a single line,
20:43:47Watusimoto static const S32 MaxArgLen = 100; // Each at most MaxArgLen bytes long (enforced in addCharToArg)
20:44:10kaenWatusimoto, interesting. is there a max number of lines?
20:44:40kaenfound the file
20:44:41Watusimotoas I recall no, but I realize the answer is not yet complete... hold on a sec
20:44:48kaenokay
20:46:20kaen<kaen> unless you have a cogent argument for folders and some organizational structure beyond what I've mentioned << bobdaduck did you see this?
20:47:23kaenI'm genuinely interested because you seem adamant.
20:48:58bobdaduckBecause, once this is released, we'll have hundreds of maps being suddenly uploaded to the database
20:49:07bobdaduckAnd the view levels screen will show all of them
20:49:13Watusimotowell, there used to be a max file length, I remember because bobdaduck kept asking me to increase it
20:49:15Watusimotoand I did on several releases
20:49:21Watusimotobut I can't find it
20:49:26bobdaduckAND I STILL KEEP HITTING IT.
20:49:33kaenhmm okay
20:49:38Watusimotoand I know that sam rewrote some of the loading code
20:49:52kaenI'll try tracing it later today
20:49:57Watusimotoand it looks like now the level is loaded in chunks, and is not limited
20:49:59bobdaduckwhich will 1: look ugly, and 2: nobody will ever want to wade through them to look for something. The database becomes irrelevant unless you're specifically looking for a map.
20:50:04kaenoh interesting
20:50:11Watusimotobobdaduck: do you still hit total length limits/
20:50:19bobdaduckall the time.
20:50:26bobdaduckwell
20:50:27Watusimotokaen: I'd rather fix the limitations in the code rather than limit your database code
20:50:27bobdaduckno.
20:50:28bobdaduckNot quite.
20:50:33kaenokay
20:50:37bobdaduckI think son of airlock hits the length limits
20:50:42Watusimotobobdaduck: do you get an error message?
20:50:50bobdaduckNot the level length limits, I hit the object limits
20:50:54Watusimotoits line length or file length limits?
20:51:06bobdaduckUh
20:51:15bobdaduckWatusimoto has never seen rave party
20:51:16Watusimotokaen: though 4096 chars is hard to hit on a single line
20:51:20bobdaduckI hit so many limits with that
20:51:22WatusimotoI have seen rave party
20:51:26bobdaduckhave you?
20:51:28Watusimotoyes
20:51:33Watusimotoraptor showed me
20:51:42bobdaduckxD
20:51:46bobdaduckand what did you think?
20:51:47Watusimotoand I think I asked you a question about it
20:51:53Watusimotoit's pretty crazy
20:51:59kaenI'm sort of confused on the limits being there at all. Is there something to stop us from passing around const string refs?
20:51:59Watusimotoyou were there too
20:52:07Watusimotokaen: no
20:52:10kaenokay
20:52:16bobdaduckBasically, its half of what it was originally because I hit some limit somewhere that caused random objects to just start disappearing/not be loaded
20:52:32Watusimotothe reason we have limits is that the parsing code is rather nutso
20:52:42kaenahh okay
20:52:49Watusimotoit's based on c-style line parsing with lots of gotos and other such things
20:52:54kaenD:
20:52:55bobdaduckxD
20:52:59Watusimotoit's compeletley impossible to read
20:53:18Watusimotobut it seems to work flawlessly, and no one wants to be the one to break it :-)
20:53:28kaenI can understand why
20:53:36Watusimotoread LevelLoader::parseLevelLine for a good taste
20:54:04Watusimotothat code could probably be replaced with a simple modern string parser
20:54:13kaenI'll have a look
20:54:15kaenI like strings
20:54:17kaenand parsing
20:54:24kaenanway I actually don't need to have limits in my code, I was just trying to be consistent
20:54:54bobdaduckGood luck
20:55:15Watusimotoyes -- consistency is good. I'd just rather be consistent in the direction of fewer arbitrary limits
20:55:22kaencertainly
20:55:51bobdaduckI'd rather be consistent in there being no limits!
20:55:56Watusimotoactually that whole parselevelline is really just a simple string tokenizer
20:56:10Watusimotothat doesn't even use strtok
20:56:22Watusimoto(or whatever that c fn is)
20:58:55bobdaduckWe should make all the ints in our game signed
20:59:38bobdaduckI miss negative width walls...
21:02:50Watusimotoas I think about it more, there is no reason to have any limits in the file specification, aside from preventing totally insane levels that would dos the game
21:03:02raptor has joined
21:03:02ChanServ sets mode +o raptor
21:03:04raptorthere is a ghosted object limit of 2^10 objects imposed by TNL - if there are more than this, the ghosted object database starts discarding viewable objects
21:03:05kaenI was thinking about that eariler
21:03:08raptor Quit (Client Quit)
21:03:32kaenwow that was fast.
21:03:33Watusimotowhoa... where did go?
21:03:48kaenalways watching... waiting...
21:04:14WatusimotoI would suggest that there may be other limits, like max number of objects, but that they aren;t inherently file specification/parsing limits
21:04:31Watusimotoand should be imposed at a higher level than the parsing level
21:04:38kaenso anyway Watusimoto I was thinking scrap the levels limits and do more general memory/cputime limiting
21:04:51Watusimotoyes!
21:05:01Watusimotomaybe object count limiting and such
21:05:10kaenyes
21:05:11Watusimotobounds limiting (on the todo list)
21:05:20Watusimotobut those are not relevant to teh file itself
21:05:32kaenindeed
21:05:47Watusimotothe levels are written with floats, but the zone generation is limited to U16s
21:05:59Watusimotoso there is an inherent conflict there
21:06:30Watusimotoa coordinate might be 1.123, and that is multiplied by the GridSize, and rounded to an int
21:06:57Watusimotowe should/probably will get rid of the grid size factor, then maybe we'd just use ints in the level file?
21:07:12Watusimotoeach number on the final int scale is basically 1 pixel
21:07:33Watusimotoso there's no real reason to need sub-pixel accuracy
21:08:00kaen1 pixel in canvas space?
21:08:03Watusimotoyes
21:08:18kaenyeah that makes sense then.
21:08:31Watusimotoints would be easier for everyone to dealwith
21:08:37kaenyep
21:08:58Watusimotoproblem is, as always, legacy levels
21:09:45Watusimotobut we could add a token to the specials line to indicate int coordinates/no gridsize, or we could just look for levels that have no gridsize specifier and assume they are the new format
21:09:57kaenthere we go
21:10:04Watusimotoso we have options
21:10:08Watusimotothat aren't too horrible
21:10:12kaenand keep the legacy parser around and just write the new format when you save
21:10:19kaenautomatic format migration.
21:10:21Watusimotoyes
21:10:50kaensounds dubiously straightforward...
21:10:54WatusimotoI'm just not positive the ancient levels always had a gridsize specifier if the gridsize was the default (255 or 256 or thereabouts)
21:11:32kaenmaybe when the new parser encounters floats it could abort and use the legacy one
21:11:32bobdaduckArg I hate it when I get a great idea for a level but the levelgen requires me to figure out arrays
21:11:33Watusimotobut we could also look for non-integer coords
21:11:42kaengood idea, wat :)
21:11:45Watusimoto:-)
21:12:07bobdaduckcolor coords
21:12:21Watusimotoas we get more levels sucked into the database, we'll have a better idea about the ubiquity of gridSize param
21:12:40kaenholy smokes
21:12:47kaenI just realized we can harvest data with this thing.
21:13:00bobdaducklol
21:13:02bobdaduckhow so?
21:13:07kaenit had never occurred to me before :P
21:13:32kaenlike what wat just mentioned. I don't know any other interesting info but now we'll have a place to scrape it from
21:13:36kaenand an easy way to do it
21:13:58WatusimotoI'd like to see stats on the popularity of various game types
21:14:10bobdaduck90% ctf
21:14:17bobdaduck8% core
21:16:58LordDVG Quit (Remote host closed the connection)
21:17:35Darrel Quit (Read error: Connection reset by peer)
21:20:48bobdaduckSo I can't do an algorithm for using arrays and doing everything all proper logically, so I'ma just hardcode the entire thing.
21:20:54bobdaduckOH WELL.
21:22:20kaenWatusimoto, it looks like we use C file i/o functions everywhere. Is it okay if I just use fstream?
21:22:47WatusimotoI don't personally like it, but without good reason. So sure, go for it
21:23:35kaenokay. I don't mind one way or the other, but they're usually used in pairs. C file io with char*, fstream with string
21:24:20kaenalso C implementations don't have to implement SEEK_END so there's no strictly portable way to get a file's size without reading it all...
21:25:53Watusimotodo whatever you think will be most maintainable
21:25:58kaenok
21:26:09WatusimotoI trust your judgement :-)
21:26:24kaen:)
21:28:14bobdaduck(:
21:37:56Platskies has joined
21:54:29bobdaduckSo what would cause my script to break after running a few times?
21:56:49bobdaduckthrowing the error "Could not validate params for function BFObject:setTeam()" with no line number
21:56:50fordcars has joined
22:09:09Watusimotohitting some line that isn't normally hit?
22:09:47Watusimotoshould tell you what it expected... what was that?
22:10:14bobdaduckOh I figured it out
22:10:21bobdaduckWas trying to change it to a team that didn't exist.
22:10:51bobdaduckWhich normally would make it like pink or black or something (I forget) but I guess in levelgen it crashes it
22:11:36Watusimotowhen you pass it an out-of-bounds argument, the script doesn't know what else to do
22:12:07fordcarsMajestic-12 [Bot] -- What bot is that?
22:12:14fordcarsforums
22:14:43Watusimotonever heard of it
22:18:13fordcarsheh, it's a random search engine, phew
22:22:16bobdaducklol why?
22:22:30fordcarslater guys, gtg
22:24:54bobdaduckbye
22:26:48fordcars Quit (Ping timeout: 245 seconds)
22:42:39bobdaduck Quit (Read error: Connection reset by peer)
23:09:05Platskies Quit (Remote host closed the connection)
23:15:41BFLogBot Quit (Ping timeout: 272 seconds)
23:15:41Disconnected.

Index Search ←Prev date Next date→

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