Hacker Newsnew | past | comments | ask | show | jobs | submit | kcroarkin's commentslogin

I am writing a voxel game in Dyalog APL where I call a low level graphics API directly in APL and perform nearly all of the core logic in APL (Terrain generation, generating geometrical representations, collision, frustum culling). You can see it here: https://github.com/namgyaaal/avoxelgame and a demo of me playing it here: https://www.youtube.com/watch?v=LgNkSdAXS_c


(crossing fingers I one shot formatting correctly) I use 2-wise for figuring out which water surfaces to draw: ⍉l⊤⍸∊(chunk=¯1)(2>⌿⍤2⍪⍤2)⊢0⍴⍨⊃l

- ⍪⍤2 add padding on top of surface of bit mask of water

- 2>⌿⍤2 identify where surface is exposed by seeing if air comes after water vertically

- ⍉l⊤⍸∊ collapse and get where water is in chunk position format row-by-row


Author here. D’oh! Thanks for catching that. I have no idea what I’m doing web dev wise and made this site to talk about my APL experience. Will try to fix this when time permits.


Find the "write only" comments you commonly see online to be untrue. I have been writing a voxel game in majority APL code for the past 6 months. I have been able to read my own code and refactor stuff I've written months ago fine while also integrating code from other APL codebases and suggestions from other people. It just has a higher learning curve to understand.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: