IRC log for #riftuidev on 20120617

00:45.18SolsisI have a curious question. Anyone available?
00:54.58Nosheimaybe
00:55.07Nosheidepends on the question
01:00.18Nosheiso Solsis, what id the question?
01:05.13Solsissorry was getting some food
01:06.51Solsisafter doing a variable = unit.detail(sometable) for i, v in pairs(variable) do, Does using the values from v.XXX get expensive? or are they pretty small at that point.
01:08.03SolsisI was thinking they would be pretty miniscule since the variablees in a for loop are local correct?
01:08.46Solsisor variables of a for loop* (however you want to word it... THE i & v)!
01:11.03*** join/#riftuidev Solsis_mobile (~androirc@108-226-48-242.lightspeed.fyvlar.sbcglobal.net)
01:16.06seebsYeah, those are locals, and table lookups themselves are pretty fast.
01:16.27Nosheiyeah I believe the variables are local to the loop only, and unless your storing a ton of data in them it shouldn't be bad at all
01:17.35Solsisok.. wow.. that means I've been doing a lot of extra stupid work
01:17.37Solsis<PROTECTED>
01:19.00Nosheijust try to avoid usint inspect.unit.detail in 2 many locations
01:19.10Solsisare absolutely
01:19.21Solsisoh*
01:19.26Solsislol
01:20.38SolsisYou should still try to avoid them as much as possible... but doing this helps reduce the cost:
01:20.40Solsislocal _G = getfenv(0)
01:20.40Solsislocal unitDetail = Inspect.Unit.Detail
01:21.20Solsisie.. local details = unitDetail(cbh.QueryTable)
04:06.13SolsisAwful quiet in here tonight
04:10.50Nosheiyeah
04:27.44TorhalSolsis: You're missing something there. You're declaring an upvalue for _G, yet never using it.
04:28.31TorhalLua will perform two lookups for globals - one for the global environment, and another for the value from that environment…unless you do _G.whatever after making an upvalue for _G
04:28.43TorhalThen it already knows where your local _G is and simply has to do the lookup on it.
04:30.01TorhalSo "local unitDetail = Inspect.Unit.Detail" isn't grabbing it from your upvalued _G
04:32.33ZorbaGamasolsis, honestly, the speed gain of caching Inspect.Unit.Detail locally is pretty much irrelevant compared to the cost of calling Inspect.Unit.Detail
04:41.50Nosheiso ZorbaGama I heard that we might soon be able to eliminate the need for the grey box to tell users they can't click somewhere because we have a frame there
04:42.55ZorbaGamaI know it's an issue, it's difficult to fix. No promises.
04:43.58Nosheianother thing, would it be possible to have a way to make irregularly shaped frames?
04:45.13Nosheiwhat I'm thinking here is a way to do the CD display without needing 100 textures to do it
04:45.32ZorbaGamayou'd be much more likely to see the ability to draw arbitrary polygons within a rectangular frame than actually have irregularly shaped frames
04:45.56Nosheithat would work as well
04:46.09ZorbaGamathat said, with the texture loading fixes, 100 textures shouldn't be all that impractical. Ugly, but not impractical.
04:46.47Nosheiso not as costly?
04:47.41ZorbaGamaright - you'd want to preload all the textures into hidden Texture frames first. Once you've done that, setting a frame's texture to an already-loaded texture should be quite cheap.
04:48.51Nosheiwouldn't you need to load in all 100 textures into separate frames then?
04:49.26artonshould work with the same one I'd think. just reuse it to load the file.
04:50.14artons/file/next file/
04:50.26ZorbaGamayes, you would, but frames are cheap and frames that aren't being rendered are really, really cheap
04:50.38ZorbaGamaif you load it into a single frame then they'll be deallocated automatically when no longer used :)
04:50.52arton:\
04:51.10Nosheiyeah I can see how that will be ugly
04:51.30ZorbaGamait wouldn't entirely surprise me if someone whipped up a cheap LibPreload or whatever
04:51.39ZorbaGamaI suspect it would be maaaaaybe 50 lines of code
04:51.44Solsishaha... I was doing some testing... NOWWWW you guys come online.. =p
04:52.38NosheiI think I'd rather be able to draw the polygons inside a frame
04:53.15Nosheithough I'm guessing that isn't something easy to implement on your end
04:53.21ZorbaGamadefinitely not easy to implement
04:53.30ZorbaGamaand probably waiting on some significant refactoring in the UI system
04:53.36artonCan you pivot textures yet?
04:53.38SolsisOk.. So 2 things on my subject...
04:53.40Solsislocal _G = getfenv(0)
04:53.40Solsislocal unitDetail = Inspect.Unit.Detail
04:53.55SolsisYour saying it should have _G.Inspect.. blah blah balh
04:53.59ZorbaGamaarton, most likely I'll just end up wrapping texture pivoting/distortion/arbitrary polygons into some kind of advanced rendering frame
04:54.09artonAh yes.
04:56.08Solsisand that doing all of that putting those in locals isn't really helping me any?
04:57.02ZorbaGamasolsis, yeah, I doubt the speed you'll get from that will be significant. But that said, all you'd really need would be "local unitDetail = Inspect.Unit.Detail"
04:57.08artonZorbaGama: Is it possible currently to add Questing info on my unit tooltip addon? I mean where it'll say a unit belongs to a quest, or drops something a quest needs, how many have been killed, etcc...
04:57.21SolsisI had this long drawn out conversation with Imhothar about local unitDetail = _G.Inspect.Unit.Detail not needing the _G. since I had local _G = getfenv(0)
04:57.39ZorbaGamaarton, I don't believe so, that isn't being exposed yet. Not quite sure where to put it honestly.
04:57.46artonk
04:58.17SolsisTorhal was just saying that I did need it though?
04:58.48NosheiInspect.Quest.Detail().objective
04:59.30artonNoshei: I can match that up with my mouseover target?
05:00.03Nosheisec and ill find out
05:01.45ZorbaGamaI don't think you can - I wouldn't have embedded that into Inspect.Quest, I don't want to give out lists of entity IDs
05:01.55artonnods.
05:02.21artonThat's the big kicker with StarTip and why it can't replace the default tooltip for me.
05:02.41artonBut I haven't been in-game much either. :)
05:02.42artonlol
05:02.57artonI stopped leveling at lvl 32 I think.
05:03.13artonjust coded from then on
05:03.25artonMy computer can't handle events.
05:03.49artonbreaches or whatever they're called
05:04.09artonrift
05:04.10artonlol
05:04.17artonIt's the name of the game in fact.
05:05.16NosheiI think it could be possible to, but it would be a huge pain in the ass
05:05.27artonwould require a database?
05:05.45Nosheibecause you would have to figure out what needed to be done from the description
05:05.52artonoh
05:05.52Nosheimost likely
05:05.58artonoh well :)
05:06.03artonthanks for looking into it
05:06.26Nosheinp
05:06.53Nosheihey zorba, you mentioned the chat api earlier, is any of that up on the pts?
05:07.11ZorbaGamanoshei, won't be in 1.9, that's 1.10 at absolute earliest and that's not a guarantee
05:07.12artona database design would suck because you can't discover anything freshly new.
05:07.21artonyou have to have that information already
05:07.24artonso no go
05:08.03Nosheibummer, was hoping to play around with it a bit
05:09.17TorhalSolsis: You're shadowing _G by declaring the upvalue
05:09.31TorhalHowever, by not USING the upvalue, it's defaulting to the global version.
05:10.02TorhalBut in that upvaluing of Unit.Inspect.Detail, it's not necessary at all because it's happening exactly once.
05:10.29TorhalSimply making a local version of _G doesn't necessitate the requirement of explicitly using it is what I'm saying.
05:10.37TorhalEr, does
05:10.58TorhalYou're shadowing The original _G, not replacing it
05:11.35TorhalIf in doubt, fire up luac and test both methods.
05:11.46TorhalThe bytecode execution will definitely be different.
05:12.43Nosheizorba are we going to be able to edit settings for the console?
05:13.26ZorbaGamanoshei, probably, but unless someone comes up with a really awesome idea that they can't do yet, it'll probably be low priority.
05:14.11NosheiI'd like to have more than one combat tab, so I can easily see different types of combat events
05:14.58ZorbaGamayou probably won't be able to override the combat tab lockouts, at least unless we implement that on our side
05:15.06ZorbaGamathough to be honest I have no idea why we allow only one combat tab
05:16.00Nosheiyeah it would be nice to add more
05:18.33Nosheiwould it be able to add a stat for threat modifier (from buffs and talents)?  obviously we would need it on abilities as well.  Though I think I remember you saying it would be a huge pain
05:19.33SolsisTorhal, I think I understand that having _G but not having _G.Inspect... is making those statements worthless.
05:19.55TorhalThe speed-boost, yes.
05:20.02ZorbaGamathere's a few problems, honestly - one of them is that design may not want to expose that data. another problem is that the data may be difficult to retrieve or difficult to calculate.
05:20.12TorhalReally, though, since you're upvaluing Inspect anyway...
05:20.33Solsiswhat do you mean upvaluing?
05:21.00TorhalI use a local _G if I don't upvalue something. Like, type() for example. If I'm using it once or twice, I don't need to make an upvalue for it, so I'll do _G.type(whatever)
05:21.17TorhalWhen you make a local reference, it's an upvalue.
05:21.29ZorbaGamatorhal, I'm honestly not sure upvaluing _G is a speed benefit
05:21.36Torhalhttp://www.lua.org/pil/27.3.3.html
05:21.55TorhalZorbaGama: Very minor one. Lua has to do a lookup to find _G, then perform the table lookup within it.
05:22.18ZorbaGamabut it doesn't do a lookup for _G - it's a virtual stack index, just like upvalues are
05:22.37TorhalSolsis: http://www.lua.org/pil/27.3.3.html
05:22.59NosheiI dont think it would be horrible difficult to calculate, we already know a decent amount about threat as well.  The only thing we don't know is how much abilities that "generate significant threat" add to the threat modifier
05:23.27ZorbaGamathat said I really wish luajit supported lua 5.2's setfenv replacement, it's super-elegant
05:24.17TorhalZorbaGama: I never actually did experiments with luac to confirm, but Mikk has this in his FindGlobals project: "Put a "local _G=_G" at the top of the file, and then access them through _G.SomeFunc, etc. This is actually somewhat faster than accessing them directly, believe it or not. (Direct global access involves looking up the global variable table first!)"
05:24.38TorhalBut he has, so I believe him.
05:25.05ZorbaGamaHuh. well, I'll admit I'm skeptical, but if he tested it, then he's put more work into it than I have :)
05:25.18ZorbaGamaAlthough note that luajit's performance patterns may be different than vanilla jit's
05:25.56SolsisSo just to be clear you are saying that local unitDetail = _G.Inspect.Unit.Detail is correct? Yes?
05:26.54TorhalOh, I don't doubt that.
05:27.05TorhalSolsis: Yes.
05:27.15SolsisOk..
05:27.21TorhalThough not neessary since you're doing it one time.
05:27.22SolsisThat's how I originally had it.
05:27.28Torhalnecessary*
05:27.43TorhalIf you were doing the assignment several times in a loop, it would be helpful
05:27.49TorhalSince you're not, it's just fluff.
05:28.09ZorbaGamaalthough I am going to point out again that this is probably a microoptimization that is just not worth worrying about :)
05:28.12NosheiI'll bug zinbik, see if that additional threat from attacks and items is something he could let us in on.  Outside of that data, everything else is fairly simple to a certain extent, since we can guess a lot about a persons spec from the abilities thay have
05:28.20SolsisWell.. I call unitDetail a various amount of times through my addon.
05:28.37ZorbaGamaYeah, if you can get that data in the FTP data, I don't even bother asking Design if I can add it to the addon system, I just assume it's fine
05:29.04SolsisZorba: Though that may be true... it's already there and I've coding around so.. changing it now would be messy.  :P
05:29.10TorhalZorbaGama: It is
05:29.20Nosheialso, how about being able to inspect other players abilities?
05:29.22TorhalI just use it to be clear that I'm using a global var
05:30.00ZorbaGamasolsis, lemme see if I can explain why I think this is unnecessary :) Let's say you take frequent trips across the country via plane. Every few days, you troop back across the country, six-hour plane trip and all.
05:30.20ZorbaGamaThese optimizations are like moving your bed two feet closer to your door to make it a shorter trip.
05:30.26Torhal<PROTECTED>
05:30.45TorhalIf you want to test yourself, use the Lua interpreter and do both versions in a 10k loop
05:30.56TorhalYou'll see that one _is_ faster, but not enough to care about.
05:31.04ZorbaGamaInspect.Unit.Detail() is really expensive. Like, really really expensive. It does a *lot* of work. Table lookups are effectively free compared to it. Note that Inspect.Unit.Detail is two table lookups, and reading .name and .hp out of the resulting table is *also* two table lookups
05:31.37ZorbaGamaI'm not saying "don't do this", but I am saying that if you have a choice between this optimization and adding new features to your addon, you'd probably be best served by adding the features.
05:33.00SolsisRight.. Which makes sense Zorba. Like I said.. I've already got it all in place. Wherever Inspect.Unit.Detail would be located is where I put the unitDetail variable
05:33.04TorhalOptimization should always come after everything is done AND you're noticing things are slow.
05:33.29SolsisI completely agree.
05:33.39TorhalThough upvaluing to get rid of 2-3 table lookups is nice, and makes the code shorter
05:36.20TorhalZorbaGama: I'm a bit curious as to what Legend of Grimrock's Lua API is like. Can't wait until they release their level editor.
05:36.47SolsisThe whole _G thing came about out of a random conversation that I asked about earlier today
05:37.59SolsisMy addon is already coded around those variables so I'm not doing anything new... and I'm not sitting here recoding everything for a little bit of performance. Thanks for the info though.
05:38.12TorhalI use it as a "because I can" pre-optimization because of my tendency to do things like _G.type(whatever) when I don't use type() eveough to upvalue it and I like being explicit that this isn't MY function.
05:38.42Torhala/eveough/enough/
05:38.54*** join/#riftuidev arton (~arton@tx-184-6-177-47.dhcp.embarqhsd.net)
06:16.16ZorbaGamasolsis, looking forward to seeing the result of all the work you're doing on this addon, btw, it sounds like you're putting a lot of good code in :)
06:23.09SolsisI'm trying
06:23.22SolsisGadgets is going to be hard to beat
06:23.42SolsisNot really competing per say.. but still.
06:31.56artonSolsis: What's the addon about?
06:36.35SolsisMine is a raid frame addon like grid/healbot
06:53.25artonOh cool
07:03.35artontrolls Rift chat lines.
08:30.46*** join/#riftuidev Imhothar (Miranda@ppp-188-174-125-207.dynamic.mnet-online.de)
09:01.47SolsisYou still there Zorba?
09:04.41ZorbaGamayup, what's up?
09:06.18*** join/#riftuidev Wildtide (~Wildtide@host86-135-35-151.range86-135.btcentralplus.com)
09:07.43SolsisSo the Command.Context issue on offline units, would that also affect like units that are in your party that you haven't "seen" yet or haven't been in your zone yet?
09:08.03SolsisCause I can't right click on them either.
09:08.27SolsisExample.. you're in a dungeon and someone ports out.. you can't click them anymore.
09:08.35ZorbaGamayeah, it would. I think that's fixed on the PTS now
09:09.14SolsisNo offense to Rift's default UI... but once that is fixed... I can hide EVERYTHING.  =)
09:09.36SolsisWoot
09:09.41SolsisIs there a date on 1.9 yet?
09:10.05ZorbaGamanot officially announced :)
09:12.05Solsisk
09:12.11Solsissecrets... ugh
09:12.16SolsisI see that smile
09:12.26SolsisIs it soon?
09:12.53ZorbaGamac'mon, you know full well I'm not gonna answer that question either
09:13.19Solsislol
09:13.21Imhotharhe's new
09:13.30Solsisbut I'm not stupid
09:13.34Imhotharmany things to learn he has
09:13.49SolsisI work in a business where integrity is important as well
09:14.03SolsisDoesn't mean I can't give him hell though... He loves us.  :P
09:14.28ImhotharZorbaGama, I heard you were working on the texture loading issue
09:15.05ZorbaGamaimhothar, I believe it's fixed, I'm not 100% sure that the fix is included on the PTS but it'll be part of 1.9 (barring some disastrous bug I'm not aware of, of course)
09:15.27Imhotharso was reloading the texture from disk everytime actually a bug?
09:15.42ZorbaGamayeah, that wasn't intended. Side effect of how the loading was happening.
09:16.16ZorbaGamaNow it'll load a texture once and once only, although it will throw away the texture data again once no frames are using that texture.
09:16.21SolsisSo now once a texture is loaded now it will be cached for every other time you load it?
09:16.33Solsisok
09:16.36Imhotharawesome
09:16.48Solsisso changing textures still costs.
09:17.04ZorbaGamachanging textures only costs if you're changing it to a texture that isn't yet loaded
09:17.19ZorbaGamayou can do a bunch of trickery with "pre-loading" textures by creating an invisible Texture frame and setting it to whatever you want to remain in memory
09:17.33SolsisYea.. I saw you guys talking about that earlier
09:18.39ZorbaGamaI think this actually taps into the same texture cache the game itself uses, so you could theoretically write an addon that made the soul tree load faster by preloading all of your calling's icons
09:18.52ZorbaGama(at memory cost, of course - that's why we don't do it by default)
09:20.29Wildtideis a happy lil' Wild, didn't know that was coming :)
09:20.31SolsisThe short lag of opening the soul trees isn't that big of a deal. Doesn't bother me... some people whine about it but it's like... why? What is it hurting? Nothing!
09:22.21Wildtidehey Zorba, I was playing KØЯ. last night. man that's a frustrating game! ;)
09:22.23Solsisoh.. and I was totally rude earlier Zorba... Thanks for the compliment on my addon. It's functional now and out there.. not sure you can ever really consider something like that "finished" but it's mostly done.
09:22.35ZorbaGamawildtide, yeah, it's kinda tough :D enjoying it?
09:22.37Wildtideyep :)
09:22.44ZorbaGamayou get a different ending if you get through it below a certain number of deaths, although there's nothing really telling you so
09:22.58Wildtideit says i need to get through with less than 4 deaths
09:23.06ZorbaGamaoh, it does? I guess I fixed that then
09:23.14ZorbaGamaokay, yeah, less than 4 deaths! it's tough but I promise it's possible
09:23.26Wildtidebut i keep getting mobbed by 3 biggies at once, need to get quicker with the grapple
09:23.48ZorbaGamasolsis, no worries :) it just concerns me when I see people possibly burning a lot of time on things that aren't great uses of that time. In my old addon days I always saw people trying to shave off tiny fragments of memory usage
09:24.06ZorbaGamalike, dude, your addon uses less than 200k of RAM, *nobody cares anymore, stop that*
09:24.16Solsislol
09:24.17Solsisyea
09:24.49ZorbaGamathis is one of the reasons rift doesn't report on per-addon memory usage :V (the other reason being that it's really hard and I don't think it's actually doable without major changes to luajit)
09:24.53SolsisYea.. Like I said though.. Mines already using those methods and is coded around them so wasn't nothing to change but 4 lines
09:25.06ZorbaGamabut yeah, it looks like you're overall on the right track, so, rock on!
09:25.22ZorbaGamawildtide, one of the important things in the game is that there's almost never a case when you need to grapple-damage something ASAP
09:25.53ZorbaGamaif your choice is between maybe doing grapple damage while possibly dying, and not doing any damage but definitely living, the latter choice is almost the right one
09:26.21ZorbaGama(unless you're trying to do something gimmicky like defeating that miniboss that shows up and leaves within a second or two - it is possible, but it's really really tight)
09:26.46Wildtideit's the 3 at once, when they start spamming cubes of doom, it gets a bit hectic
09:26.56Wildtidereally cool though
09:27.07ZorbaGamaI clearly need to play that game again, I don't even remember that
09:27.59SolsisWell.. some of it was stuff I saw in other addons or learned from talking to people like Imhothar. So some it is there just because it works. Not because I understand it. Which is what I'm trying to do now. As far as optimization and performance, I'm not sure what something like a unit frame addon would use as "typical" CPU usage so right now I don't even really have a target.. I just want to keep it as low as possible. Seems
09:29.34Wildtidebeen reading your blog as well, it's really interesting stuff. your take on personal involvement vs. being a bit player in an epic storyline is spot on, i think
09:31.14Solsisme? or Zorba?
09:31.40ZorbaGamahah, I forgot how neat some of the special effects in kor were. I did a good job on that game
09:31.53Wildtideyou did :)
09:31.53ZorbaGamaa lot of subtlety, too - if you haven't noticed what happens to the background, pay attention to it :)
09:32.06Wildtidei haven't... *scoots off to have a look*
09:32.19ZorbaGamait's a very gradual change, it's most obvious if you compare the beginning to the end
09:32.35ZorbaGamasolsis, www.mandible.net - I do a lot of blogging about gamedev
09:40.25Wildtide9 deaths, it said less than 6 this time (must've remembered wrong)
09:40.38ZorbaGamathere's a few endings
09:40.40Wildtidei see what you mean about the background. that is really cool
09:40.59ZorbaGamaone of them is between 4 and 6 :)
09:41.05Wildtidelol
09:41.23ZorbaGamaI think if you do really badly it doesn't even let you fight the last boss
09:41.39Wildtideyep, it doesn't
09:42.03Wildtideor so someone told me... obviously i've never failed that badly myself... *cough*
09:42.05ZorbaGamaI got better at score eventually - Shopping Adventure is the best score system I've developed, by far
09:42.20ZorbaGamabut player motivation is an absolute nightmare of a subject
09:42.31Wildtidehaven't seen that one, i've only seen the 3 recommended games on the site?
09:42.48ZorbaGamahttp://www.mandible.net/category/monthly-game/
09:42.54SolsisDoes anyone remember colonization?
09:43.02ZorbaGamathough note there's a really big reason some of these weren't recommended. ;)
09:43.13Wildtidehehe :)
09:43.18ZorbaGamasolsis, I know it was a 4x-ish game made by Sid Meier, I don't know much more than that
09:45.41Wildtideare these all written using your own RAD game engine?
09:46.08Wildtideyou're somewhat prolific, have only managed to read about 0.1% of your site ;)
09:47.28ZorbaGamayeah, although that game engine has been modified so much that the end result bears only dubious relationship to the beginning
09:48.02ZorbaGamathough, interesting fact here, that game engine is where the first bunch of attempts on the Frames API came from :V
09:52.09SolsisHow bad are doing things like Frame:GetAlpha()? or GetText() etc
09:52.32ZorbaGamaGet is quite efficient. I wouldn't include it as part of a super-high-performance loop, but if you just need it occasionally, go for it
09:53.58Wildtideif you managed to build a game engine and evolve it, you're doing better than me. i've got about 20 half finished ones. i'm terrible for "starting again better", which means i never finish anything
09:55.03ZorbaGamafinish a game, yo. Most important part of game development.
09:55.12ZorbaGamado some game jams or monthly game competitions :)
09:56.22Wildtidei do quite like the idea of a 48 hour game. might give that a go (though not in one sleepless session)
09:56.31ZorbaGamayeah you absolutely want to sleep
09:56.34ZorbaGamacan't do gamedev on no sleep
09:58.16Wildtideanyway... my son is hovering, making random noise on my guitar and talking nonsense, which always means he wants to play Minecraft. better let him on :)
09:58.34ZorbaGamasounds like a plan, cya :)
09:58.39Wildtide|afk*waves*
09:59.13SolsisSo.. I already knew this... but Rift is an amazingly beautiful game.
09:59.21ZorbaGamaWe've got some great artists.
09:59.27SolsisJust for kicks my friend and I were playing with the settings.
09:59.49SolsisI bumped it not only to ultra.. but went ahead and dragged all the sliders to full.
10:00.44Solsishovering around 20-25 fps. Went exploring some different zones with said settings... Did that for almost an hour maybe a little more... it is just freaking crazy. I wish everyone could see the game like this.
10:01.14ZorbaGamaI wish we could get the game running faster at those graphics settings
10:01.24ZorbaGamabut rendering is hard :/
10:01.35SolsisDid a warfront.. farmed some Oricalcum in EI just to see what it would do under pressure.. still wasn't too bad.
10:02.13SolsisI would imagine part of it is due to stuff in the graphics engine you use? same reasons for the loading issues in Meridian and such.
10:02.45SolsisReally overall it's great. But things can always be better.
10:03.32SolsisI'm not one to really dig into that stuff so I dont' want to speak over my head but really it looks pretty nice.
10:04.07SolsisI'm going to try leaving my settings like this for a little while.. see how bad "real work" actually kills it.
10:05.02ZorbaGamaeh, part of it is just that MMOs are a bear to render. Other games can have reasonable predictions about what's going to be displayed, but MMOs are just chaos
10:05.05SolsisI've got a nice card. I just but it seemed like the default settings were actually producing the same or lower fps than when I jacked it all up.
10:05.28ZorbaGamapeople expect to see a hundred units walking around the screen, and people expect to see Crysis-level quality with only one unit on the screen, simultaneously. These things don't happen simultaneously. :)
10:05.35SolsisWhich makes sense.. I'm not knocking it or anything. It really is a beautiful game.
10:05.51SolsisOh definately not.
10:06.22SolsisJust think of what Crysis did to PCs with just that 1 unit. Lol... Now multiply that by 50 people standing in Meridian.
10:06.32ZorbaGamaYeah, not really practical :D
10:06.36Solsis= very dead PC
10:07.01Solsisif you could have negative framerates.. that would probably do it.. lol
10:07.15ZorbaGamathat's the point where you measure it in seconds per frame instead
10:11.04Solsislol
10:16.24Baananohi
10:20.51SolsisHeya Baanano
10:21.48Baananohi solsis, how are you doing?
10:23.05SolsisWhat about changing the width and stuff for textures (currently). You set a texture to something, in my case a health frame and of course it's width is changing and stuff all the time.
10:23.27SolsisDoes it bother the cpu much now? and will it less after 1.9?
10:23.46SolsisI'm doing pretty good Baanano. Yourself?
10:23.57ImhotharYou need to get less paranoid about CPU consumption
10:24.17SolsisCurious
10:24.23SolsisNot paranoid.
10:25.06SolsisSince we were having a conversation about the texture changes and all.
10:28.54Imhothartechnically that's I/O-bound
10:29.24ZorbaGamakeep in mind it doesn't really change the texture, just how the texture is rendered
10:34.47SolsisK
11:02.21*** join/#riftuidev Baanano (~chatzilla@202.pool85-59-204.dynamic.orange.es)
12:00.53*** join/#riftuidev Sunspots (~Sunspots@c213-89-208-104.bredband.comhem.se)
12:48.40Solsisalright.. i'm calling a break.. i'll be back later... Happy Father's day those that it applies to!
13:06.56Baananocoroutine sync is a pain >_< are any of you good with them so i can ask you some questions?
13:23.21Wildtide|afki read the docs, that's about as far as i went :)
13:34.44*** join/#riftuidev Sunspots_ (~Sunspots@c213-89-208-104.bredband.comhem.se)
14:15.58*** join/#riftuidev Solsis|mobile (~androirc@108-226-48-242.lightspeed.fyvlar.sbcglobal.net)
15:26.26*** join/#riftuidev Sunspots (~Sunspots@c213-89-208-104.bredband.comhem.se)
17:14.31*** join/#riftuidev ChanServ (ChanServ@services.)
17:14.31*** mode/#riftuidev [+o ChanServ] by kornbluth.freenode.net
17:43.11seebsBaanano:  I'm not sure I'm "good with" coroutines, but I have used them successfully a few times.
17:45.56*** join/#riftuidev Noshei (~quassel@c-67-161-146-244.hsd1.co.comcast.net)
18:07.11Baananoso seebs, how would you nest coroutines?
18:08.50seebsI am not sure what you mean by "nest".  The thing about coroutines is that they don't really have a fixed location in the call stack; you can call them from wherever.
18:10.24Baananoi think the problem aren't the coroutines themselves, just how i'm using them, let me explain
18:10.29seebsSo I'm not quite sure what you're trying to do.  In theory, coroutines could probably call each other, although if they went back and forth much I'd expect you to run out of stack.
18:11.28Baananoi'm using a queue manager to split execution across frames, and it does that by using coroutines
18:12.59Baananoyou send a task to the queue manager like this QueueTask(priority, task, callback), where task is the function with the coroutine.yield calls inside, and callback is the function you want to be executed when the task is finished
18:13.25*** join/#riftuidev Noshei_mobile (~Noshei@c-67-161-146-244.hsd1.co.comcast.net)
18:13.37Baanano(ignore the priority right now)
18:14.22seebsOkay, makes sense.  So it'll be doing coroutine.resume(task, args) until that yields nil or something?
18:14.46Baananountil it returns (coroutine.status = dead)
18:15.03seebsAhh, okay.
18:15.54Baananothis needs to be a queue, to avoid a second task to execute while the first one might have the variables in an incoherent state
18:16.17seebsMakes sense.
18:18.18Baananoso i have a GetAuctions(callback, criteria) function, that uses this thing to search the auctions that match the criteria, across several frames if needed, and then calls the callback with the results
18:18.36seebsk
18:19.23Baananonow i want to write a GetAveragePrice(item) one
18:20.02Baananoas it can trigger the watchdog, it needs to be async too, so it would be GetAveragePrice(callback, item)
18:20.40Baananoproblem here is that GetAveragePrice needs to use the GetAuctions one
18:22.09Baananoand i can't use the queue manager as it is right now, as it won't execute GetAuctions until GetAveragePrice has ended
18:25.31Baananoi guess i could add a InsertTask(priority, task, callback) to the queue manager to insert in the head of the queue
18:25.31seebshmm
18:26.23seebsI see your point.  I think what I'd do is have GetAveragePrice(item) look like GetAuctions(...); ComputeAveragePrice(...)
18:26.37seebsOr, wait.
18:26.48seebsGetAuctions(ComputeAveragePrice, item)
18:27.02seebsWhere ComputeAveragePrice is a callback which can then, itself, do whatever's needed.
18:27.36seebsAnd if its computations can hit watchdog, then you go one step further, and GetAuctions(function (...) ComputeAveragePrice(callback, ...) end, item)
18:28.19Baananothat could work
18:29.09Baananoi'm going to try
18:29.41Baananobut i think this code is going to be ugly, i hope i never have to modify it again :P
18:29.45Baananothanks seebs
18:40.55Baananocan i ask you the "more difficult still" part, seebs?
18:47.00seebsGo right ahead.
18:48.24Baananonow imagine that part has been solved and i have GetAveragePrice, GetMedianPrice, GetAnotherPrice, ... functions that work that way
18:48.58*** join/#riftuidev Noshei_mobile2 (~Noshei@184.232.197.25)
18:49.35Baananoi need a GetAllPrices(callback, item) now that calls those in a for loop and builds a table like { average = 70, median = 17, ... }
18:51.26Baananothe list of GetXXXPrice functions isn't known until GetAllPrices is called, as you can add or delete pricing functions
18:52.41seebsOkay.  You clearly *must* have a table of the GetFooPrice functions; you can't do this without that table.
18:53.07seebsHmm.  You already have a queue, so life is easy.
18:53.18seebsImagine a table, p, containing all the GetFooPrice functions.
18:53.34seebsMake a copy of that table, and then:
18:53.40seebslast = table.remove(p, #p)
18:53.48seebsstash = {}
18:54.01seebsfor _, func in ipairs(p) do
18:54.06seebsstash[func] = {}
18:54.34seebsfunc(function(...) stash_in_table(stash[func], ...) end, item)
18:54.36seebsend
18:54.52seebslast(function(...) process_last_callback(stash, ...) end, item)
18:55.07seebsAll the Get* are going into the queue (if that means I spelled the calls wrong, fix that up).
18:55.29seebsEach of them is queued, and the stash_in_table callbacks stash their results in stash[func].
18:55.47seebsThen process_last_callback gets the table of stashed values, plus the final value, and can do all the statistics.
18:56.21Baananoi really like it, i wouldn't have imagined such as solution
18:56.57Baananothanks again, seebs :)
18:57.38seebsThe basic gimmick is to just ignore the "I call this and then that" logic because the queue already hides it for you.  :)
18:59.16Baananomy problem was detecting when the last one has been processed, and you've solved it in cool way
18:59.44Baananoat first i was clueless why were you removing a function from the table :P
19:10.12seebsActually, there's a simpler way.
19:10.23seebsfor idx, func in ipairs(p) do ... if idx == #p then ...
19:12.26Baananoi'm doing it this way, i think it should work too:
19:14.22Baananofunction PublicInterface.GetPricings(callback, item)
19:14.23Baananolocal prices = {}
19:14.25Baananofor pricingModelID, pricingFunction in pairs(pricingModels) do
19:14.26BaananoQueueTask(Priorities.HIGH, function() return pricingFunction(item) end, function(price) prices[pricingModelID] = price end)
19:14.28Baananoend
19:14.29BaananoQueueTask(Priorities.HIGH, function() callback(prices) end)
19:14.31Baananoend
19:29.25seebsOh, that's nice too.
19:29.27seebsGood insight.
19:35.39Baananono, it doesn't work, your is better
19:51.26*** join/#riftuidev Noshei_mobile2 (~Noshei@173.134.252.86)
20:12.18*** join/#riftuidev Noshei_mobile (~Noshei@c-75-71-99-42.hsd1.co.comcast.net)
20:24.50*** join/#riftuidev Noshei_mobile2 (~Noshei@c-75-71-99-42.hsd1.co.comcast.net)
20:42.48*** join/#riftuidev Noshei_mobile2 (~Noshei@184.229.208.69)
21:25.03*** join/#riftuidev Noshei_mobile2 (~Noshei@184.229.39.230)
22:55.03Baananosee you tomorrow

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.