robakka is a programming game in scala. It is based on akka (http://akka.io) to model the agents in the game. Also it is not round based but implemented to allow the agents to react in real-time to events. Agents are customized by implementing a certain behaviour.
This game is inspired by RobotWar (https://en.wikipedia.org/wiki/RobotWar) and cells (https://github.com/phreeza/cells).
The main challenge of the game is to implement behaviours which can beat others. I provide some pretty simple behaviours and will continue to add more as development progresses.
For example check out FollowPlantBehaviour
which will cause all agents with the installed behaviour to move to the field of a plant if there is one in their neighbourhood. If there is no plant, the behaviour causes the agent to randomly search for another plant. All agents with this behaviour are pacifists, they only eat plants and never shoot anyone! The implementation of it is quite simple:
package io.github.tdhd.robakka.behaviours
import io.github.tdhd.robakka._
import io.github.tdhd.robakka.Agent.MoveCommand
case object FollowPlantBehaviour extends BaseBehaviour {
def act(entity: World.AgentEntity, worldState: World.StateContainer) = {
val plants = BehaviourHelpers.entities2MoveCommand(entity, worldState)
val move = plants.collect {
case (plant: World.PlantEntity, moveCommand) => moveCommand
}.headOption.getOrElse(BehaviourHelpers.getRandomMove)
Agent.CommandSet(move = Option(move))
}
}
robakka is in early development and barely useable at the moment.
robakka is a combination of robot and akka, the underlying modelling framework of the agents.