Class

cwinter.codecraft.core.game

DroneWorldSimulator

Related Doc: package game

Permalink

class DroneWorldSimulator extends Simulator

Aggregates all datastructures required to run a game and implements the game loop.

Self Type
DroneWorldSimulator
Linear Supertypes
Simulator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DroneWorldSimulator
  2. Simulator
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DroneWorldSimulator(config: GameConfig, eventGenerator: (Int) ⇒ Seq[SimulatorEvent] = t => Seq.empty, multiplayerConfig: MultiplayerConfig = SingleplayerConfig, forceReplayRecorder: Option[ReplayRecorder] = None, settings: Settings = Settings.default)

    Permalink

    config

    Describes the initial state of the game world.

    eventGenerator

    Allows for triggering custom events.

    multiplayerConfig

    Additional configuration for multiplayer games.

    forceReplayRecorder

    If set to Some(r), the Simulator will replay the events recorded by r.

    settings

    Additional settings that don't affect gameplay.

Type Members

  1. case class Crashed extends Status with Product with Serializable

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  2. sealed trait Status extends AnyRef

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  3. case class Stopped extends Status with Product with Serializable

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Running extends Status with Product with Serializable

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  5. var _measuredFramerate: Int

    Permalink
    Attributes
    protected
    Definition Classes
    Simulator
  6. var _nanoTimeLastMeasurement: Long

    Permalink
    Attributes
    protected
    Definition Classes
    Simulator
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def asyncUpdate()(implicit ec: ExecutionContext): Future[Unit]

    Permalink

    Asynchronously performs one timestep.

    Asynchronously performs one timestep. Returns a future which completes once all changes have taken effect.

    Attributes
    protected
    Definition Classes
    DroneWorldSimulator → Simulator
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def currentPhase: Symbol

    Permalink
  11. var debug: Debug

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. var exceptionHandler: Option[Function1[Throwable, _]]

    Permalink
    Attributes
    protected
    Definition Classes
    Simulator
  15. def excessMillis: (Option[Int], Boolean)

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def forceGL2: Boolean

    Permalink
    Definition Classes
    Simulator
  18. def frameMillis: Double

    Permalink
    Attributes
    protected
    Definition Classes
    Simulator
  19. def framerateTarget: Int

    Permalink

    Returns the target framerate in frames per second.

    Returns the target framerate in frames per second.

    Definition Classes
    Simulator
  20. def framerateTarget_=(value: Int): Unit

    Permalink

    Sets the target framerate to the given value.

    Sets the target framerate to the given value.

    value

    The new framerate target.

    Definition Classes
    Simulator
  21. def gameStatus: Status

    Permalink

    Returns the game's status

    Returns the game's status

    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    DroneWorldSimulator → Simulator
  22. def gameStatus_=(value: Status): Unit

    Permalink
    Attributes
    protected
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. var graphicsEnabled: Boolean

    Permalink
    Definition Classes
    Simulator
  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. def initialCameraPos: Vector2

    Permalink

    Returns the initial camera position in the game world.

    Returns the initial camera position in the game world.

    Definition Classes
    DroneWorldSimulator → Simulator
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def isPaused: Boolean

    Permalink

    Returns true if the game is currently paused.

    Returns true if the game is currently paused.

    Definition Classes
    Simulator
  29. def measuredFramerate: Int

    Permalink

    Returns the number of ticks per second measure over the last 60 tick interval.

    Returns the number of ticks per second measure over the last 60 tick interval.

    Definition Classes
    Simulator
  30. val monitor: PerformanceMonitor

    Permalink
  31. val namedDrones: Map[String, Drone]

    Permalink
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. def replayString: Option[String]

    Permalink
  36. def run(steps: Int): Unit

    Permalink

    Will run the game for steps timesteps.

    Will run the game for steps timesteps.

    Definition Classes
    Simulator
  37. def run(): Unit

    Permalink

    Runs the game until the program is terminated.

    Runs the game until the program is terminated.

    Definition Classes
    Simulator
  38. val settings: Settings

    Permalink

    Additional settings that don't affect gameplay.

  39. var stopped: Boolean

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. var tFrameCompleted: Long

    Permalink
    Attributes
    protected[cwinter.codecraft]
    Definition Classes
    Simulator
  42. def terminate(): Unit

    Permalink

    Terminates any running game loops.

    Terminates any running game loops.

    Definition Classes
    Simulator
  43. def textModels: Iterable[TextModel]

    Permalink
    Attributes
    protected
    Definition Classes
    DroneWorldSimulator → Simulator
  44. def tickPeriod: Int

    Permalink
  45. def timestep: Int

    Permalink

    Returns the current timestep.

    Returns the current timestep.

    Definition Classes
    Simulator
  46. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  47. def togglePause(): Unit

    Permalink

    Pauses or resumes the game as applicable.

    Pauses or resumes the game as applicable.

    Definition Classes
    DroneWorldSimulator → Simulator
  48. def update(): Unit

    Permalink

    Performs one timestep.

    Performs one timestep.

    Definition Classes
    DroneWorldSimulator → Simulator
  49. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. def winner: Option[Player]

    Permalink

    Returns the winning player.

  53. val worldBoundaries: ModelDescriptor[Unit]

    Permalink

Inherited from Simulator

Inherited from AnyRef

Inherited from Any

Ungrouped