[{"data":1,"prerenderedAt":530},["ShallowReactive",2],{"project-21719575":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":35,"aspects":36,"strip":45,"post_text":46,"what":47,"said":81,"maker_in_thread":188,"shape":198,"grid":203,"attempts":488,"same_week":493,"maker_shows":33,"maker_hidden":522,"reader_version":523,"card":524},"21719575","si78c","Space Invaders in C","title","Show HN: Space Invaders in C","http:\u002F\u002Fblog.loadzero.com\u002Fblog\u002Fsi78c\u002F","blog.loadzero.com","loadzero",1575611617,2019,478,105,35,2195,2,"legend","games","arcade game recreation","desktop_app",[24,25,26,27],"space invaders","8080 emulator","retro game source code","c game","mixed",0.218,{"positive":31,"neutral":32,"mixed":33,"critical":34},12,14,1,6,33,{"execution":37,"design":40,"docs":41,"idea":43,"privacy":44},{"positive":38,"critical":39},5,3,{"positive":18,"critical":33},{"positive":42,"critical":42},0,{"positive":18,"critical":42},{"positive":42,"critical":18},[39,39,38,39,39,42,42,42,42,42,42,39,42,42,42,42,42,42,39,39,39,42,38,38,38,38,38,39,42,38,38,39,33,33,38,39,33,42,33,39],null,{"problem":48,"audience":46,"pricing":46,"motivation":55,"time_to_build":59,"stack":65,"openness":78,"stage":79,"team_size":80},{"value":49,"source":50,"evidence":51},"Preserves and explains the original Space Invaders game as readable C source","maker",[52],{"id":53,"by":11,"text":54},"21719601","Author here. This is a bit of a love letter to Space Invaders, and video games in general. I started working on this as a simple emulation project, to rekindle my own passion in…",{"value":56,"source":50,"evidence":57},"Love letter to Space Invaders and low-level video game hacking, rekindling passion",[58],{"id":53,"by":11,"text":54},{"value":60,"source":50,"evidence":61},"About 200 hours over a few months",[62],{"id":63,"by":11,"text":64},"21719768","It felt like it took forever. But about 200 hours all up, over a few months.",[66,70],{"value":67,"source":50,"evidence":68},"C",[69],{"id":53,"by":11,"text":54},{"value":71,"source":72,"evidence":73},"SDL2","commenter",[74],{"id":75,"by":76,"text":77},"21719904","jacquesm","Interesting metrics, you'd expect C to do a lot better in the line-count department than assembly. I tried building it on Ubuntu, if you follow the instructions the SDL library…","unknown","launched","solo",{"praise":82,"objections":113,"requests":133,"questions":152,"alternatives":167},[83,102],{"value":84,"source":72,"evidence":85},"Clean, readable C code and detailed recreation",[86,90,94,98],{"id":87,"by":88,"text":89},"21719718","guiambros","Amazing work, thank you for sharing! The amount of detail is prey impressive. How hard would it be to port the sound as well?",{"id":91,"by":92,"text":93},"21719722","theunamedguy","Excellent work! Clean C is underrated nowadays.",{"id":95,"by":96,"text":97},"21724095","zoomablemind","Nice job! Such a pleasure to read a clean C code. BTW, in case anyone tries to build it on Ubuntu 14.04 x86 with gcc, you'd need `-std=gnu99 -D_GNU_SOURCE` flags, otherwise it…",{"id":99,"by":100,"text":101},"21720470","jonathanzufi","This is magnificent. Thank you for doing this.",{"value":103,"source":72,"evidence":104},"Impressive write-up and project",[105,109],{"id":106,"by":107,"text":108},"21719733","i_am_not_elon","Both the project and the writeup are awesome, Jason! Thank you for sharing - I enjoyed it!",{"id":110,"by":111,"text":112},"21720424","jimws","This is an awesome project with awesome write up. I miss the days of pixelated console games. The constrained environment led to so much creativity. Are there any new games like…",[114,118,126],{"value":115,"source":72,"evidence":116},"Build instructions and includes were initially broken on Ubuntu",[117],{"id":75,"by":76,"text":77},{"value":119,"source":72,"evidence":120},"Terse brace style and code formatting criticized",[121,122],{"id":75,"by":76,"text":77},{"id":123,"by":124,"text":125},"21720991","bartread","In C-like languages I generally prefer to see: ``` int has = SDL_PollEvent(&event_buffer[num]); if (!has) ... ``` to ``` if (SDL_PollEvent(&event_buffer[num])) ... ``` because it…",{"value":127,"source":72,"evidence":128},"Segfault on Alpine",[129],{"id":130,"by":131,"text":132},"21725659","avip","Was able to build for alpine, but I get a segfault on running.",[134,138,145],{"value":135,"source":72,"evidence":136},"Port the sound",[137],{"id":87,"by":88,"text":89},{"value":139,"source":72,"evidence":140},"Support SDL1.x and Symbian",[141],{"id":142,"by":143,"text":144},"21719737","app4soft","> as long as they support ucontext and SDL2 Why not SDL1.x? It would be more portable, What about Symbian support?[0] [0] http:\u002F\u002Fanotherguest.se\u002F",{"value":146,"source":72,"evidence":147},"Do the same for Galaga",[148],{"id":149,"by":150,"text":151},"21721218","ianai","Oh I really appreciate having a neat, complicated C program to explore and learn from! Could this be done for Galaga? That’s my personal favorite.",[153,160],{"value":154,"source":72,"evidence":155},"Is it open source and under what license",[156],{"id":157,"by":158,"text":159},"21720501","bachmeier","Is this open source? I don't see a license with the code, but maybe I missed it.",{"value":161,"source":72,"evidence":162},"How long it took and how memory accuracy was verified",[163],{"id":164,"by":165,"text":166},"21719730","FullyFunctional","I love it. Thanks for doing this. How long did it take you? How did you verify the memory accuracy? It sounds like you co-simulated your implementation with the emulation?",[168,175,182],{"value":169,"source":72,"evidence":170},"Elite: The New Kind",[171],{"id":172,"by":173,"text":174},"21720161","Tepix","If you like this kind of thing, there's also a faithful re-implementation of the original Elite game, with (readable) source code. Quoting Wikipedia: \"... around 1999 Christian…",{"value":176,"source":72,"evidence":177},"Cannonball (OutRun reimplementation)",[178],{"id":179,"by":180,"text":181},"21725754","arrakeen","see also Cannonball, which I discovered recently—a reimplementation and improvement of OutRun https:\u002F\u002Fgithub.com\u002Fdjyt\u002Fcannonball",{"value":183,"source":72,"evidence":184},"MAME",[185],{"id":186,"by":11,"text":187},"21719873","Good question. The sound is a hardware component (synth circuit) that I haven't looked into much, because it's essentially outside the game code. si78c is faithfully sending all…",{"comments":189,"answered":38,"key":190},13,[191,192,195],{"id":53,"text":54},{"id":193,"text":194},"21726453","This is a good answer, and does reflect a good chunk of the reason for picking C. Dealing with such low level tasks is what the language was made for. The other big reason I used…",{"id":196,"text":197},"21728627","Yes, it is coming from the ROM. Well spotted, it looks like you are right. A quick glance here…",{"commenters":199,"max_depth":200,"maker_replies":189,"first_comment_mins":201,"lifespan_hours":202},68,7,8,108,[204,206,210,214,215,219,223,227,231,232,235,238,241,244,247,249,252,255,257,259,262,265,268,271,274,277,280,283,286,288,291,294,296,299,301,303,305,308,310,312,313,316,319,322,324,327,330,332,335,337,339,341,345,347,349,351,354,356,360,363,364,366,369,370,372,374,377,379,381,384,386,388,389,393,395,398,400,402,405,409,410,412,415,420,423,425,428,432,435,439,443,448,450,452,455,458,462,464,467,470,473,475,479,483,486],[53,42,42,205,11,33],"maker\u002Fpositive\u002Fidea",[207,42,39,208,209,42],"21724515","maker\u002Fneutral\u002Fexecution","tombert",[211,42,39,212,213,42],"21725034","project\u002Fneutral\u002Fexecution","mrfredward",[193,42,42,212,11,33],[216,42,42,217,218,42],"21727121","commenter\u002Fneutral\u002Fnone","pcwalton",[220,42,38,221,222,42],"21726792","project\u002Fpositive\u002Fexecution","_sbrk",[224,42,42,225,226,42],"21730940","other\u002Fneutral\u002Fnone","fortran77",[228,42,39,229,230,42],"21726884","project\u002Fneutral\u002Fdesign","CamperBob2",[196,42,42,229,11,33],[233,33,42,225,234,42],"21725390","vagab0nd",[236,18,39,229,237,42],"21720157","nikconwell",[239,18,42,225,240,42],"21720820","LegitShady",[242,18,42,225,243,42],"21722150","computerex",[245,18,42,225,246,42],"21722760","remarkEon",[248,18,42,225,240,42],"21722808",[250,18,42,225,251,42],"21722932","microcolonel",[253,18,42,225,254,42],"21723391","kick",[256,18,42,225,251,42],"21723724",[258,18,42,225,254,42],"21723779",[260,18,42,225,261,42],"21725090","krapp",[263,18,42,225,264,42],"21724290","dang",[266,18,42,225,267,42],"21722145","PhasmaFelis",[269,18,42,225,270,42],"21722664","crtlaltdel",[272,18,42,225,273,42],"21722780","vidarh",[275,18,42,225,276,42],"21725546","reificator",[278,18,42,225,279,42],"21723207","ouid",[281,18,42,225,282,42],"21726043","zzo38computer",[284,18,42,225,285,42],"21726195","dullroar",[75,39,39,287,76,42],"project\u002Fmixed\u002Fdocs",[289,39,42,290,11,33],"21719986","maker\u002Fpositive\u002Fdocs",[292,39,39,212,293,42],"21720027","pvg",[295,39,42,212,11,33],"21720066",[297,39,42,217,298,42],"21720573","Luc",[300,39,42,217,293,42],"21720779",[302,39,42,217,76,42],"21720858",[304,39,42,212,11,33],"21720906",[306,39,42,217,307,42],"21724967","kazinator",[309,39,42,217,76,42],"21726007",[311,39,42,217,307,42],"21754826",[123,39,42,217,124,42],[314,39,42,217,315,42],"21721106","speps",[317,39,42,217,318,42],"21721266","NotCamelCase",[320,39,42,217,321,42],"21723776","aidenn0",[323,39,42,217,318,42],"21730062",[325,39,42,225,326,42],"21721833","AnIdiotOnTheNet",[328,39,42,217,329,42],"21722482","naters",[331,39,42,217,76,42],"21722886",[333,39,39,212,334,42],"21722211","aepiepaey",[336,39,42,217,76,42],"21722786",[338,39,42,217,307,42],"21725039",[340,39,42,217,76,42],"21726018",[342,39,39,343,344,42],"21722763","project\u002Fneutral\u002Fdocs","vilda",[346,39,42,217,307,42],"21725049",[348,39,39,212,307,42],"21724978",[172,350,42,225,173,42],4,[352,350,42,225,353,42],"21723180","cptnapalm",[355,350,42,225,173,42],"21731426",[357,38,38,358,359,42],"21722327","project\u002Fpositive\u002Fdesign","ZeroGravitas",[361,38,38,358,362,42],"21723798","donpdonp",[87,34,38,221,88,42],[186,34,42,365,11,33],"project\u002Fneutral\u002Fperformance",[367,34,42,225,368,42],"21720752","tyingq",[91,200,38,221,92,42],[106,201,38,371,107,42],"maker\u002Fpositive\u002Fnone",[179,373,42,225,180,42],9,[110,375,42,376,111,42],10,"other\u002Fneutral\u002Fidea",[378,375,42,225,315,42],"21721201",[95,380,38,221,96,42],11,[382,380,39,212,383,42],"21725568","veganjay",[164,31,38,385,165,42],"maker\u002Fpositive\u002Fexecution",[387,31,42,212,11,33],"21719761",[63,31,42,212,11,33],[390,31,39,391,392,42],"21720181","maker\u002Fneutral\u002Fdocs","matsemann",[394,31,42,212,11,33],"21720258",[396,31,42,376,397,42],"21721597","zentiggr",[399,31,42,376,11,33],"21721689",[401,31,42,376,165,42],"21728061",[403,31,38,205,404,42],"21723001","exlurker",[406,189,38,407,408,42],"21719732","project\u002Fpositive\u002Fidea","jonny383",[149,32,42,376,150,42],[411,32,42,225,11,33],"21721453",[99,413,38,414,100,42],15,"project\u002Fpositive\u002Fnone",[416,417,33,418,419,42],"21720624",16,"maker\u002Fcritical\u002Fexecution","ddtaylor",[157,421,39,422,158,42],17,"project\u002Fneutral\u002Fnone",[424,421,42,422,11,33],"21720510",[130,426,33,427,131,42],18,"project\u002Fcritical\u002Fexecution",[429,430,42,225,431,42],"21720108",19,"hoseja",[433,430,42,434,76,42],"21720175","commenter\u002Fneutral\u002Fidea",[436,437,33,427,438,42],"21719999",20,"joosters",[440,441,38,414,442,42],"21732298",21,"rootVIII",[444,445,42,446,447,42],"21719735",22,"other\u002Fcritical\u002Fdesign","thenewnewguy",[449,445,42,225,143,42],"21719750",[451,445,42,225,447,42],"21719870",[453,445,39,454,254,42],"21719787","maker\u002Fneutral\u002Fnone",[456,445,33,457,447,42],"21719881","maker\u002Fcritical\u002Fprivacy",[459,445,42,460,461,42],"21720572","commenter\u002Fneutral\u002Fprivacy","gwd",[463,445,42,460,397,42],"21721649",[465,445,42,466,124,42],"21721016","commenter\u002Fcritical\u002Fprivacy",[468,445,42,460,469,42],"21722278","Rychard",[471,445,33,457,472,42],"21722528","presumably",[474,445,39,229,293,42],"21719836",[476,445,33,477,478,42],"21721728","project\u002Fcritical\u002Fdesign","saagarjha",[480,445,42,481,482,42],"21720916","other\u002Fneutral\u002Fdesign","ajnin",[484,445,42,481,485,42],"21721604","megous",[142,487,39,212,143,42],23,[489,492],{"id":490,"t":491,"points":350,"comments":42},"21691871",1575377682,{"id":4,"t":12,"points":14,"comments":15},[494,499,503,508,512,517],{"id":495,"name":496,"points":497,"category":498},"21712403","Lucid Index \u002F Self Hosted Source",656,"dev_tools",{"id":500,"name":501,"points":502,"category":20},"21717022","AI Dungeon 2",584,{"id":504,"name":505,"points":506,"category":507},"21757003","Kong",294,"finance_crypto",{"id":509,"name":510,"points":511,"category":498},"21742222","db",224,{"id":513,"name":514,"points":515,"category":516},"21751987","FATpick",190,"creative",{"id":518,"name":519,"points":520,"category":521},"21720881","Koko Analytics",187,"data",false,"v2",{"id":525,"name":5,"line":6,"ai":522,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":526,"top":18,"kw":527,"maker":11,"domain":10,"tier":19,"attempts":18,"strip":528,"url":9,"mix":529,"praise":84,"objection":115,"sub":21},21719575,0.22,[24,25,26,27],"3353300000030000003330555553055311531013",[31,32,33,34],1794036583706]