Skip to content

Conversation

@punchcafe
Copy link
Collaborator

needs tidying


public class LevelStageBootstrap implements LevelBootstrap {

CircuitModelMap circuitModelMap;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this private


// TODO: inject a lookup map to find circuit by game object
// TODO: introduce object to model stereotype Map<GameObject, Model> which can be added to the context
// Map<Model.class,Map<GameObject, Model>>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very interesting idea. We might wanna add this to braingdx if it fulfills these criterias:

  • it saves a lot of time when creating new games
  • it does not introduce strange coupling at scale (checkout https://github.com/bitbrain/galacticum as a reference, this is a project of mine where I attempted to create an infinite 2D space game but it failed due to coupling issues. I want to avoid them in braingdx)

Let's see some code in action and see if it's useful!

if(circuit.getState() == Circuit.State.ON){
double xSep = hound.getLeft() - object.getLeft();
double ySep = hound.getTop() - object.getTop();
double rSep = Math.pow(Math.pow(xSep, 2) + Math.pow(ySep, 2), 0.5);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you actually don't need that. Checkout the RayHandler class available through the LightingManager. I'd prefer this since we then can use different types of lights (like cone light for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants