[{"data":1,"prerenderedAt":313},["ShallowReactive",2],{"project-15529963":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":43,"post_text":46,"what":47,"said":78,"maker_in_thread":184,"shape":195,"grid":199,"attempts":276,"same_week":277,"maker_shows":32,"maker_hidden":306,"reader_version":307,"card":308},"15529963","JSRobot","A platform game you play by coding in JavaScript","title","Show HN: JSRobot – A platform game you play by coding in JavaScript","https:\u002F\u002Fgithub.com\u002Freaalkhalil\u002FJSRobot","github.com","reaal",1508720484,2017,79,34,561,2242,26,"notable","games","coding puzzle game","web_app",[24,25,26,27],"javascript game","learn javascript","coding game","platform game","roasted",-0.5,{"positive":31,"neutral":32,"mixed":32,"critical":33},2,1,13,17,{"design":36,"execution":39,"idea":41,"performance":42},{"positive":37,"critical":38},0,8,{"positive":37,"critical":40},4,{"positive":31,"critical":37},{"positive":37,"critical":32},[32,37,37,37,44,37,32,37,32,32,37,37,32,32,37,37,44,32,37,37,32,37,45,37,45,32,37,32,32,37,32,37,32,37],3,5,null,{"problem":48,"audience":54,"pricing":46,"motivation":46,"time_to_build":46,"stack":70,"openness":75,"stage":76,"team_size":77},{"value":49,"source":50,"evidence":51},"Teaching JavaScript through a platform game where you script a robot","maker",[52],{"id":53},"post",{"value":55,"source":56,"evidence":57},"Beginners learning JavaScript","commenter",[58,62,66],{"id":59,"by":60,"text":61},"15547865","allenleein","This game is simply amazing. Better interactive tutorial for beginner than Codecademy.",{"id":63,"by":64,"text":65},"15533192","raresp","Great resource for learning Javascript. Good work!",{"id":67,"by":68,"text":69},"15532826","SeanDav","On the right track, but waaaay to steep a learning curve for an absolute beginner, assuming that is the target audience. In-line incrementation and Mod operations on level 2 is a…",[71],{"value":72,"source":50,"evidence":73},"JavaScript",[74],{"id":53},"open_source","launched","unknown",{"praise":79,"objections":92,"requests":127,"questions":140,"alternatives":154},[80,85],{"value":81,"source":56,"evidence":82},"Good resource for learning JavaScript and better than Codecademy",[83,84],{"id":59,"by":60,"text":61},{"id":63,"by":64,"text":65},{"value":86,"source":56,"evidence":87},"Nice idea and well executed",[88],{"id":89,"by":90,"text":91},"15531134","bjpirt","It's a nice idea and really well executed but the second test just demonstrates to me how JS is not an ideal language for a beginner to learn as you're thrown straight into async…",[93,102,113],{"value":94,"source":56,"evidence":95},"Learning curve too steep for beginners, especially level two",[96,100,101],{"id":97,"by":98,"text":99},"15531805","Confiks","It's an interesting game, but I was immediately put off by level two, which sinks you into the limitations of the robot API by making you introduce a counter that needs checking.…",{"id":67,"by":68,"text":69},{"id":89,"by":90,"text":91},{"value":103,"source":56,"evidence":104},"Code is lost when restarting a level or the page",[105,109],{"id":106,"by":107,"text":108},"15530910","ahmeni","A neat concept but frustrating when restarting the page loses any code in the script window.",{"id":110,"by":111,"text":112},"15533627","adbachman",":\u002F Fun idea, but I wrote a chunk of code for the third level, bumped the electro thing, died, clicked the restart button and it wiped my script. I should know better than to…",{"value":114,"source":56,"evidence":115},"Only one action per loop tick; later calls overwrite earlier ones",[116,120,124],{"id":117,"by":118,"text":119},"15531307","always_good","I don't understand. Are you referring to Level 2? What's going on there is just that the robot can only enqueue a single action for the tick. So calling multiple actions will…",{"id":121,"by":122,"text":123},"15531633","kaoD","I think it's just a case of leaky abstraction. I'd change the API to something like: ``` robot.action = { action: 'jump' }; robot.action = { action: 'move', amount: 4 }; etc. ```…",{"id":125,"by":118,"text":126},"15532408","Another idea is to return a map of actions. ``` { jump: true, move: 4, shoot: true } ``` Making the user increment a nonce and use the remainder operator just to do multiple…",[128,133],{"value":129,"source":56,"evidence":130},"Keep the script when restarting or reloading",[131,132],{"id":106,"by":107,"text":108},{"id":110,"by":111,"text":112},{"value":134,"source":56,"evidence":135},"Show variable state during execution via a debug view",[136],{"id":137,"by":138,"text":139},"15531664","reacweb","Or the action could be the return value. IMHO, trying to guess the physical model by experimentation is painful. Why not propose a debug button to display the state of variables…",[141],{"value":142,"source":56,"evidence":143},"Whether multiple actions per loop are intended behaviour",[144,148,151],{"id":145,"by":146,"text":147},"15532118","IanCal","That's not right. You can put more than one action in the loop. This slowly completes the level: ``` function loop(robot){ \u002F\u002F your code here robot.move(1) robot.jump() } ```",{"id":149,"by":122,"text":150},"15532304","It shouldn't according to its own instructions. I bet jump() has something like `if (robot.touchingFloor) { action = 'jump'; }` which makes your code work because it doesn't…",{"id":152,"by":146,"text":153},"15536441","Ah I stand corrected, thanks. So I guess it's performing the last valid action.",[155,162,169,176,180],{"value":156,"source":56,"evidence":157},"Blockly Games",[158],{"id":159,"by":160,"text":161},"15533255","j_s","If I remember correctly, Google's Blockly Games used to allow JavaScript on more than just the last \"level\". It definitely starts at a much earlier point in the learning process.…",{"value":163,"source":56,"evidence":164},"Karel the Robot",[165],{"id":166,"by":167,"text":168},"15532630","throwaway2016a","Reminds me of a course I had to take freshman year in college called Karel the Robot[1]. It had a Basic like programming language. It mostly existed to try to quickly bring up to…",{"value":170,"source":56,"evidence":171},"CodeCombat",[172],{"id":173,"by":174,"text":175},"15533259","xori","Another example in Action\u002FRPG format https:\u002F\u002Fcodecombat.com",{"value":177,"source":56,"evidence":178},"Codecademy",[179],{"id":59,"by":60,"text":61},{"value":181,"source":56,"evidence":182},"Code.org Hour of Code",[183],{"id":159,"by":160,"text":161},{"comments":45,"answered":32,"key":185},[186,189,192],{"id":187,"text":188},"15532632","Very true, it is much easier to understand with a boolean, thanks!",{"id":190,"text":191},"15532638","Sorry! That's next up on the todo list",{"id":193,"text":194},"15534697","Sorry about that, fixed",{"commenters":196,"max_depth":45,"maker_replies":45,"first_comment_mins":197,"lifespan_hours":198},23,264,53,[200,203,207,209,211,214,216,218,220,221,224,227,229,232,235,236,239,242,244,246,249,251,253,256,260,261,263,265,266,267,271,272,273,275],[201,37,32,202,146,37],"15531297","project\u002Fcritical\u002Fdesign",[204,37,37,205,206,37],"15532271","commenter\u002Fneutral\u002Fnone","styfle",[208,37,37,205,146,37],"15534076",[187,37,37,210,11,32],"maker\u002Fpositive\u002Fdesign",[212,37,44,213,167,37],"15532640","project\u002Fneutral\u002Fdesign",[159,32,37,215,160,37],"other\u002Fneutral\u002Fnone",[106,31,32,217,107,37],"project\u002Fcritical\u002Fexecution",[190,31,37,219,11,32],"maker\u002Fneutral\u002Fexecution",[97,44,32,202,98,37],[222,44,32,202,223,37],"15532032","dvfjsdhgfv",[225,44,37,205,226,37],"15532413","mathgeek",[228,44,37,205,98,37],"15533718",[230,40,32,217,231,37],"15534242","benlower",[233,40,32,217,234,37],"15534399","TruthSHIFT",[193,40,37,219,11,32],[237,45,37,215,238,37],"15532020","cdubzzz",[166,240,44,241,167,37],6,"project\u002Fmixed\u002Fidea",[110,243,32,217,111,37],7,[245,243,37,219,11,32],"15533690",[247,38,37,248,11,32],"15533896","maker\u002Fpositive\u002Fexecution",[67,250,32,202,68,37],9,[173,252,37,215,174,37],10,[59,254,45,255,60,37],11,"project\u002Fpositive\u002Fidea",[257,258,37,215,259,37],"15531990",12,"jlebrech",[63,33,45,255,64,37],[89,262,32,202,90,37],14,[117,262,37,264,118,37],"commenter\u002Fneutral\u002Fperformance",[121,262,32,202,122,37],[137,262,32,202,138,37],[268,262,37,269,270,37],"15532058","commenter\u002Fneutral\u002Fdesign","positivecomment",[125,262,32,202,118,37],[145,262,37,264,146,37],[149,262,32,274,122,37],"project\u002Fcritical\u002Fperformance",[152,262,37,205,146,37],[],[278,283,288,292,297,301],{"id":279,"name":280,"points":281,"category":282},"15534580","Arxiv Vanity",721,"learning_science",{"id":284,"name":285,"points":286,"category":287},"15507538","Gutenberg",241,"dev_tools",{"id":289,"name":290,"points":291,"category":287},"15507181","Screen.rip",195,{"id":293,"name":294,"points":295,"category":296},"15551245","US Stock Screener",173,"finance_crypto",{"id":298,"name":299,"points":300,"category":287},"15528660","Ruby static type checker",115,{"id":302,"name":303,"points":304,"category":305},"15544432","Product Substitutes",103,"web_saas",false,"v2",{"id":309,"name":5,"line":6,"ai":306,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":310,"maker":11,"domain":10,"tier":19,"attempts":37,"strip":311,"url":9,"mix":312,"praise":81,"objection":94,"sub":21},15529963,[24,25,26,27],"1000301011001100310010505101101010",[31,32,32,33],1794036560051]