codybits
Re:SolveSpace – Parametric 2d/3d CAD
on Friday May 13, 2016 @08:25PM (#11694017)
I've been using OpenJSCAD (demo at http://openjscad.org/) for small parts and really like it. With some work it could probably do what you describe but as far as I can tell no one is using it that way.
It would be cool if there was an ecosystem of OpenJSCAD parts that you could import as javascript modules.
Re:Show HN: Snakes on a Hyperplane – A multiplayer 3D Snake game
on Sunday April 17, 2016 @08:58PM (#11517120)
The song is Windowdipper by Jib Kidder
Re:Show HN: Twenty
on Thursday May 14, 2015 @01:36AM (#9543591)
Yeah, that would probably help a lot. It is pretty dumb in its current state. That said, sometimes it can join matching tiles that are next to each other in the bottom of the pile, so that can still be useful.
Maybe I'll work on it some later...
Re:Show HN: Twenty
on Thursday May 14, 2015 @12:59AM (#9543504)
I was wondering how a quick random player might fare so I made a simple one. Paste this into your inspector console (or in chrome type "javascript:" into the URL bar and paste it):
function countPieces(){it=b.pieces();for(var e=0;it.current();)e++,it.next();return e}function getRandPiece(){for(var e=b.pieces(),t=Math.floor(Math.random()*countPieces()),n=0;t>n;n++)e.next();return e.current()}function stackRandPiece(){if(!b.isBusy()){if(b.isGameOver())return void clearInterval(randInterval);var e=getRandPiece();b.setTarget({x:e.pos.x+100,y:1500}),b.grab(e),window.setTimeout(function(){b.setTarget({x:200*Math.floor(7*Math.random())+100,y:1500}),window.setTimeout(function(){b.release()},15)},15)}}randInterval=window.setInterval(stackRandPiece,40);
Original code here: https://gist.github.com/CodyWalker/842149b82ed363659678The highest I've seen it manage is 17.