Final-Bomber  0.1
Bomberman/Dynablaster remake in C# using XNA.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
Program.cs
Go to the documentation of this file.
1 using System.Diagnostics;
2 using FBLibrary;
3 using FBServer.Core;
4 using System;
5 using System.Threading;
6 using FBServer.Core.WorldEngine;
7 using log4net;
8 using log4net.Config;
9 
10 namespace FBServer
11 {
12  class Program
13  {
14  public static readonly ILog Log = LogManager.GetLogger(typeof(Program));
15 
16  static void Main(string[] args)
17  {
18  // For log
19  XmlConfigurator.Configure();
20 
21  // We get all map files to store name + md5 checksum in a dictionary
22  MapLoader.LoadMapFiles();
23 
24  if (args.Length > 0)
25  {
26  Program.Log.Info("Arguments:");
27  foreach (string s in args)
28  {
29  Program.Log.Info(s);
30  }
31  }
32 
33  var server = new GameServerHandler();
34 
35  if (!server.Running)
36  {
37  GameSettings.GameName = "Final-Server";
38  Log.Info("Player Number: " + GameConfiguration.PlayerNumber);
39 
40  server = new GameServerHandler();
41  server.Initialize();
42 
43  var timer = new Stopwatch();
44  timer.Start();
45  while(server.Running)
46  {
47  // Delta time
48  GameConfiguration.DeltaTime = timer.Elapsed.Ticks;
49 
50  server.Update();
51  //Program.Log.Info(timer.Elapsed.Milliseconds);
52  timer.Restart();
53  Thread.Sleep(15);
54  }
55  }
56  }
57  }
58 }
static readonly ILog Log
Definition: Program.cs:14