[HN Gopher] Gamedev in Lisp. Part 1: ECS and Metalinguistic Abst...
       ___________________________________________________________________
        
       Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction
        
       Author : myth_drannon
       Score  : 82 points
       Date   : 2024-03-02 13:47 UTC (9 hours ago)
        
 (HTM) web link (awkravchuk.itch.io)
 (TXT) w3m dump (awkravchuk.itch.io)
        
       | raytopia wrote:
       | Cool use of macros. That simulation at the end was very
       | interesting.
       | 
       | One thing I've always wondered about ecs is if you just focused
       | on the array and looping part and instead ignored the component
       | part. Seems a lot simpler over all amd is probably faster too
       | because you're not doing a bunch of branches on components.
        
         | meheleventyone wrote:
         | This is a good spot, ECS really shines when you have a lot of
         | homogeneous entities. Which is why demos are all about enormous
         | cities, thousands of troops or basic particle systems.
         | 
         | If your entities are more heterogenous or don't need to be
         | running all the time the benefit for gameplay code disappears
         | quite quickly. In particular the acronym conception of ECS
         | architecture isn't the most performant way of organizing
         | things. Which is why you end up with concepts like archetypes
         | to base memory organization around.
         | 
         | Nothing wrong if you're writing a general-purpose engine around
         | ECS as an organizational principle but for game makers you
         | still need to think about memory access patterns and how to
         | organize around that.
         | 
         | If you're just trying to make a game then make the game and
         | organize the game data around it's unique access patterns. If
         | that's just a flat array of tagged unions then who cares.
        
       | armchairhacker wrote:
       | A recent, notable game made in Lisp is Kandria:
       | https://store.steampowered.com/app/1261430/Kandria/ /
       | https://github.com/Shirakumo/kandria
        
       | justinhj wrote:
       | Enjoyed this post a lot. As a former professional game developer
       | I spent some time once exploring writing games using the SDL and
       | related libraries. Ultimately it did not progress pass proof of
       | concept but we got some hobby users. Likely it will still mostly
       | work today as Common Lisp is quite resilient to bit rot
       | https://github.com/lispbuilder/lispbuilder
        
       ___________________________________________________________________
       (page generated 2024-03-02 23:00 UTC)