[HN Gopher] Show HN: Tiny PS1-like Renderer in 500 lines
       ___________________________________________________________________
        
       Show HN: Tiny PS1-like Renderer in 500 lines
        
       Author : nkanaev
       Score  : 67 points
       Date   : 2022-08-03 07:21 UTC (15 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | crabbygrabby wrote:
       | So cool. Took me back to my childhood instantly. You nailed it
        
         | angarg12 wrote:
         | My first reaction was "damn that looks good!". I guess it was
         | the nostalgia taking over.
        
       | aliswe wrote:
       | WOW! Looks great! Definitely hit my nostalgia nerve!
        
       | yomkippur wrote:
       | would love to see this run inside a browser. how do you create
       | ps1 texture and lo-poly models like this? I so badly want to
       | create a PS1 style game in the browser.
       | 
       | For lot of us, our childhood was defined by this console. N64 as
       | well but just something about the PS1 graphic that really speaks
       | to me. Anybody else feel the same?
        
       | klipklop wrote:
       | I was wondering how this was done in 500 lines...then I saw the
       | 5000+ line library file borrowed from another project. I do enjoy
       | the look of your results though.
       | 
       | How long before somebody includes your library and says they
       | created PSX graphics in 25 lines?
        
       | glouwbug wrote:
       | heh, I wrote an N64 one not too long ago with the exact same
       | style:
       | 
       | https://github.com/glouw/gel
        
         | SandmanDP wrote:
         | You might notice that your project is already included in the
         | Readme under credits.
        
       | ptsneves wrote:
       | Amazing. On the other hand it makes use of a graphics library
       | that is way bigger than 500 lines. Regardless thank you for
       | sharing but I get the feeling it was good fun.
        
         | kragen wrote:
         | It's true that
         | https://github.com/nkanaev/tipsy/blob/master/src/tigr.c is 5500
         | lines of C but, as far as I can tell, it's just being used to
         | load texture images, draw lines, get double-buffered pixel
         | buffers onto the screen, and get keyboard and mouse events. It
         | wouldn't be difficult to port it to something like
         | https://gitlab.com/kragen/bubbleos/blob/master/yeso. yeso.h
         | yeso-pic.c yeso-xlib.c png.c total 560 lines of C, and all
         | you're missing then is a line-drawing function.
        
       | ok_dad wrote:
       | Linked in the README is the article this is probably based on,
       | which explains the rendering for a PS1 and why it has certain
       | behaviors, it's a great article: https://www.david-
       | colson.com/2021/11/30/ps1-style-renderer.h...
        
       | doubled112 wrote:
       | Funny that my first thought was that the polygons better wobble
       | and it's right there in the features list.
        
       ___________________________________________________________________
       (page generated 2022-08-03 23:01 UTC)