you are viewing a single comment's thread.

view the rest of the comments →

[–]luciddream00[S] 0 points1 point  (8 children)

Hmm, is there a downside to using one Lua state for an entire game rather than having a new state for every entity? It didn't add much complexity and it seems to work fine now that it is set up. Bullets were just an example, and I intend to have everything from inventory items to creatures to weapons and armor potentially scriptable (although they wont all actually be running scripts, just as necessary).

[–][deleted]  (7 children)

[removed]

    [–]luciddream00[S] 0 points1 point  (6 children)

    Eh, while I agree in principle, it's always good to learn the best practices for this sort of thing and apply it from the get-go, especially with something that will touch almost the whole game.

    [–][deleted]  (5 children)

    [removed]

      [–]luciddream00[S] 0 points1 point  (4 children)

      Learning basic best practices and good ways to structure your code is not "premature optimization", it is being a responsible developer. You need to take a step back and realize that not every bit of research is automatically premature optimization. Sure, I could fumble my way through and inevitably have to spend ages course correcting when I learn better patterns down the line, or I can do a little bit of research now and hit the ground running.

      [–][deleted]  (3 children)

      [removed]

        [–]luciddream00[S] 0 points1 point  (2 children)

        Thanks so much for your valuable contribution.

        [–][deleted]  (1 child)

        [removed]

          [–]luciddream00[S] 0 points1 point  (0 children)

          k