Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 341 342 343 344 345 346 347 348 349 350 351 .. 5022
502,152 events total
2020-10-01 06:03:14 <tzh> i'd _like_ to be able to send in some 'render' event into the frp network 60 times a second or w/e based on some external timer, but right now since i'm not running render events in the event network itself the code is kind of a mess since i have to have a separate timing loop with some synchronizing variables
2020-10-01 06:03:17 <tzh> and it's kind of a mess
2020-10-01 06:03:39 <hololeap> what are you using frp for?
2020-10-01 06:03:57 <tzh> handling inputs mostly
2020-10-01 06:04:29 <tzh> those are getting pushed into the network and turned into updates to a game info mvar kinda type, which in turn is read by the rendering loop
2020-10-01 06:04:43 <tzh> which is not exactly how frp is intended to be used as i understand it :V
2020-10-01 06:04:45 Xnuk- is now known as Xnuk
2020-10-01 06:06:06 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-10-01 06:10:58 <hololeap> tzh: i wouldn't have frp doing much other than controlling some kind of state using user input, and have it on its own thread apart from most of the gpipe stuff. you can use MVar, TMVar, etc. to communicate between the threads.
2020-10-01 06:13:00 <tzh> hololeap: the problem i'm having with that is that my timesteps are getting messed up. if i poll the time outside of the event network, its values are actually 'back in time' compared to values happening 'at the same time' within the event network, presumably due to some differences between logical vs. actual time
2020-10-01 06:13:12 × xcmw quits (~textual@dyn-72-33-0-89.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-01 06:13:42 <tzh> which leads to things like animations being messed up because the time given to a frame being render happens 'before' the time stored in the data structure
2020-10-01 06:14:28 <tzh> so i'd have to, like, poll the time 60fps or something and fire that into the event network anyway, or something like that, to get a monotonic time value that's also up-to-date for each frame
2020-10-01 06:16:03 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Ping timeout: 240 seconds)
2020-10-01 06:16:31 <hololeap> yes, that is what you should do
2020-10-01 06:16:39 jgt joins (~jgt@188.239.64.32)
2020-10-01 06:16:59 <hololeap> fire the event on each frame
2020-10-01 06:18:30 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-10-01 06:18:34 <tzh> yeah i guess that makes sense. still requires some restructuring of the game logic but probably not as much as totally rewriting the render/frp interface
2020-10-01 06:18:50 Quarl joins (~Quarl@94.191.138.174.mobile.tre.se)
2020-10-01 06:20:03 coot joins (~coot@37.30.49.34.nat.umts.dynamic.t-mobile.pl)
2020-10-01 06:20:23 × snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-01 06:21:07 × zacts quits (~zacts@dragora/developer/zacts) (Ping timeout: 240 seconds)
2020-10-01 06:21:47 Alphi joins (~Alphi@193.56.252.210)
2020-10-01 06:22:16 <hololeap> maybe take a look at
2020-10-01 06:22:17 <hololeap> https://github.com/Twey/gloss-banana/blob/master/Graphics/Gloss/Interface/FRP/ReactiveBanana.hs
2020-10-01 06:22:42 <hololeap> it uses gloss, which simplifies the rendering quite a bit, but you might get some clues from there
2020-10-01 06:23:07 zacts joins (~zacts@dragora/developer/zacts)
2020-10-01 06:23:22 tomku joins (~tomku@unaffiliated/tomku)
2020-10-01 06:24:01 <tzh> yeah i'll take a look
2020-10-01 06:25:03 jb55 joins (~jb55@gateway/tor-sasl/jb55)
2020-10-01 06:25:26 <tzh> it's actually been a while since i touched this part of my code so i was just idly thinking for solutions, but when i get back to digging into the rendering+timing guts this looks like it'll help
2020-10-01 06:26:25 <tzh> it looks like gloss provides a callback for tick handling, and so this just hooks that up into sending time messages into the network?
2020-10-01 06:26:34 × hiroaki quits (~hiroaki@ip4d176049.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds)
2020-10-01 06:27:38 dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
2020-10-01 06:28:00 × zacts quits (~zacts@dragora/developer/zacts) (Ping timeout: 265 seconds)
2020-10-01 06:28:27 <tzh> so i guess i'd just have to run my own timing loop based on some target-fps value and use that to push 'canonical' times into the event network, and then have the rendering loop render and pause, or something. although i guess that still has the timing issue, since to know how long or if the rendering loop should wait it would need to poll time from outside of the event network
2020-10-01 06:29:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-01 06:30:01 <hololeap> i've seen how this is done with gloss. it has a playIO function which takes a (s -> IO Picture) which it internally runs every frame
2020-10-01 06:30:20 thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de)
2020-10-01 06:31:08 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-01 06:31:12 <tzh> right, but how does it determine internally when it's time to render a new frame?
2020-10-01 06:31:30 <tzh> or is the answer just "any time has passed"
2020-10-01 06:32:51 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-01 06:33:35 <hololeap> is there some way with gpipe to create a function that calls an IO action, which produces the output, on every frame?
2020-10-01 06:34:29 <hololeap> because this can be the `Behavior Picture` equivalent that your network produces
2020-10-01 06:35:02 <tzh> i mean, gpipe is only a rendering library; if i want something to happen every frame i have to make that happen myself. like, i have a function that does the draw calls and swaps the buffers, that kind of thing, it's just the question of how to give that a time value that's meaningful in the context of the current game data
2020-10-01 06:35:40 <hololeap> i see
2020-10-01 06:35:54 × Sigyn quits (sigyn@freenode/utility-bot/sigyn) (Read error: Connection reset by peer)
2020-10-01 06:36:55 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-01 06:37:52 × thir quits (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-01 06:37:59 thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de)
2020-10-01 06:38:06 <hololeap> i think you would need to set up the timer seperately, which would poll the frp network and render the frame on every tick
2020-10-01 06:38:24 Sigyn joins (sigyn@freenode/utility-bot/sigyn)
2020-10-01 06:38:24 ChanServ sets mode +o Sigyn
2020-10-01 06:38:53 knupfer joins (~Thunderbi@i59F7FFF3.versanet.de)
2020-10-01 06:40:01 <tzh> yeah i'll probably have to think about this more while actually working on my timing code
2020-10-01 06:40:12 <tzh> but i have a few more ideas now at least so that's been helpful
2020-10-01 06:40:35 × jgt quits (~jgt@188.239.64.32) (Ping timeout: 240 seconds)
2020-10-01 06:40:51 <hololeap> you can also ask on #reflex-frp. they may have some general ideas even though you're using reactive-banana
2020-10-01 06:41:08 m0rphism joins (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de)
2020-10-01 06:41:31 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
2020-10-01 06:41:37 ggole joins (~ggole@2001:8003:8119:7200:c589:9da3:81e6:1296)
2020-10-01 06:41:58 <hololeap> and look at the gloss codebase too, since it uses gl internally
2020-10-01 06:44:47 × falafel quits (~falafel@2605:e000:1527:d491:a806:37fa:6971:2798) (Ping timeout: 240 seconds)
2020-10-01 06:45:26 × Turmfalke quits (~user@unaffiliated/siracusa) (Quit: Bye!)
2020-10-01 06:46:33 × jedws quits (~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-01 06:47:29 × polyrain quits (~polyrain@2001:8003:640b:b900:58f5:a1c1:c514:8c13) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-01 06:47:39 <tzh> yeah
2020-10-01 06:47:53 <tzh> in the mean time, it's late so i should get to bed. ty for the help!
2020-10-01 06:49:30 × tzh quits (~tzh@2601:448:c500:5300::4b20) (Quit: zzz)
2020-10-01 06:49:59 <hololeap> np
2020-10-01 06:50:12 × knupfer quits (~Thunderbi@i59F7FFF3.versanet.de) (Ping timeout: 256 seconds)
2020-10-01 06:51:26 snakemasterflex joins (~snakemast@213.100.206.23)
2020-10-01 06:53:26 jgt joins (~jgt@188.239.64.32)
2020-10-01 06:54:14 Narinas joins (~Narinas@187.250.59.209.dsl.dyn.telnor.net)
2020-10-01 06:54:35 × ddere quits (uid110888@gateway/web/irccloud.com/x-jowgaeystqlypvfd) (*.net *.split)
2020-10-01 06:54:35 × thonkpod quits (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) (*.net *.split)
2020-10-01 06:54:35 × eacameron quits (sid256985@gateway/web/irccloud.com/x-kpwlorbysgtnxhte) (*.net *.split)
2020-10-01 06:54:35 × entel quits (uid256215@botters/entel) (*.net *.split)
2020-10-01 06:54:35 × liff quits (liff@kapsi.fi) (*.net *.split)
2020-10-01 06:54:35 × SolarAquarion quits (SolarAquar@gateway/shell/panicbnc/x-nikabmyijjgiqeue) (*.net *.split)
2020-10-01 06:54:35 × jabruen[m] quits (jabruenmat@gateway/shell/matrix.org/x-akmaydnltwuauerf) (*.net *.split)
2020-10-01 06:54:35 × PotatoHatsue quits (berbermanp@gateway/shell/matrix.org/x-lcuapfbpkatzswxh) (*.net *.split)
2020-10-01 06:54:35 × glowcoil quits (sid3405@gateway/web/irccloud.com/x-thsriowqmdkgjing) (*.net *.split)
2020-10-01 06:54:35 × PoliticsII____ quits (sid193551@gateway/web/irccloud.com/x-nvfqluymqsvazvtl) (*.net *.split)
2020-10-01 06:54:35 × dequbed quits (~dequbed@yanduxian.paranoidlabs.org) (*.net *.split)
2020-10-01 06:54:35 × koankeeper quits (sid216950@gateway/web/irccloud.com/x-zrkqcymdfzqfjfqv) (*.net *.split)
2020-10-01 06:54:35 × teehemkay quits (sid14792@gateway/web/irccloud.com/x-xjwybgbmcxfolzwh) (*.net *.split)
2020-10-01 06:54:35 × rann quits (sid175221@gateway/web/irccloud.com/x-aedrxgorilstsgns) (*.net *.split)
2020-10-01 06:54:35 × simony quits (sid226116@gateway/web/irccloud.com/x-ebcflagagczxghjj) (*.net *.split)
2020-10-01 06:54:35 × mpickering quits (sid78412@gateway/web/irccloud.com/x-ugziboqyrxfitrmv) (*.net *.split)
2020-10-01 06:54:35 × miklcct quits (quasselcor@2001:19f0:7001:5ad:5400:2ff:feb6:50d7) (*.net *.split)
2020-10-01 06:54:35 × benwr__ quits (sid372383@gateway/web/irccloud.com/x-ehohzcwkyjbzpbwl) (*.net *.split)
2020-10-01 06:54:35 × nlofaro quits (sid258233@gateway/web/irccloud.com/x-etxlydyigzmwkiap) (*.net *.split)
2020-10-01 06:54:35 × angerman quits (sid209936@gateway/web/irccloud.com/x-kbnupcpypxlxxlnc) (*.net *.split)
2020-10-01 06:54:35 × unlink__ quits (~unlink2@p200300ebcf25bd0068eb9d9c94da2a17.dip0.t-ipconnect.de) (*.net *.split)
2020-10-01 06:54:35 × srid quits (sridmatrix@gateway/shell/matrix.org/x-zqttickmrfyduksr) (*.net *.split)
2020-10-01 06:54:35 × michaelpj1 quits (michaelpjm@gateway/shell/matrix.org/x-bmrqrkqdmdnabvkc) (*.net *.split)
2020-10-01 06:54:35 × johnnyboy[m] quits (gifumatrix@gateway/shell/matrix.org/x-xczqbcixpmjhwvre) (*.net *.split)

All times are in UTC.