#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-04-07

Timestamps are in GMT/BST.

00:06:02fordcarshey, I have a question that keeps bugging me in bots: if I have a function, and that function has a 1 second delay in it, what happens when I call it in onTick since the delay is longer than one frame?
00:58:53kaenthat invocation of ontick will block
00:59:14kaenI'm not sure if it's spawned as another fiber or not. if it is, then the next on tick will still happen on time
00:59:33kaenotherwise the whole lua state (and probably the game) would freeze for the duration of the delay
00:59:51kaenfordcars ^
01:55:02BFLogBot Commit: c917b3f68c80 | Author: watusimoto | Message: Fix VC++ compile issues
01:55:04BFLogBot Commit: ecb143e43d0d | Author: watusimoto | Message: Overhaul of loadout indicators and score display in LR corner of game UI
01:55:05BFLogBot Commit: cd55f69a7e85 | Author: watusimoto | Message: Merge
01:55:07BFLogBot Commit: 9a6da18b9a42 | Author: watusimoto | Message: Need these too
01:59:42fordcarsok :p thanks
02:00:05Watusimoto Quit (Ping timeout: 246 seconds)
02:07:33raptor has joined
02:07:36ChanServ sets mode +o raptor
02:10:05raptorcommits!
02:10:10raptordare I update?
02:13:20raptoroh m y goodness watusimoto... a big refactor!
02:14:13raptorheh... TImeLeftRenderer
02:17:02bobdaduck has joined
02:17:09kaenhello
02:17:21raptorhi
02:17:28raptorhey kaen question for you
02:17:41raptori'm migrating the rest of the old Lunar classes to LuaW
02:17:42kaenfire away :)
02:18:19raptorright now I'm doing, the TeamInfo class which was instantiated (in Lua) like so: local team = TeamInfo(1)
02:18:42raptorI'm changing it to: game:getTeamInfo(1)
02:18:55raptorso not directly constructable
02:19:01kaengreat!
02:19:30raptorbut my question is... do you think the TeamInfo object should know which teamIndex it is?
02:19:47raptorbecause, you're already going to know by grabing it with a team index..
02:20:06kaenhmm...
02:20:09kaenphilosophy.
02:20:12raptoryes
02:20:23kaenI say the object is called TeamInfo
02:20:24raptorI like asking you the philosophical ones... :)
02:20:41kaenits responsibility is keeping track of information relating to a team
02:20:59raptorthis will also be the pattern I follow for ModuleInfo
02:21:00kaenI think a team index is a reasonable thing for it to contain
02:21:14raptorok
02:21:14kaendoes it add much logic?
02:21:17kaenif not I say expose it
02:21:22raptorthat's the clincher
02:21:25kaenor add it rather
02:21:39raptorour Team objects don't actually know their own index in a game
02:21:46kaenin c++ ?
02:21:51raptorcorrect
02:22:02kaenhmm. well then I'm reconsidering
02:22:13raptorthere is a TeamManager that 'handles' it
02:22:17kaenah right
02:22:28raptorbasically you say.. give me team at index 1, and it returns the team
02:22:42raptorbut that team doesn't know its own index
02:22:48raptoractually - maybe it should though
02:22:52kaenwell that's kind of a design flaw imo
02:23:00raptoryeah, i think I agree
02:23:18raptorunless... can team indexes (indices?) change for any reason?
02:23:31kaenbut it's another thing to synchronize unless you refactor that responsibility
02:23:40kaenI have no knowledge of such a thing
02:24:24kaenwell for now I'd say don't put in on the object
02:24:43raptoryay less work!
02:24:52kaenYou Ain't Gonna Need It
02:24:57raptorhehe
02:25:32raptoroh yay, I don't have to fix building on Linux after watusimoto commited!
02:25:38kaen\o/
02:26:00kaenspector mode is getting more and more complex
02:26:07raptoroh
02:26:15raptorI was going to ask you, are you actually building that out?
02:26:29kaenI think it may be easier to make a SpectatorShip and neuter the unneeded methods
02:26:34kaenyes I was planning on it
02:26:36raptorI mean, I know you mentioned it briefly..
02:26:53raptoractually, a SpectatorShip may be a good idea...
02:27:17kaenthe mSpectating boolean would mean touching a lot of conditionals
02:27:26raptorblech
02:27:26kaenand there's no way to be certain I hit them all
02:27:55raptoryeah... I've introduced members into the Ship class before - it takes like 2-3 releases to get it working, it seems
02:28:10kaenriding on mControlObject has lead to crazy behavior (even after disallowing spectator control of the target ship)
02:28:24kaenthe target ship moves twice as fast, for instance
02:28:30raptorhaha
02:28:51kaenand I can imagine a dozen more bugs like that to track down before it's ready, so I think I'll try subclassing and see how that goes
02:29:01raptoryeah, do that
02:29:19kaenmy bird is calling
02:29:21kaengood luck!
02:29:22raptoroh yay, instant crash on start-up...
02:29:25kaen\o/
02:29:32kaentell gdb I said hi!
02:29:39raptorwill do
02:29:56raptorsigh - missing font file
02:36:07Platskies has joined
02:40:15BFLogBot Commit: 0ff33ca45a57 | Author: buckyballreaction | Message: Add new class to CMake. Also add missing font file. Is this the right one Watusimoto?
02:45:27raptorbobdaduck: I don't think I have your 'Where's Robbie' code...
03:04:04Platskie_ has joined
03:04:14Platskies Quit (Ping timeout: 248 seconds)
03:08:51Platskie_ Quit (Ping timeout: 256 seconds)
03:16:57Platskies has joined
03:21:07raptorthis is so weird
03:21:25raptorevery game object knows what team its on, but the teams themselves don't..
03:25:20Platskies Quit (Ping timeout: 264 seconds)
03:27:30bobdaducklolwhat?
03:27:37raptoryeah this is crazy
03:27:51raptoryou know how every object has a 0 or 1 or 2 on it
03:28:11bobdaduckI'm constantly updating my carnival code
03:28:12raptorwell, in the c++ code... the Team itself doesn't know if its a 0 or 1 or 2
03:28:18bobdaduckWhere's robbie is a new one today
03:28:23raptorah
03:28:35bobdaduckWhich I put in exclusively to figure out what's happening when he disappears
03:29:32raptorha I just found two methods that do the same thing: makeSureTeamCountIsNotZero()
03:29:41raptorand makeSureThereIsAtLeastOneTeam()
03:33:06bobdaduckOkay are you ready for my stupid levelgen complicated task for you?
03:33:31raptoruh sure, i guess...
03:33:53Platskies has joined
03:34:07bobdaduckOkay so I need to make goalzones shaped like swords that come off of the end of your ship and match the angle your ship is at
03:35:01raptori was not expecting that..
03:35:05bobdaduckThe shaping like swords part is optional
03:35:10bobdaduckThey can be sticks
03:35:20raptorhaha, ok
03:35:25raptorso break it down
03:35:36bobdaduckship:getAngle() or something like that
03:35:41bobdaduckand then I get lost in the math part
03:35:42bobdaduckAnd then
03:35:42raptorgoalzones always moves with your ship angle?
03:35:46bobdaduckyeah
03:36:06raptorand it needs to be at the tip of the ship..
03:36:30raptorhaha... I think I can do that
03:36:30bobdaduckYeah
03:36:33bobdaduckIts doable
03:36:39bobdaduckI just have no clue how to do it because math
03:37:01fordcarsset a point at the end of the sword, ajust angle on tick
03:37:04fordcars?
03:37:06bobdaduckAnd eventually I plan to have it so if someone touches the zone they die so its JUST LIKE SWORD FIGHTING
03:37:19raptorhahaha
03:37:26fordcarsnice
03:37:45bobdaduckWhich might be kind of weird because the only way I know to kill ships on command is by spawning a handful of bursts on them
03:37:52bobdaduckWhich might kill you too. So, um.
03:37:57bobdaduckWHATEVER I'LL FIGURE IT OUT
03:38:11fordcars*mines)
03:38:20raptorsame blast radius...
03:38:29fordcarsdoesn't move...
03:38:45fordcarsoh right sorry
03:39:10raptorok bobdaduck, give me a quick code snippet of how you plan on building the zones
03:41:49raptordo you use goalzones?
03:54:00bobdaduckyeah
04:03:49fordcars Quit (Ping timeout: 245 seconds)
04:05:38fordcars has joined
04:06:27raptordoes getAngle return degrees or radians?
04:07:10raptoroh please let it be radians
04:07:43bobdaducklol
04:07:55bobdaduckI don't have a code snippet on how I plan to do this
04:08:08bobdaduckI suppose it would be easiest to have the zones in existence and IDd
04:08:18bobdaduckAnd then you go and claim a sword
04:08:28bobdaduckand then if someone runs over a sword that isn't theirs they die?
04:08:34raptornah
04:08:46raptori'll use the registration system
04:10:32bobdaduckArrays!
04:11:57bobdaduckMultidimensional arrays!
04:13:54kaenraptor, I hope you are charging bobdaduck your contracting rate...
04:14:01bobdaducklol
04:14:15kaenbobdaduck... wtf did I just read?
04:14:23bobdaducklol
04:14:35bobdaduckWell I thought levelgen carnival needed a swordfighting room...
04:14:49kaenit goes without saying!
04:14:50bobdaduckAnd the bonus is I'm also learning calculus/algebra/physics/math from raptors code!
04:15:12raptor shameless steals code from java libraries and converts to Lua
04:15:22raptor can't verb
04:15:38SolumnMushroom has joined
04:15:40kaenthe only thing you should need to know is the circle equations :x
04:15:51SolumnMushroomHello!
04:16:22bobdaduckSup mush
04:16:49kaenx = cos(angle) * radius, y = sin(angle) * radius
04:16:56SolumnMushroomMy sister and friend are playing SSBB
04:17:18bobdaduckcool? My favorites are snake and rob.
04:17:34kaenunless you aren't using math angles @_@
04:17:42SolumnMushroomIt's friend: Link vs. sister: Toon Link
04:17:47bobdaducknope, we're using color angles
04:17:51raptorrotation and translation... at once!
04:17:53bobdaduckvia piet
04:18:09kaenbobdaduck http://en.wikipedia.org/wiki/File:Circle-trig6.svg should explain things clearly
04:18:13kaen... trololol
04:18:20raptorhahaha
04:18:23bobdaducklol
04:19:07bobdaducklol
04:19:26raptorinvalid packet...
04:19:30SolumnMushroomLink seems to be winning
04:19:34raptorbobdaduck: are you sure goalzones work?
04:19:43SolumnMushroomAnd then Nintendog
04:20:02kaenthey work for me
04:20:10raptori mean adding via levelgen...
04:20:13bobdaduckthat's what I used in the test I showed you
04:20:14kaenyep
04:20:21SolumnMushroomLink wins
04:20:23bobdaduckoh I didn't add it via levelgen
04:20:31kaenI've done it
04:20:33bobdaduckaw I was hoping Nintendog was gonna win
04:20:34kaenit works fine
04:21:04SolumnMushroombobdaduck: lol
04:21:14raptori'm using bitmatch, that ok?
04:21:28kaenyes, I actually tested it in all modes
04:21:29bobdaduckI'm just going to splice the code in anyways
04:21:31SolumnMushroomGanon vs. Kirby
04:22:01kaenadding a goalzone created with the empty constructor gave me invalid packets though
04:22:11bobdaduckuse loadouts if you want
04:22:12bobdaduckbrb
04:22:14SolumnMushroomStage: Pictochat
04:22:16raptoroh duh...
04:22:23raptorno geometry when constructed
04:22:25raptorthanks kaen
04:22:28kaenyou bet
04:23:29kaenI actually fixed that invalid packet on while I was hardening kaen test but the bug is a bit deeper than that
04:23:56kaenI think it would be sane to have a default geometry
04:24:59raptoryay lua stack traces
04:25:02raptorprogress!
04:27:00raptorhahaahahaha
04:27:02raptorit works!
04:27:13raptorsaaaaaaaaaaddsadsa
04:27:15raptorssssdasdsa
04:27:17raptoroops
04:27:36raptorthis is ridiculous...
04:28:41raptorbobdaduck: http://pastie.org/pastes/7347274/text
04:30:09Lamp89 has joined
04:30:09Lamp89 Quit (Changing host)
04:30:09Lamp89 has joined
04:30:20Lamp89kaen
04:30:21raptorooo Lamp89 is using ipv6
04:30:29kaenno
04:30:33kaenI mean hi Lamp89
04:30:35Lamp89i am?
04:30:57Lamp89anyway
04:31:00Lamp89kaen
04:31:05Lamp89your server is laggy.
04:31:05kaenstill here.
04:31:09kaenno u
04:31:20Lamp89laggier than other's servers, and you said it was the fastest
04:31:21raptorno he's laggy?
04:31:27Lamp89?
04:31:30Lamp89-_-
04:31:37kaenit is. you are mistaken :)
04:31:54Lamp89it is laggy?
04:32:07kaenno, it is the fastest
04:32:24kaen 08:32:37 up 34 days, 10:41, 1 user, load average: 0.21, 0.46, 0.43
04:32:37kaenthree bitfighter servers takes on average 20% of its cpu
04:32:37Lamp89well what about the occasional connection losses to it on some days?
04:32:53raptorkaen loop FTW
04:33:06kaenyes, that's when the server totally crashes
04:33:12kaenbecause hooligans upload crash maps
04:33:19kaenor there are maps which crash it on accident
04:33:22Lamp89no, like you lose connection for a few seconds
04:33:28Lamp89and get back
04:33:33Lamp89but it's not the internet
04:33:38Lamp89*my internet
04:33:43Lamp89others experienced it too
04:33:52Lamp89it's not everyday theough, only some days
04:33:59Lamp89not very often
04:34:03raptorVPS network lag?
04:34:07kaenso every few days you experience a few seconds of lag
04:34:13kaenI can see how this is a major problem...
04:34:25Lamp89when playing with several other players
04:34:33raptorLamp89: did you get a new keyboard from the local thriftshop yet?
04:34:40kaenappears so
04:34:48Lamp89no i dont know of any thrit shop
04:34:51kaenso anyway I'm not sure what you're getting at
04:34:57Lamp89i still don't have a keyboard
04:35:21Lamp89i'm just settling on using virtual keyboard with this one
04:35:23Lamp89also
04:35:28Lamp89w key doesn't work
04:35:45Lamp89hello?
04:36:03Lamp89raptor kaen
04:36:11kaenstill here.
04:36:15Lamp89is my internet.... nvm
04:36:28Lamp89thought internet lost for a bit
04:37:29Lamp89hey kaen, don't you hate itwhen you install something and then right when you screw the last screw, you break it?
04:37:38raptorhi
04:37:41Lamp89hi
04:37:58Lamp89what the i just saw something
04:38:06raptorme too!
04:38:13Lamp89"Lamp" is almost as long as "raptor"
04:38:24Lamp89even thought raptor has two more characters
04:38:30Platskies has left
04:38:34raptorah yes, the tyranny of the letter 'm'
04:38:45Lamp89ohh
04:38:48Platskies has joined
04:38:58bobdaduckI'm back
04:39:00Lamp89nothing else to talk about
04:39:02Lamp89hi bob
04:39:08Lamp89now something to talk about'
04:39:12kaenyou missed our rousing conversation
04:39:15raptorbobdaduck: I have fulfilled your request
04:39:20raptorhttp://pastie.org/pastes/7347274/text
04:39:22Lamp89what request
04:39:24bobdaducktesting
04:39:27bobdaduckNOTHING
04:40:10Lamp89SWORDS
04:41:11Lamp89interesting
04:41:23Lamp89swords, zones, and registering...
04:41:39bobdaduckBAHAHAHA
04:41:41bobdaduckxD
04:41:52Lamp89bitfighter is gonna have SWORDS
04:41:56Lamp89REALLY
04:41:57bobdaducknow
04:41:58bobdaduckno
04:42:02Lamp89aww
04:42:06bobdaduckThat would be STUPID.
04:42:06kaenI'm tearing out the lua scripting engine tomorrow
04:42:09bobdaduckjust levelgen carnival
04:42:09kaenthis seals it.
04:42:12Lamp89it would
04:42:12bobdaduckxD
04:42:27Lamp89LEVELGEN LEVELGEN FREEEE LEVELGEN
04:42:51bobdaduckhaven't integrated it yet
04:43:09Lamp89saved levelgn
04:45:10raptorbobdaduck: your carnival level is going to require everyone have a fiber optic internet connection
04:45:16raptorat this pace..
04:45:18bobdaduckxD
04:45:24Lamp89anyone here know minecraft?
04:45:25bobdaduckits only 600 lines of code
04:45:32bobdaduckminecraft is stupid. Everyone knows it
04:45:40Lamp89NOOOOOOOOOOOOOOOO
04:45:45Lamp89BURN DA DUCK
04:45:52Lamp89WITH LAVA
04:46:00Lamp89TRAP IT WITH A REDSTONE TRAP
04:46:12Lamp89SQUISH THE CUBE DUCK
04:46:28Lamp89GET DUCK MEAT OUT OF IT
04:46:33Lamp89and any other minecraft thing
04:46:36bobdaduckEveryone knows dwarf fortress is better anyway
04:46:38Lamp89well
04:46:47Lamp89i wish i could play it
04:46:51Lamp89IT DONT WORK
04:46:55Lamp89WAAAAAAAHHHHHHH
04:47:05Lamp89wwwwwwaaaaAAahHAhahhHHHHhhhhhhhAAAAhhhh
04:47:40Lamp89minecraft classic dont work
04:47:45Lamp89it dont work i tell ya
04:47:52Lamp89do you know about java stuff?
04:48:09Lamp89i get some LWGLW or whatever error
04:48:25bobdaduckSimplest solution: Quit minecraft
04:48:27kaen#minecraft
04:48:38kaenyou'd fight in there I think.
04:48:42bobdaduck#minecraft indeed
04:48:52kaenfit in*
04:48:53Lamp89HOW CAN I QUIT MINECRAFT IF I DIDNT EVEN START?
04:49:15raptorLamp89: you're signal to noise ratio is becoming very low...
04:49:18raptor*your
04:49:23bobdaducklol
04:49:24Lamp89?
04:49:26Platskies Quit (Read error: Connection reset by peer)
04:49:30Lamp89?
04:49:36bobdaduckGG raptor
04:50:15Lamp89why cant i connect to #minecraft in my client
04:50:22raptorgood grammar, iknow i know ...
04:50:50Lamp89oh i have to right click it and click Join
04:50:52Lamp89im in
04:51:00Lamp89WOW THATS A LOT OF PPL
04:51:18kaenENTHRALLING SIR, PLEASE TELL ME MORE
04:51:46bobdaduckrofl
04:52:08bobdaduckQuoting that to quartz
04:53:28Lamp89CAN YOU EXPLAIN THAT IN A DIFFERENT WAY?
04:55:58SolumnMushroom Quit (Quit: Leaving)
04:58:06bobdaduckrequest: /clearconsole command
04:58:14raptortype in 'clear'
04:58:34raptor(I think that works... but may be broken)
04:59:38bobdaduckyeah seems broken
05:00:01raptorwe hate our console anyways and have a rewrite on the menu..
05:00:17Lamp89 Quit (Remote host closed the connection)
05:00:20bobdaducklol
05:04:20bobdaduckOkay so
05:04:35bobdaduckI can't figure out how to check if the zone it ran over is a registeredZone
05:06:39Lamp89 has joined
05:06:39Lamp89 Quit (Changing host)
05:06:40Lamp89 has joined
05:07:04bobdaduckarg, help?
05:07:18raptorumm
05:07:26raptorhmmm
05:07:57bobdaducklike and it needs to know if its the one tied to the ship
05:08:03bobdaduckbecause the ship is constantly on its own sword
05:08:25raptorif you grab the zone from the zone registrar and compare it agains the one in onShipEnteredZone, would that work?
05:09:42bobdaduckuh
05:09:50bobdaduckI still need to check if its the one tied to the ship
05:10:20raptorget the players name
05:10:34raptorthe zone registrar is a dictionary with playerName -> zone
05:15:04bobdaduckuh
05:15:09bobdaduckGot players name
05:15:10bobdaducknow what.
05:15:11bobdaduckxD
05:16:30raptoryou can grab the zone tied to it from the registrar like so: local thisZone = registeredZoneSwords[playerName]
05:16:46raptorif it returns nil, then that player doesn't have a zone
05:18:24fordcars Quit (Ping timeout: 245 seconds)
05:18:52bobdaduckokay uhm
05:19:30bobdaduckhttp://pastie.org/7347534
05:20:00bobdaduckAlas I remain lost
05:21:16raptorwhat do you want to do?
05:21:38bobdaduckA) if zone is a sword
05:21:38bobdaduckB) if it isn't the players sword
05:21:38bobdaduckC) spawn a burst
05:22:23raptorok, so you have the zone, now do a test to determine if its a sword
05:23:20raptoryou were close...
05:24:10bobdaduckfor registeredzoneswords, if zone == value then?
05:25:21raptorsomething like this. you break it up into manageable chunks: http://pastie.org/7347561
05:25:31raptoruntested... you may find an error or two
05:30:05bobdaduckokay so its not even going through the for loop at all
05:30:27bobdaduckgetting zone collisons, but its not getting to a logprint immediately inside the registeredzoneswords loop
05:31:13bobdaduckhttp://pastie.org/7347582
05:31:35raptoroh oops
05:31:41raptorthats because its a dictionary
05:31:45raptorso use 'pairs'
05:32:15bobdaduckFrom now on never using ipairs ever again
05:32:17bobdaduck:P
05:32:22raptorheh
05:32:51bobdaduckzone is never == value
05:33:12raptori was afraid of that...
05:33:26raptorrats..
05:33:38bobdaduckwhat?
05:33:47raptorthat may make it so you do zone tests...
05:33:52raptor*can't do
05:34:20raptorwhat if... what if you set the zone to be the same team, then do a team check with the incoming zone
05:34:27raptorincoming into onPlayerEnteredZone
05:35:05bobdaduckhm
05:37:10bobdaduckThat's way bettter than my idea
05:37:56raptorwow, you have quite the command control block in your carnival levelgen you sent me before...
05:38:03bobdaducklol
05:38:06bobdaduckYeah
05:38:11bobdaduckI'm adding more too
05:38:17raptorhaha
05:38:28bobdaduckits at least twice as big as what you have now
05:39:12raptoroh man
05:40:17bobdaduckokay
05:40:23bobdaduckit is bursting on all swords
05:40:26bobdaducknow to check if its my sword.
05:41:01bobdaduckhow?
05:41:53raptordid you set the zone to be your team?
05:42:00bobdaduckno
05:42:03bobdaduckI set it to be -1
05:42:19bobdaduckbecause integration with carnival
05:42:21Platskies has joined
05:42:23raptorset it to be the same as the ship that owns it, then do a team check...
05:42:41raptorand not do a burst if the zone is the same team as the ship
05:43:19bobdaduckThat will work
05:43:28bobdaduckbut not for integration into the carnival
05:43:35bobdaduckbecause carnival has the rave party section
05:43:43BFLogBot Commit: 2d3e52719733 | Author: buckyballreaction | Message: Convert TeamInfo object to LuaW. This necessitated the following: - Put Lua methods directly on the Team object - In a Lua script, the team is not directly constructable, but can be gotten from the GameInfo object - Team now actually keep track of what team index they are - Clean-up of unused code
05:43:48raptorif isSword and isOnSameTeam
05:44:09bobdaduckthose are the same thing?
05:44:37raptoryou only do a burst if the zone that was hit is on the same team as the ship and is a sword zone
05:44:43raptorboth conditions must be met
05:44:54bobdaduckhow do I check if isSword
05:45:05bobdaduck'cause we just tried that and decided to go with teams
05:45:10raptordidn't I just send you the code?
05:45:16raptoryeah, still do it
05:45:20raptorstill do the check
05:45:34raptorso you filter twice: 1. is a sword? 2. is same team?
05:46:05bobdaduckBut we can't check if zone == value
05:46:08bobdaduckfor whatever reason
05:46:17bobdaduckso we decided to go with "its a sword if its on this team"
05:46:30raptorohhhh, that's right
05:46:32raptorduh
05:46:44raptorwell...
05:46:47Lamp89 Quit (Read error: Connection reset by peer)
05:46:51raptordo all the raveparty zones have IDs?
05:47:00Lamp89 has joined
05:47:02Lamp89 Quit (Changing host)
05:47:02Lamp89 has joined
05:47:13Platskies Quit (Ping timeout: 264 seconds)
05:47:22raptoryou could make sure it isn't one of those..
05:47:24raptoror
05:47:48raptordo a check to see if it has 5 points
05:48:06raptorwe need to find something we can check against to figure out it is a sword..
05:48:12bobdaducklol
05:48:26bobdaduckHow to check if it has five points?
05:50:59raptorsomething like this: http://pastie.org/7347667
05:51:10raptorgetting the geom of an object is just a table of points
05:51:16raptorso check table size and off you go!
05:51:48raptorFYI that last commit was some real work...
05:51:56raptor(even if it doesn't look like much)
05:52:34bobdaducklol
05:52:37bobdaduckit looked pretty big
05:52:41bobdaduckit'll fix a lot of crashes?
05:52:43raptori was verbose
05:52:51raptorit was a Lua API enhancement
05:53:37Lamp89 Quit (Read error: Connection reset by peer)
05:53:49bobdaduckyeah
05:53:53Lamp89 has joined
05:56:14bobdaduckhm
05:56:15Lamp89 Quit (Remote host closed the connection)
05:56:18bobdaduckcome try this
05:56:21raptorok
05:56:44Platskies has joined
05:57:42Lamp89 has joined
05:57:42Lamp89 Quit (Changing host)
05:57:42Lamp89 has joined
05:59:40raptorwhat have i done
06:01:18Platskies Quit (Ping timeout: 248 seconds)
06:08:52Platskies has joined
06:09:57bobdaduckohh man
06:19:32Platskies Quit (Remote host closed the connection)
06:30:04bobdaduckamazing
06:31:48raptori wonder if watusimoto will flip
06:31:56bobdaducklol
06:32:02raptorprobably not
06:32:03bobdaduckI'm hoping to stay awake long enough to show him
06:32:10raptorha
06:34:12Lamp89 Quit (Remote host closed the connection)
06:35:31bobdaduckwow
06:35:34bobdaduckokay come in for a sec
06:35:36bobdaduckjust a sec.
06:35:37raptorok
06:48:44bobdaducklol
06:48:50bobdaduckWish kaen was awake still to see that
06:48:57raptorhaha
06:52:54Lamp89 has joined
06:52:54Lamp89 Quit (Changing host)
06:52:54Lamp89 has joined
06:54:48raptorfalling asleep...
06:54:51bobdaducklol
06:54:57bobdaduckgo for bed
06:55:07raptormy kids pounce on me early...
06:55:25raptorgood night!
06:55:30bobdaduckgoodnight!
06:55:41raptor Quit ()
07:12:31bobdaduck Quit (Remote host closed the connection)
07:37:08Lamp89 Quit (Remote host closed the connection)
12:00:58Watusimoto has joined
13:01:04Platskies has joined
14:30:15Platskies Quit (Remote host closed the connection)
14:59:59SolumnMushroom has joined
15:00:34SolumnMushroomThe Bitfighter build quest is on again
15:02:06raptor has joined
15:02:06ChanServ sets mode +o raptor
15:03:25SolumnMushroomI'm trying to compile a build of Bitfighter 018a on my openSUSE computer
15:03:32raptorhi SolumnMushroom
15:03:38raptorand good morning everyone!
15:07:43SolumnMushroomPerforming a ton of updates
15:08:04raptoron opensuse 11.1?
15:08:10SolumnMushroomOnly 1.34 GB of updates...
15:08:13raptori bet there were loads of updates...
15:08:35raptorin fact, I think that was the versino of openSUSE that they had to 'remaster' because of so many bugs...
15:09:04SolumnMushroom@ about < 50 MB per update
15:10:52SolumnMushroomI'm sitting next to an NES
15:11:25SolumnMushroomModel NES-001
15:11:41raptorwhoa!
15:12:09SolumnMushroomIn perfect working condition
15:12:11raptordo you still have to blow on the cartridges to make them work? :)
15:12:19SolumnMushroomYes
15:13:13SolumnMushroomIt's my friend's NES, but he was staying the weekend so he brought it
15:14:09SolumnMushroomAlong with Zelda (1 and 2), SMB, Duck Hunt, World Class Track Meet, and Tetris
15:16:19raptorah zelda 1
15:17:18SolumnMushroomI have it on Wii Virtual Console, but it's just not the same
15:30:53SolumnMushroomDat cartrige slot squeak...
15:32:13SolumnMushroomI think I'll emulate some N64
15:45:24SolumnMushroomNot the best idea as now I am quite frustrated
16:54:30raptorwhat difference does it make if our c++ lua methods (like lua_getShip) return 0 or return 1?
16:55:20raptorbecause several return* methods in LuaBase.cpp (like returnBool(), returnInt()) all return 1
16:55:41raptorbut loads of other methods strewn about return 0
17:31:05Watusimoto Quit (Ping timeout: 246 seconds)
17:53:53BFLogBot Commit: fab94a7b10bd | Author: buckyballreaction | Message: Clean-up LuaLoadout class with respect to LuaW
18:07:51BFLogBot Commit: 030451967732 | Author: buckyballreaction | Message: Minor Lunar clean-up
18:28:55LordDVG has joined
19:20:39bobdaduck has joined
19:20:55bobdaduckgentlepeepz
19:26:39kaenhello
19:26:46kaenshow me your swords bobdaduck
19:26:49kaenpretty please
19:26:52bobdaducklol
19:26:58kaenI mean
19:26:58kaenerm
19:27:01bobdaduckI'm just about ifnished integrating into levelgen carnival
19:27:02bobdaduckxD
19:27:05kaenTHOSE SWORDS ARE AN ATROCITY
19:27:13bobdaduckrofl
19:27:18bobdaduckpity wat isn't around to see them
19:27:35kaenI'm not sure the poor guy could take it...
19:27:54bobdaducklol
19:28:08bobdaduckActually I think its far more likely he'd add them as the next gameweapon.
19:28:19kaenswordfighter
19:28:58kaenputting dishes away then I'll be back
19:29:02bobdaduckk
19:38:37bobdaduckDone!
19:38:57kaenback
19:39:13bobdaduckhosting
19:47:18LordDVG Quit (Read error: Connection reset by peer)
19:47:55LordDVG has joined
20:10:00bobdaduck Quit (Ping timeout: 264 seconds)
20:25:08fordcars has joined
20:49:53LordDVG Quit (Remote host closed the connection)
20:59:39Watusimoto has joined
21:02:50Watusimoto>>> what difference does it make if our c++ lua methods (like lua_getShip) return 0 or return 1? <<<
21:02:55Watusimotoa big difference!
21:03:12raptorhi Watusimoto
21:03:15Watusimotothat number represents the number of arguments pushed onto the stack
21:03:23Watusimotoso return nil will push nil, then return 1
21:03:25raptorohhhhhh
21:03:26Watusimotohi
21:03:46Watusimotothat's how that whole idion works
21:03:53Watusimotoreturn returnInt(5)
21:04:00Watusimotowill push 5, and return 1
21:04:07Watusimotoidiom
21:04:25WatusimotoI am rather fond of that design, if I do say so!
21:04:56Watusimotothat than number (0, 1, whatever) is used by Lua to set up the return values to the calling function
21:05:22Watusimotoclear?
21:05:34raptoryes
21:05:46raptorok.. looks like i didn't break anything (I made educated guesses..)
21:05:58Watusimotogood!
21:06:03raptorbesides my precommit Lua tests worked..
21:10:18raptoralso done converting another Lunar object...
21:13:36raptorWatusimoto: what's the easiest way to get rid of a 'const' qualifier on an object?
21:13:54Watusimotouhhhhh
21:13:59Watusimotoyou shouldn't!
21:13:59raptoryeah..
21:14:19Watusimotothere's a cast that will do it
21:14:22raptorok, then tell me why gModuleInfo would be declared const?
21:14:35raptorand by 'why', I mean, what is the advantage
21:15:00Watusimotoare you a religious man?
21:15:19raptorI am, but not the normal type - I'm willing to change my views with new information
21:15:36Watusimotowell, this is, I believe a sort of religious question
21:15:39raptor(after the information has been thoroughly tested..)
21:16:46raptorwell...
21:16:59raptoruhh.. i'll just change it to 'static' if you have no objections :)
21:17:01WatusimotoI use it for pointers that I don;t want people to use to modify the object it points to
21:17:22raptorok, that makes sense
21:17:43Watusimotoso gmoduleinfo looks like that sort of thing -- it's data that shoudn't change
21:17:48raptorI just made the ModuleInfo struct a bonified object, though, with private members
21:17:54raptorand only getters
21:18:29Watusimotoand, maybe, needs to be const to be defined where it is (not sure about that, but is sometimes true)
21:19:00Watusimotowhere is the const a problem? I've usually found that there is a clean fix when I think I am stuck
21:19:32raptorI'm adding a Lua interface to the ModuleInfo struct
21:19:52Watusimototo provide that info to scripts
21:19:56raptoryes
21:20:25raptoractually - maybe I need to ask another question: do we want ModuleInfo provided?
21:21:01raptorright now all it ever exposed was the module name and the module id (or index)
21:21:05Watusimotoideally, though I don't really see anyone actually using it
21:21:32Watusimotobut the drain/cost seems theoretically useful
21:21:38raptorno one has used it yet
21:21:50raptorso if yes, then my problem:
21:22:07Watusimotolet's see if we can solve the problem; if not, that may help us decide!
21:22:17raptori'm plugging it in to be gotten like so: local info = game:getModuleInfo(Module.Shield)
21:22:23raptorhowever
21:22:42Watusimotoand info would be some sort of moduleInfo object?
21:22:47raptorI have to do a (ModuleInfo*) ->pus(L)
21:22:51raptor*push(L)
21:22:56Watusimotoyuck!
21:22:56raptoryes
21:23:12raptoryes and the issue is that the LuaW push(L) method can't handle const
21:23:52WatusimotoI guess it can't guarantee that lua won't tinker with the value
21:24:13Watusimotowhich I suppose makes sense on some level
21:24:14raptoryeah, so...
21:24:24raptoreither i break the const or... soemthing else?
21:24:44raptorthis is my last error!
21:24:57Watusimotowell, if lua can tinker with the value, clearly we want to pass a copy, and not the orgiinal obejct
21:25:10Watusimotootherwise lua could muck with the core of the game
21:25:22Watusimotohow do we handle this for weapons?
21:25:34raptorweapons are still in Lunar, but I will hit the same problem
21:25:38Watusimotomust be the same issue
21:25:39Watusimotoyes
21:25:44raptorWeaponInfo is my last object after this..
21:26:18raptorso... if I did a new object, it is sufficient to just make a copy with 'new' ?
21:26:25raptorhow would it get cleaned up?
21:26:27Watusimotowell, one option would be to have a pushModuleInfo(L) method that writes a simplified copy
21:26:58raptorhow so?
21:27:27Watusimotoit could create a table with the name, drain, cost, etc. in it
21:27:43Watusimotoand that would be the entity that gets handed to lua
21:28:23Watusimotoactually it would have to be something like pushModuleInfo(luaState *L, const ModuleInfo modInfo)
21:29:00raptormaybe I could just override push?
21:29:04Watusimotolooking for a similar method
21:29:14raptorit's virtual..
21:29:33Watusimotooverride the moduleInfo push?
21:29:39raptoryes
21:31:12raptortinker tinker..
21:31:19Watusimotowell, what is the ultimate purpose we're trying to achiefe
21:31:31Watusimotoit's to provide scripts access to data about modules/weapons
21:31:33raptorjust get the const ModuleInfo* on the stack..
21:31:36Watusimotocost to use, etc.
21:31:48raptoryes
21:32:02Watusimotoa moduleInfo object is one way to do that
21:32:14Watusimotowell, probably a good way to do that :-)
21:32:17raptorwe already have one: the ModuleInfo struct
21:32:29raptori converted it into a class that extends LuaObject
21:32:38raptorand added the Lua interface to it
21:32:56WatusimotoI guess playerInfo is a pretty similar idea
21:33:09raptorso a completely separate class, then?
21:33:55Watusimotobut with the ship, we return interesting values separately; i.e. there is no ShipInfo, but instead getEnergy, getHealth, etc.
21:34:15Watusimotonot going anywhere specific, just thinking aloud here
21:34:19raptorso I see two modes of attack
21:34:25raptorone is like with ClientInfo
21:34:32raptorit creates a LuaPlayerInfo class
21:34:40raptorand that class has only the lua interface
21:34:44bobdaduck_m has joined
21:35:30raptorand then there is all the BfObjects and children where the interface is directly in the class
21:36:46raptorfor the first case, take a look at LuaLoadout
21:37:46raptorwhen a Loadout object is requested from Lua, the method Ship::lua_getReqLoadout pushes a 'new new LuaLoadout(loadoutItems)'
21:37:56raptoronly one 'new' there..
21:38:21raptormy question is how that gets cleaned up..
21:38:47WatusimotoI think that one is a leak
21:38:49Watusimotoactually
21:39:08raptoryeah.. i made a note in my current revision
21:39:19raptorso if i do it that way.. how do I clean up the leak?
21:40:22Watusimotoi think you shouldn't do it that way
21:41:02WatusimotoI'm not sure how to clean up the leak... perhaps ... hook into the proxy delete somehow? don't use a proxy and let lua delete the object?
21:41:14Watusimotoprobably that second one
21:41:29Watusimotobut there is also a third option
21:42:07Watusimotothat is instead of pusing the object, push a table instead, and manually write the interesting values to it
21:42:41bobdaduck_mT minus 20 minutes until watusimoto flips
21:42:53bobdaduck_mright raptor?
21:43:01raptoroh boy, yeah...
21:43:46bobdaduck_mI still haven't gotten the delete code working but its functional in my example level
21:44:15raptorWatusimoto: I was hoping I could just push the ModuleInfo object (from the original struct) directly... because that would be easiest
21:44:27raptorbut since it's const...
21:44:38raptorI need to be religious I guess
21:45:13bobdaduck_m Quit (Read error: Connection reset by peer)
21:45:13BFLogBot Commit: ac03d41d3d69 | Author: buckyballreaction | Message: Note about potential memory leak
21:45:34bobdaduck_m has joined
21:47:28Watusimotofunny how all my searches for lua info lead me to stack overflow questions I've asked
21:47:39raptorhaha, that's been my exact experience!
21:48:08Watusimotoso... what, about 15 minutes before I flip?
21:48:22raptorhe has a level to show you in a bit
21:48:36bobdaduck_mAnd you will flip
21:48:37raptorI bare some of the responsibility, like usual...
21:48:41raptorbear
21:48:43Watusimotook, I think the issue is thus: we can't pass a const object to lua because lua can modify it
21:48:51bobdaduck_mWe're taking bets on the exact extent of flippage
21:48:56raptorlet me make sure that's the case, Watusimoto
21:49:02Watusimoto(and we don't want lua to modify it)
21:49:21Watusimotowell, wait a sec
21:49:33Watusimotowhen we pass an object, we are just passing a pointer, right?
21:49:46raptorright
21:50:18Watusimotoand so that pointer is only good for running further methods like obj:getModuleCost()
21:50:53bobdaduck_m Quit (Remote host closed the connection)
21:50:59Watusimotoso we still face the problem of writing all those getXXX() methods, no?
21:51:08bobdaduck_m has joined
21:51:41Watusimotothe pointer is not good for directly acessing data members, is it?
21:52:53WatusimotoplayerInfo is just a big collection of get methods
21:53:10WatusimotogetShip, isRobot, getScore, getRating, etc.
21:53:53raptoryes, but it is created and deleted in the ClientInfo object
21:54:03Watusimotoright
21:54:15Watusimotoso there's two approaches
21:54:56Watusimoto1) create a similar ModuleInfo object somewhere, attaching it to, say, ServerGame so it gets cleaned up, and implement a stack of getXXX methods on it
21:55:39Watusimotoor 2) create a table with the info in it so scripters can access the info directly from the table, without calling getXXX
21:56:25Watusimoto2 won't work for Playerinof, because the info there is dynamic, and a table would get stale as soon as the player scored or whatever
21:56:58Watusimotobut 2 seems easier for the user, and no more difficult for us.
21:57:27WatusimotoWhat I don;t see is a good automatic way to pass a pointer to a ModuleInfo object and to be done with it
21:57:56Watusimotoeither way we need to define what info the scripter can access, and provide a method for that access
22:00:14bobdaduck_m Quit (Read error: Connection reset by peer)
22:01:59Watusimotowith our enums, we just push a table
22:02:07Watusimotowell, there's option 3
22:03:05Watusimotocreate a table with all the module info in it, and just make it available in lua like we do the enums, no getModuleInfo() call at all... it's just there as a reference
22:03:19raptorso a table table?
22:03:29Watusimototable table?
22:03:29bobdaduck has joined
22:03:38raptorhow would it be accessed in Lua
22:03:57raptorModuleInfo[Module.Shield].energyCost ?
22:04:21bobdaduckIn other news, levelgen carnival is 750 lines of code long now
22:04:23Watusimotoyes?
22:04:37bobdaduckOKAY
22:04:43bobdaduckJoin server watusimoto
22:04:47bobdaduckyou shall flip
22:04:51WatusimotoI'd say yes
22:04:55bobdaduckThere shall be much flippage
22:05:16raptorWatusimoto: that may be a good idea... simplest, too... with XMacros!
22:05:29raptoralso you should join bobdaducks server
22:05:30Watusimotosee the add_enum_to_lua code for how enums are done
22:05:36Watusimotook, going
22:05:38Watusimoto018a?
22:05:42bobdaduckyeah
22:05:44raptoryes
22:06:19Watusimotoviva le x-macro!
22:06:41Watusimotoor la?
22:06:55WatusimotoI guess it's spanish, not french
22:16:26Watusimotook, bobdaduck, I am impressed
22:16:35Watusimotoyou win :-)
22:16:45bobdaduckxDD
22:18:48Watusimotobobdaduck: sometimes I see"orphaned" swords... what are those?
22:18:55bobdaduckwhen people die
22:18:59bobdaduckThe sword stops
22:19:03bobdaduckUntil they respawn
22:19:32Watusimotook, well now you have your melee weapon
22:20:12bobdaduckxD
22:20:30bobdaduckI might add it to my masterscript
22:20:37bobdaduckand then on command everyone suddenly gets swords
22:21:09Watusimotoraptor: just to followup... I think I like option 3) best, as it seems easiest for the scripter as well... and efficient
22:21:27raptoryeah, me too... I'll tinker with that
22:21:45Watusimotoraptor: one other idea might be to think about implementing playerInfo as a set of tables that are kept updated somehow
22:22:02bobdaduckraptor: My sister says she's eager to meet swords with you in the arena
22:22:12raptorheh
22:22:13raptorok
22:22:22Watusimotonot sure exactly how it would work, but it might be a cool design
22:22:36Watusimotothen we could kill PlayerInfo and all the associated methods
22:22:41raptorWatusimoto: Lunar death first, then maybe i'll re look at LuaLoadout and LuaPlayerInfo
22:22:56Watusimotosure, of course, just thinking about options
22:23:33Watusimotobobdaduck: what is the master script? the grand collection of all your tricks?
22:23:35raptoralthough LuaLoadout memory leak needs to be addressed somehow..
22:23:45bobdaduckglobal levelgen script
22:23:46bobdaduckserver wide
22:24:09Watusimotoso almost like a custom server
22:24:20raptorWatusimoto: bobdaduck implemented a neat take on it for his 'gladiators' server
22:24:24raptorit actually pretty good..
22:24:30bobdaduckyeah
22:24:34bobdaduckhold on I'll host it
22:24:55Watusimotoso what would make that script more usable would be a way to transmit scripts to the client for "predictive" rendering
22:25:14raptorWatusimoto: yes... client-side prediction is what's completely missing..
22:25:18bobdaduckokay
22:25:20bobdaduckhosting
22:36:31Watusimotowell... great!
22:36:46bobdaduckGood and evil of scripting
22:36:48raptorso he uses a global script to do persistent server mods... sort of
22:37:12bobdaduckI think there's a bug though if you run a global script + level script (something about two main() functions)
22:37:50raptoroh really? I ran them...
22:38:31bobdaduckI dunno I just remember having something with qui's organic blocks level and a master script
22:38:36bobdaduckdidn't test it thoroughly though
22:39:07raptorok, well if you come across it again, let me know
22:39:16bobdaduckwill doo
22:39:20bobdaduckseeya
22:39:20bobdaduck Quit (Remote host closed the connection)
22:39:36Watusimotoraptor: more than you need to know: http://www.cprogramming.com/tutorial/const_correctness.html
22:39:43Watusimotoif you don't already know
22:40:43raptori remember reading that 2 years ago and not understanding anything..
22:41:25WatusimotoI've read that several times myself
22:42:00WatusimotoI started making some rendering functions const a while back; seems cleaner
22:42:20Watusimotobecause rendering should not alter state (though sometimes it does)
22:44:39fordcars Quit (Ping timeout: 245 seconds)
22:46:07Watusimotoalso raptor did you see I converted the UI namespace to Zap::UI?
22:46:25Watusimotostill not sure I like it, but I do think it's an improvement
23:25:54raptoryes, I saw that - I like it better
23:38:49raptorThis is hurting my brain.. getting ModuleInfo into Lua via the enum stuff...
23:42:37raptorso basically 'const' is used to document
23:43:31Watusimotokind of
23:43:56Watusimotopartially as documentation, partly as enforcing a declared policy
23:44:03Watusimotothis function will not modify state
23:47:42raptordinner!
23:49:30Watusimotobon apetite!

Index Search ←Prev date Next date→

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