[{"data":1,"prerenderedAt":264},["ShallowReactive",2],{"project-15821020":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":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":43,"post_text":45,"what":46,"said":72,"maker_in_thread":136,"shape":148,"grid":152,"attempts":225,"same_week":226,"maker_shows":33,"maker_hidden":256,"reader_version":257,"card":258},"15821020","Merchant.js","A state framework for creating idle games","title","Show HN: Merchant.js, a state framework for creating idle games","https:\u002F\u002Fgithub.com\u002FFlaque\u002Fmerchant.js","github.com","flaque",1512088742,2017,86,29,528,2242,24,"notable","games","game development framework","library",[24,25,26,27,28],"idle game","incremental game","javascript state","immutable state","game framework","curious",-0.174,{"positive":32,"neutral":33,"mixed":32,"critical":34},0,8,2,10,{"performance":37,"idea":39,"docs":40,"execution":41,"design":42},{"positive":32,"critical":38},1,{"positive":32,"critical":32},{"positive":32,"critical":32},{"positive":32,"critical":38},{"positive":32,"critical":32},[38,32,32,32,32,32,44,32,44,32,44,32,32,32,32,32,32,32,38,44,32,32,44,32,44,44,44,32,32],3,null,{"problem":47,"audience":45,"pricing":45,"motivation":45,"time_to_build":45,"stack":54,"openness":71,"stage":71,"team_size":71},{"value":48,"source":49,"evidence":50},"Handling large numbers of interrelated counter updates (gold, experience, items) in idle games in an organized way","maker",[51],{"id":52,"by":11,"text":53},"15822305","Merchant is used mainly to handle large amounts of number changes in a way that makes sense. In a lot of games (especially idle games), there's lots of different counters that…",[55,67],{"value":56,"source":57,"evidence":58},"JavaScript","commenter",[59,63],{"id":60,"by":61,"text":62},"15822353","janci","Why Map is used instead of plain object {} ? And why it's Map and not new Map ?",{"id":64,"by":65,"text":66},"15822821","partycoder","Because their Map type is not the JavaScript Map type but immutable.Map.",{"value":68,"source":57,"evidence":69},"immutable.js",[70],{"id":64,"by":65,"text":66},"unknown",{"praise":73,"objections":89,"requests":104,"questions":112,"alternatives":117},[74],{"value":75,"source":57,"evidence":76},"Looks cool and the framework is praised as a nice idea for idle games",[77,81,85],{"id":78,"by":79,"text":80},"15822172","hliyan","I was hoping this could be used to gamify things, but this is basically a clicker, yes?",{"id":82,"by":83,"text":84},"15822285","muzani","This is really nice. I'd love to make one for native mobile some day.",{"id":86,"by":87,"text":88},"15823442","GistNoesis","Looks cool! Alternatively I found that Vue.js rather than React makes it really simple to handle these types of games (though you no longer have the immutability and history…",[90,97],{"value":91,"source":57,"evidence":92},"The live example was broken at time of posting",[93],{"id":94,"by":95,"text":96},"15823797","maxencecornet","The live example is broken right now",{"value":98,"source":57,"evidence":99},"Immutable objects may create GC pressure",[100],{"id":101,"by":102,"text":103},"15823759","fqsxr","I like immutable objects. But my worry is it will lead to lots of small objects being created just to get destroyed right away, putting lots of pressure on GC. I wonder if this…",[105],{"value":106,"source":57,"evidence":107},"Offline progress simulation support for idle games",[108],{"id":109,"by":110,"text":111},"15822627","btown","I've recently been playing a fascinatingly complex mobile incremental\u002Fidle game called Almost a Hero [0] by Bee Square Games, and as a case study in game design, it's rather…",[113],{"value":114,"source":57,"evidence":115},"Why Map is used instead of a plain object, and why not new Map",[116],{"id":60,"by":61,"text":62},[118,125,129],{"value":119,"source":57,"evidence":120},"Redux",[121],{"id":122,"by":123,"text":124},"15824467","xyclos","You can use Redux with Vue as well, it isn't just restricted to React",{"value":126,"source":57,"evidence":127},"Vue.js",[128],{"id":86,"by":87,"text":88},{"value":130,"source":57,"evidence":131},"Candy Clicker",[132],{"id":133,"by":134,"text":135},"15830006","jedanbik","Candy Clicker is a great example. I miss 2013.",{"comments":137,"answered":44,"key":138},6,[139,142,145],{"id":140,"text":141},"15825498","Garbage Collection",{"id":143,"text":144},"15825506","Oh! Thanks for pointing that out \u003C3",{"id":146,"text":147},"15822324","Thanks \u003C3 I fully recommend building one! Idle games are a fantastic programming zen exercise. They're incredibly state-focused rather than UI focused, which means the hard parts…",{"commenters":149,"max_depth":44,"maker_replies":137,"first_comment_mins":150,"lifespan_hours":151},23,303,149,[153,155,159,163,165,168,171,173,175,179,180,181,183,188,191,192,195,197,200,203,204,208,211,213,214,217,218,219,222],[101,32,38,154,102,32],"project\u002Fcritical\u002Fperformance",[156,32,32,157,158,32],"15824165","commenter\u002Fneutral\u002Fperformance","awestroke",[160,32,32,161,162,32],"15825300","other\u002Fneutral\u002Fnone","sr464",[140,32,32,164,11,38],"maker\u002Fneutral\u002Fnone",[166,32,32,161,167,32],"15825620","romuloab42",[169,32,32,161,170,32],"15828560","fiatjaf",[86,38,44,172,87,32],"project\u002Fneutral\u002Fidea",[122,38,32,174,123,32],"commenter\u002Fneutral\u002Fnone",[176,34,44,177,178,32],"15822793","maker\u002Fneutral\u002Fdocs","BackwardSpy",[143,34,32,177,11,38],[82,44,44,172,83,32],[146,44,32,182,11,38],"maker\u002Fpositive\u002Fidea",[184,185,32,186,187,32],"15823547",4,"other\u002Fpositive\u002Fnone","george10101",[189,185,32,161,190,32],"15824338","jastr",[133,185,32,161,134,32],[193,185,32,161,194,32],"15830200","epicide",[196,185,32,164,11,38],"15826446",[198,185,32,161,199,32],"15867777","metaloha",[94,201,38,202,95,32],5,"project\u002Fcritical\u002Fexecution",[78,137,44,172,79,32],[205,137,32,206,207,32],"15822185","commenter\u002Fneutral\u002Fidea","hateduser2",[209,137,32,210,11,38],"15822313","maker\u002Fneutral\u002Fidea",[212,137,44,172,83,32],"15822282",[52,137,32,172,11,38],[60,215,44,216,61,32],7,"project\u002Fneutral\u002Fdesign",[64,215,44,216,65,32],[109,33,44,172,110,32],[220,33,32,174,221,32],"15823075","hagreet",[223,33,32,174,224,32],"15823595","dangoor",[],[227,232,237,242,247,252],{"id":228,"name":229,"points":230,"category":231},"15860312","Classical Music Only",273,"consumer_social",{"id":233,"name":234,"points":235,"category":236},"15853345","SeKey",169,"security_privacy",{"id":238,"name":239,"points":240,"category":241},"15851927","Misocoin",151,"learning_science",{"id":243,"name":244,"points":245,"category":246},"15865195","flu.io",140,"web_saas",{"id":248,"name":249,"points":250,"category":251},"15843738","Go Freaking Do It",128,"finance_crypto",{"id":253,"name":254,"points":255,"category":231},"15847575","Echo Podcasts",116,false,"v2",{"id":259,"name":5,"line":6,"ai":256,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":260,"top":18,"kw":261,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":262,"url":9,"mix":263,"praise":75,"objection":91,"sub":21},15821020,-0.17,[24,25,26,27,28],"10000030303000000013003033300",[32,33,32,34],1794036561287]