Git Product home page Git Product logo

Comments (1)

zerocoolisgod avatar zerocoolisgod commented on May 14, 2024 2

I loved this article. I've had that global variable argument with myself a lot. Everybody says don't use them ever, so I've spun my wheels trying to avoid them, until I realized that if I'm the only one maintaining my code it's probably fine. If I'm worried about multiple read/writes in the same frame I like to stage my changes to a global (current_room, next_room, have all writes be to next_room. Then at the beginning of each frame have: if current_room ~= next_room then current_room = next_room end)

Also, my only argument for ECS (or any other coding paradigm) over YOLO coding (love that phrase) is when/if you start game #2, you'll actually be farther along that time line and more likely to hit that "effort" intersection. Pulling reusable code out of the giant classes filled with global references is a pain in the ass. That being said all the calories you burn setting up the ecs can make you walk away from the whole project. I have a sticky note on my monitor that says, "stop making an engine and make a game :("

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.