Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8209803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:51:16+00:00 2026-06-07T09:51:16+00:00

Consider a game engine that utilizes a scene . Now, a scene can have

  • 0

Consider a game engine that utilizes a scene. Now, a scene can have a list of actors, which are the objects in the current scene. The pseudo for this might look like:

class Scene
{
    public List<Actor> Actors { get; set; }
    ....
}

For the game loop, the engine calls Update() on the scene object, which then calls Update() on all of the actors.

Now, my question is this: What is a good method to allow actors to communicate (if actors need to be aware of other actors)? i.e. I might have an actor that represents a bullet. This bullet needs to be aware of all enemy actors (so that the bullet can kill them, etc.) I could provide a handle to each actor that references the current scene the actor is in, but that sounds like a bad idea (giving that kind of access/power to each actor).

I’d like to be able to keep all the actors blinded from other actors and the scene, if possible, and achieve behavior/communication through some contract, but I haven’t been able to come up with anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:51:18+00:00Added an answer on June 7, 2026 at 9:51 am

    It depends on what you are trying to do. If your game engine is composition based, that may be a solution (I mean each game object is not defined by its class name but rather by the objects that compose it, and you can interact with those objects). You can also register them all in the Scene and be able to fetch them by name, or getting an array of existent by type (using template methods, for example). You can also use the Observer pattern: each game object implements an interface providing a service, and other game objects subscribe to that service, and are updated when the values of that other object is updated. There are tons of valid solutions, I’m just contributing with some more. It really depends on what you want to take out from the interactions between the objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a somewhat simple game that I'm making and now that I'm testing
I have built a free version of a game app which is now on
Consider this scenario. I have my own website, that I use as my identifier,
Consider a game similar to pac-mac that we want to represent it with an
I am making a game on android which will have three threads. These will
Consider that, for a Windows video game, I need to determine if the key
I have some assets for my game that are being loaded when the gameplay
I'm writing a Risk-like board game in java. A feature is that players can
Consider I have a game-creation framework, with a basic class called Game. // Action
Consider you have the following code implementation of a timer in a net game:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.