Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThe problem is not really the specific implementation of Move() or Jump() but where in the code to place this functionality. Creating a Move class or even a Move component doesn't really work. Creating a system that handles any action/movement kind of makes sense but that still only solves the problem of WHERE the function is implemented. For example, the problem of how to bind it to a key still exists.
      singulars
    2. COMaybe I'm not understanding -- why does making a Move class not work? The logic would presumably be implemented in the Move class, which would adjust the location of the entity it is moving after processing whatever business rules there are. I do this kind of thing all the time, it works well by isolating the abstract logic of operations from the abstract objects they're acting on. It sounds like you have the same problem, no?
      singulars
    3. COBecause with this architecture it doesn't make any sense to have a Move Class because you only need Move Method. The data that you're acting on already exists in a Position Component Class and you want to directly mess with that component's data. The architecture is focused on Entities made up of various Components and the Components are acted upon with Systems. What system does Move belong in? The answer may not be a system at all. I suppose that I could create a Static Class of Actions containing the logic for things like MoveUp, MoveLeft, etc.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload