Is passing a game object to be an instance variable of a game component a good practice?

This page summarizes the projects mentioned and recommended in the original post on /r/learnprogramming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • gameBase

    Base structure for my games, using Heaps framework and Haxe language.

  • Use a static variable. This project uses a Game object that's accessible via a static variable. Any object that needs game just looks for Game.ME. People tend to frown on static variables, but for a simple game, there's typically only one Game instance at a time. (FWIW, this project is from one of the guys who created Dead Cells.)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts