• What are you working on? November 2015
    964 replies, posted
[QUOTE=Map in a box;49107715][media]https://www.youtube.com/watch?v=ki33dVo-0KM[/media] [editline]13th November 2015[/editline] feel I should mention that the art/sound assets are all goonstations[/QUOTE] This profoundly changed my views on life
glad i could help
I'm about halfway or so with the colorpicker. Still need to do a slider for alpha and enable the user inputs. Most of the tough shit is done... and I also need to clean up the code :v: [vid]http://s1.webmshare.com/E340x.webm[/vid] Some things are not completely correct though, like the slider changing color when you're sliding it. That shit ain't right.
I'm starting to learn about neural networks and trying to implement a simple perceptron that can be taught to perform basic logic operations such as OR, AND. What I don't get is the need for a bias node. Is the weighted bias node value supposed to represent the activation function threshold?
So I've been working on a networking framework for Python. Here's the maximum amount of code needed for an echo server: [code] import asyncio from bfnet import ButterflyHandler, Butterfly # Create your event loop. loop = asyncio.get_event_loop() @asyncio.coroutine def main(): my_handler = ButterflyHandler.get_handler(loop, log_level=logging.DEBUG, buffer_size=4096) my_server = yield from my_handler.create_server(("127.0.0.1", 8001), ("localhost.crt", "server.key", None)) @my_server.any_data @asyncio.coroutine def echo(data: bytes, butterfly: Butterfly, handler: ButterflyHandler): butterfly.write(data) if __name__ == '__main__': loop.create_task(main()) try: loop.run_forever() except KeyboardInterrupt: exit(0) [/code] Much simpler compared to the standard asyncio networking stuff. Plus, it's secure automatically (forces TLS for all connections by default with secure settings enabled), and fully asynchronous, because it's based on asyncio. Here's a more meaty example for a simple chatroom: [code] import asyncio from bfnet import Butterfly, ButterflyHandler # Create your event loop. loop = asyncio.get_event_loop() class MyHandler(ButterflyHandler): @asyncio.coroutine def on_connection(self, butterfly: Butterfly): # Here we re-purpose the Butterfly dict. # Read in their nickname. butterfly.write(b"Nickname: ") nick = yield from butterfly.read() nick = nick.rstrip(b'\n').rstrip(b'\r') # Tell the others somebody has connected. self.logger.debug("{} has joined".format(nick.decode())) for bf, _ in self.butterflies.values(): bf.write(nick + b" has joined the room\n") # Set the `nick` attribute on the Butterfly. butterfly.nick = nick # Begin handling normally. fut = self.begin_handling(butterfly) self.butterflies[nick] = (butterfly, fut) @asyncio.coroutine def on_disconnect(self, butterfly: Butterfly): # Override the on_disconnect to cancel the correct futures. if not hasattr(butterfly, "nick"): self.logger.warning("Connection cancelled before on_connect finished - will be killed soon!") return if butterfly.nick in self.butterflies: bf = self.butterflies.pop(butterfly.nick) bf[1].cancel() @asyncio.coroutine def main(): my_handler = MyHandler.get_handler(loop=loop, log_level=logging.DEBUG) my_server = yield from my_handler.create_server(("127.0.0.1", 8001), ("localhost.crt", "server.key", None)) # Define our simple coroutine for handling messages. @my_server.any_data @asyncio.coroutine def _handle_data(data: bytes, butterfly: Butterfly, handler: ButterflyHandler): for bf in handler.butterflies.values(): if bf[0] != butterfly: bf[0].write(butterfly.nick + b": " + data) [/code] Pretty damn neat compared to Twisted (a clusterfuck), raw sockets (ew) or asyncio's default networking.
Writing a paper on a project and i found this gem: [url]http://www.visuwords.com[/url] Please, Berking, make one that doesn't crash every 2 seconds. [editline]13th November 2015[/editline] It's so useful [img]http://i.imgur.com/oVyI1od.png[/img]
This week I was working on F# backend and C# frontend TCP connection, still not done. I will write my own messaging protocol on top of TCP, which is encrypted. Stuff is becoming fun, I just hope it won't crash when I will test it with 100.000 TCP clients. Only stuff that is worrying me is vulnerability to DOS attacks. But not so critical right now, just wanna be ready for assholes :v:. [QUOTE=MatheusMCardoso;49109584]Writing a paper on a project and i found this gem: [url]http://www.visuwords.com[/url] Please, Berking, make one that doesn't crash every 2 seconds. [editline]13th November 2015[/editline] It's so useful [img]http://i.imgur.com/oVyI1od.png[/img][/QUOTE] Wow this is some advanced stuff. You could make "thinking in language" mechanism with this.
Finally got round to recording the end result of my jam entry; [video=youtube;kgnJJxk_IWk]http://www.youtube.com/watch?v=kgnJJxk_IWk[/video] Leap Carnival is a hot-seat multiplayer collection of Midway-themed minigames; balancing, juggling, skeeball, & target practice. [URL="https://itch.io/jam/leapmotion3djam/rate/42099"]Community rating is currently open[/URL] for the jam & it counts towards [B]30% of the final judging[/B], as well as there being a community prize for the highest rated game. If you have an itch.io account then please go [URL="https://itch.io/jam/leapmotion3djam/rate/42099"]rate/comment[/URL] on it!
[vid]http://files.facepunch.com/ziks/2015/November/13/2015-11-13-1702-17.mp4[/vid] The GUI's still a work in progress, but this is a working tool palette thing. [editline]13th November 2015[/editline] Also the GUI is built from json, like this: [url]https://gist.github.com/Metapyziks/8f62657ffe23e18dcfd8[/url] This is what plugin creators can use to build their own GUI.
[QUOTE=Fourier;49109721]This week I was working on F# backend and C# frontend TCP connection, still not done. I will write my own messaging protocol on top of TCP, which is encrypted. Stuff is becoming fun, I just hope it won't crash when I will test it with 100.000 TCP clients. Only stuff that is worrying me is vulnerability to DOS attacks. But not so critical right now, just wanna be ready for assholes :v:. [...][/QUOTE] Why not implement it on top of a plain [I]Stream[/I]? That way you can run it through TLS with the implementation that comes with .NET, or use a third-party library if you're concerned about the NSA having broken the handshake. If you decide to use your own encryption protocol after all you can also implement that by deriving [I]Stream[/I] so all your user data is securely encrypted just by running it through that. (Though I hope you get it peer-reviewed if you really want to put it into production.)
Finished up the last bit of rendering logic concerning billboarded ground details. Anything past this point will probably be just optimizations. I wanted to add some additional detailing to the billboards, and found 2 different "star" shaped styles of arranging multiple quads together: [t]http://i.imgur.com/iwgKPH2.png[/t][t]http://i.imgur.com/VFtbk0K.png[/t] However the latter only really looks good on some types of folliage, such as ferns (or anything else as long as it was far away), so I threw in an additional parameter to allow each point to control what type it wants be. [t]http://i.imgur.com/TtiXV0L.png[/t] Lastly, I varied how they render based on their distance to the camera. This doesn't seem to help that much as of yet, but perhaps it may if I optimize it enough. -Points nearest to the camera use their defined shape style -Up to 3/4's away take on a a different star shape that looks better the further away they are -All the way up to the maximum draw distance they stay as basic quads. -Past that they don't draw. [vid]http://i.imgur.com/lLxNEtv.webm[/vid]
the game engine that runs on the potato
[QUOTE=Karmah;49110369]Finished up the last bit of rendering logic concerning billboarded ground details. Anything past this point will probably be just optimizations. I wanted to add some additional detailing to the billboards, and found 2 different "star" shaped styles of arranging multiple quads together: [t]http://i.imgur.com/iwgKPH2.png[/t][t]http://i.imgur.com/VFtbk0K.png[/t] However the latter only really looks good on some types of folliage, such as ferns (or anything else as long as it was far away), so I threw in an additional parameter to allow each point to control what type it wants be. [t]http://i.imgur.com/TtiXV0L.png[/t] Lastly, I varied how they render based on their distance to the camera. This doesn't seem to help that much as of yet, but perhaps it may if I optimize it enough. -Points nearest to the camera use their defined shape style -Up to 3/4's away take on a a different star shape that looks better the further away they are -All the way up to the maximum draw distance they stay as basic quads. -Past that they don't draw. [vid]http://i.imgur.com/lLxNEtv.webm[/vid][/QUOTE] Nice progress! It actually helps ALOT, if you do it right. Your landscape will look awesome. Try to interpolate between LODs. Can't be that hard. Your interpolating parameter is radius. It should make it smoother and prettier.
[QUOTE=Fourier;49111022]Nice progress! It actually helps ALOT, if you do it right. Your landscape will look awesome. Try to interpolate between LODs. Can't be that hard. Your interpolating parameter is radius. It should make it smoother and prettier.[/QUOTE] I don't really know how I could perform any interpolation for these billboards. Although in the example I provided I just gave a smallish radius to show off the effects easier. There is only really 2 levels of detail: 2 triangles, or 6 triangles. The "prettiest" LOD uses a conformation that looks better nearer the camera, medium uses same # of triangles (6) but a different conformation, and lastly the third LOD which is just straight up 2 triangles.
[QUOTE=Karmah;49111093]I don't really know how I could perform any interpolation for these billboards. Although in the example I provided I just gave a smallish radius to show off the effects easier. There is only really 2 levels of detail: 2 triangles, or 6 triangles. The "prettiest" LOD uses a conformation that looks better nearer the camera, medium uses same # of triangles (6) but a different conformation, and lastly the third LOD which is just straight up 2 triangles.[/QUOTE] You could make grass appearing less jarring by making the grass fade. You could also copy what Skyrim does and have the grass slowly rise out of the ground the closer you get.
[QUOTE=Tommyx50;49111737]You could make grass appearing less jarring by making the grass fade. You could also copy what Skyrim does and have the grass slowly rise out of the ground the closer you get.[/QUOTE] Good ideas, thanks! I'll try both individually and in combination to see how these look. I don't really know of any other techniques for this sort of stuff as most hits for "billboards" on google come up with different results. If anyone has any opinions on any of it in general I'm all ears, because I'm just winging this stuff at this point.
[QUOTE=Karmah;49111813]If anyone has any opinions on any of it in general I'm all ears, because I'm just winging this stuff at this point.[/QUOTE] You could make the grass that's more far away be less dense than the grass that's more near you. That way you get the illusion of the grass being the same density everywhere if you get what i mean.
Hey, so a plan of mine for the weekend: I want to start a community doc that summarizes a ton of relevant information for Computer Science & related math. So things like: -A cheat sheet for algorithms and the math for deriving complexity -Best algorithms for certain types of tasks -A whole section on graphics topics (including vector/matrix/quaternions/whatever detail I want to go into -Some crypto stuff I/you guys remember -AI topics overview -Anything else we're interested in. Rate this/reply with your thoughts. I'm taking Machine Learning next semester and I want to be well prepared.
[QUOTE=DoctorSalt;49112270]Hey, so a plan of mine for the weekend: I want to start a community doc that summarizes a ton of relevant information for Computer Science & related math. So things like: -A cheat sheet for algorithms and the math for deriving complexity -Best algorithms for certain types of tasks -A whole section on graphics topics (including vector/matrix/quaternions/whatever detail I want to go into -Some crypto stuff I/you guys remember -AI topics overview -Anything else we're interested in. Rate this/reply with your thoughts. I'm taking Machine Learning next semester and I want to be well prepared.[/QUOTE] For an overview on AI related stuff you could maybe look at [url=https://github.com/owainlewis/awesome-artificial-intelligence]this GitHub repo[/url], and for algorithms there is [url=https://github.com/tayllan/awesome-algorithms]this repo[/url] as well.
[QUOTE=MatheusMCardoso;49109584]Writing a paper on a project and i found this gem: [url]http://www.visuwords.com[/url] Please, Berking, make one that doesn't crash every 2 seconds. [editline]13th November 2015[/editline] It's so useful [img]http://i.imgur.com/oVyI1od.png[/img][/QUOTE] This is so fucking cool. Time to add some new words to Rantionary.
Is this better? [vid]http://i.imgur.com/LZizgRC.webm[/vid] The points will sink a percentage of their height downwards along the supplied normal vector (of the surface they lie on) depending on their distance from the camera. Right now they go 0.8 or 80% of their height at maximum distance away from the camera. The percentage can vary though. Also, I just used global fog, but I think trying to fade out the distant foliage on their own may end up looking weird if the fade out color looks different from the global fog or lighting color. I could however try doing a checkerboard discarding of pixels to bleed some of the background through, but that may end up looking weird. [QUOTE=cartman300;49112020]You could make the grass that's more far away be less dense than the grass that's more near you. That way you get the illusion of the grass being the same density everywhere if you get what i mean.[/QUOTE] As far as "filling in" the gaps goes, the points are pre-generated (not real time), so I don't think I can really do anything other than just generate more points. I attempt a bit of the reverse - less detailed quads are at the very least used further away, but I'm not quite sure how I would consistently cull away [I]some[/I] distant points
[QUOTE=Egonny;49112351]For an overview on AI related stuff you could maybe look at [url=https://github.com/owainlewis/awesome-artificial-intelligence]this GitHub repo[/url], and for algorithms there is [url=https://github.com/tayllan/awesome-algorithms]this repo[/url] as well.[/QUOTE] I'd just go directly [URL=https://github.com/sindresorhus/awesome]here[/url], for the curated list of curated lists :v:
[QUOTE=Karmah;49112687]but I'm not quite sure how I would consistently cull away [I]some[/I] distant points[/QUOTE] Use an evenly distributed hash function that takes the position of the point and returns a number and use the distance to scale the said number and just remove the points that are above a certain threshold.
I realized Rant didn't support split verbs, so I'm working on a concept for them, and will probably implement it this weekend. [img]http://i.imgur.com/8X2SPIN.png[/img]
[QUOTE=cartman300;49112843]Use an evenly distributed hash function that takes the position of the point and returns a number and use the distance to scale the said number and just remove the points that are above a certain threshold.[/QUOTE] Hm, I may try to refine it further later on then, although I know nothing really about hashing. I think I understand how the technique would work, but no clue about how to implement.
Out of curiosity, do you all expect yourself to pull math magic out of thin air? Meaning to know off hand things like The closed form of 1 + 2 + 3 + ... n, Geometric sums Integration know how Matrix stuff.
[QUOTE=DoctorSalt;49113265]Out of curiosity, do you all expect yourself to pull math magic out of thin air? Meaning to know off hand things like The closed form of 1 + 2 + 3 + ... n, Geometric sums Integration know how Matrix stuff.[/QUOTE] I know jack shit about matrices or calculus, so I just use third-party libraries to do the work for me.
[QUOTE=DoctorSalt;49113265]Out of curiosity, do you all expect yourself to pull math magic out of thin air? Meaning to know off hand things like The closed form of 1 + 2 + 3 + ... n, Geometric sums Integration know how Matrix stuff.[/QUOTE] I'm trying to relearn a lot of it. I used to be great at math, but that was years and years ago. :v:
[QUOTE=DoctorSalt;49113265]Out of curiosity, do you all expect yourself to pull math magic out of thin air? Meaning to know off hand things like The closed form of 1 + 2 + 3 + ... n, Geometric sums Integration know how Matrix stuff.[/QUOTE] Mostly. I'm bad at remembering specific formulas though, so it's possible I may have to derive a few of these which I [I]think[/I] I'd be able to do with some time. Just looking them up is usually more convenient though, if I forget one.
This fucking site [img]http://i.imgur.com/ZbyEHjS.png[/img]
Sorry, you need to Log In to post a reply to this thread.