Communication between players



  • In order to be able to coordinate, form and break alliances, offer or request protection, etc.. it would be good to have some form of message channel to other players in game.

    This could be a very simple message bus on the Room object. It might add a new game play body type : communicate .

    It could be as simple as sending an integer message

    i.e. creep.room.sendMessage(REQUEST_ALLIANCE, targetRoom);

    To avoid bad behavior, messages could be limited to integer constants defined by game creator.

    The message could sit in a message queue for the room for 1 day or something. Room might have methods getMessages and deleteMessages(idArray). A message would have an id, an owner, an integer constant as the body, a targetRoom that can be specified (for replying to or for designating for coordinated attacks, once alliances are formed).

    For new users who have not yet coded any message processing, the que would just fill and empty over time. As users added message processing to their code, they could automatically form alliances, coordinate attacks, and organize defenses.

    A message would have an
    Cleaner api:

    creep.sendMessage(creep.room, targetRoom, REQUEST_ALLIANCE);
    creep.sendMessage(creep.room, targetRoom, RALLY);
    creep.sendMessage(creep.room, targetRoom, ATTACK); //request to attack room owner
    creep.sendMessage(creep.room, targetRoom, DEFEND); //request to attack non allied units in target room
    

    Also, since messages are just numeric constants, people are free to devise extra communication outside the pre-defined constants, but they can't spam offensive stuff because its just a bunch of numbers.



  • Need messaging, numeric constants won't be much use, tho. Getting offended is popular these days - don't buy into their agenda - just ignore these creeps.