Module: GameOverseer

Defined in:
lib/gameoverseer.rb,
lib/gameoverseer/version.rb,
lib/gameoverseer/console/console.rb,
lib/gameoverseer/services/service.rb,
lib/gameoverseer/services/services.rb,
lib/gameoverseer/server/encryption.rb,
lib/gameoverseer/server/renet_server.rb,
lib/gameoverseer/clients/client_manager.rb,
lib/gameoverseer/channels/channel_manager.rb,
lib/gameoverseer/messages/message_manager.rb,
lib/gameoverseer/input_handler/input_handler.rb

Overview

General purpose game server that uses services (plugins) for logic.

Defined Under Namespace

Modules: Encryption, Services Classes: ChannelManager, ClientManager, Console, ENetServer, ENetServerRunner, InputHandler, MessageManager, Service

Constant Summary collapse

VERSION =
"0.1.2"
RELEASE_NAME =

1.0 is to be “Ice Crystal”

"Blank Slate"

Class Method Summary collapse

Class Method Details

.activate(host, port) ⇒ Object

Start server


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/gameoverseer.rb', line 30

def self.activate(host, port)
  GameOverseer::ChannelManager.new
  GameOverseer::MessageManager.new
  GameOverseer::ClientManager.new

  @console = GameOverseer::Console.new
  @server  = GameOverseer::ENetServerRunner.new

  Thread.new {@server.start(host, port)}
  @console.show
  sleep

  at_exit do
    GameOverseer::Console.instance.close
    @server.supervisor.terminate if defined?(@server.supervisor.terminate)
    puts "Server Shutdown"
  end
end

.deactivateObject

Stop server


50
51
52
53
# File 'lib/gameoverseer.rb', line 50

def self.deactivate
  puts "ALERT \"CONSOLE CLOSED. LOST CONTROL OF SERVER.\""
  @server.supervisor.terminate
end