static void Main(string[] args) { _gameOver = false; _statusText = ""; Player = new Player(); InfoLog = new InformationLog <int, string>(); SectorMap = new Dictionary <int, Sector>(); SectorMap.Add(0, new Sector(CurrentSector)); SectorMap.TryGetValue(0, out _currentSectorMap); _currentSectorMap.JoinSector(); _cancel = new Cancel(); string fontFileName = "terminal8x8.png"; string consoleTitle = "RobSpaceRoguelike"; _rootConsole = new RLRootConsole(fontFileName, ScreenWidth, ScreenHeight, 8, 8, 1f, consoleTitle); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; // TESTING - Only uncomment this if you want to pre-generate (and travel through) a number of systems. //TestRun(50000); //TestLog(); _rootConsole.Run(); }
/// <summary> /// Create a console and display the game /// </summary> /// <param name="game"></param> public Console(Game game) { this.game = game; rootConsole = new RLRootConsole("ascii_8x8.png", screenWidth, screenHeight, 8, 8, 1); rootConsole.Update += Update; rootConsole.Render += Render; }
public static void Main() { TurnQueue = new TurnQueue(); int seed = (int)DateTime.UtcNow.Ticks; Random = new DotNetRandom(seed); string bitmap = "terminal8x8.png"; string Title = $"RPG - Poziom {Facade._mapLevel}"; _mainConsole = new RLRootConsole(bitmap, _screenWidth, _screenHeight, 8, 8, 1f, Title); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _logConsole = new RLConsole(_logWidth, _logHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _lootConsole = new RLConsole(_lootWidth, _lootHeight); _mainConsole.Update += OnRootConsoleUpdate; _mainConsole.Render += OnRootConsoleRender; _mapConsole.SetBackColor(0, 0, _mapWidth, _mapHeight, Colors.FloorBG); _mapConsole.Print(1, 1, "Mapa", Colors.TextH); _statConsole.SetBackColor(0, 0, _statWidth, _statHeight, Palette.Red2); _statConsole.Print(1, 1, "Statystyki", Colors.TextH); _lootConsole.SetBackColor(0, 0, _lootWidth, _lootHeight, Palette.Wood); _lootConsole.Print(1, 1, "Ekwipunek", Colors.TextH); soundplayer.SoundLocation = AppDomain.CurrentDomain.BaseDirectory + "\\muzyka.wav"; soundplayer.PlayLooping(); facade.InitGame(); _mainConsole.Run(); }
public static void Main() { string fontFileName = "terminal8x8.png"; string consoleTitle = "RougeSharp RLNet Tutorial - Level 1"; int seed = (int)DateTime.UtcNow.Ticks; Random = new DotNetRandom(seed); MessageLog = new MessageLog(); MessageLog.Add("The rogue arrives on level 1"); MessageLog.Add($"Level created with seed '{seed}'"); Player = new Player(); SchedulingSystem = new SchedulingSystem(); MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight, 20, 13, 7, _mapLevel); DungeonMap = mapGenerator.CreateMap(); _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); CommandSystem = new CommandSystem(); TargetingSystem = new TargetingSystem(); Player.Item1 = new RevealMapScroll(); Player.Item2 = new RevealMapScroll(); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _rootConsole.Run(); }
static void Main(string[] args) { string fontFileName = "terminal8x8.png"; string consoleTitle = "p.707"; _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _mapHeight); _statsConsole = new RLConsole(_statsWidth, _mapHeight); _invConsole = new RLConsole(_invWidth, _invHeight); Player = new Player(); CommandSystem = new CommandSystem(); GeneratorForMaps generatorForMaps = new GeneratorForMaps(_mapWidth, _mapHeight); DungeonMap = generatorForMaps.CreateMap(); DungeonMap.UpdatePlayerFoV(); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _mapConsole.SetBackColor(0, 0, _mapWidth, _mapHeight, Colors.FloorBackground); _mapConsole.Print(1, 1, "Map", Colors.TextHeading); _messageConsole.SetBackColor(0, 0, _messageWidth, _messageHeight, Swatch.PrimaryDarkest); _messageConsole.Print(1, 1, "Messages", Colors.TextHeading); _statsConsole.SetBackColor(0, 0, _statsWidth, _statsHeight, Swatch.PrimarySandy); _statsConsole.Print(1, 1, "Stats", Colors.TextHeading); _invConsole.SetBackColor(0, 0, _invWidth, _invHeight, Swatch.PrimaryDarker); _invConsole.Print(1, 1, "Inv", Colors.TextHeading); // _rootConsole.Run(); }
public static void Main() { for (int i = 0; i < WIDTH; i++) { for (int j = 0; j < HEIGHT; j++) { if (i == 0 || j == 0 || i == WIDTH - 1 || j == HEIGHT - 1) { grid[i, j] = 1; } else { grid[i, j] = 0; } } } _renderRequired = true; // This must be the exact name of the bitmap font file we are using or it will error. string fontFileName = "terminal8x8.png"; // The title will appear at the top of the console window string consoleTitle = "roguelike"; // Tell RLNet to use the bitmap font that we specified and that each tile is 8 x 8 pixels rlRoot = new RLRootConsole(fontFileName, WIDTH, HEIGHT, 8, 8, 1f, consoleTitle); // Set up a handler for RLNET's Update event rlRoot.Update += OnRootConsoleUpdate; // Set up a handler for RLNET's Render event rlRoot.Render += OnRootConsoleRender; // Begin RLNET's game loop rlRoot.Run(); }
public DefaultRLView(AbstractRoguelike _game) { this.game = _game; // This must be the exact name of the bitmap font file we are using or it will error. string fontFileName = "terminal8x8.png"; // The title will appear at the top of the console window string consoleTitle = "RougeSharp V3 Tutorial - Level 1"; // Tell RLNet to use the bitmap font that we specified and that each tile is 8 x 8 pixels this.rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); // Initialize the sub consoles that we will Blit to the root console this.mapConsole = new RLConsole(_mapWidth, _mapHeight); this.logConsole = new RLConsole(_messageWidth, _messageHeight); this.statConsole = new RLConsole(_statWidth, _statHeight); this.crewListConsole = new RLConsole(crewListWidth, crewListHeight); // Set up a handler for RLNET's Update event this.rootConsole.Update += this.OnRootConsoleUpdate; // Set up a handler for RLNET's Render event this.rootConsole.Render += this.OnRootConsoleRender; // Begin RLNET's game loop }
public static void Main() { Random = new Random(); string consoleTitle = $"RogueLike game VCS Level1"; CommandSystem = new CommandSystem(); Player = new Player(); MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight, 25, 15, 7); DungeonMap = mapGenerator.CreateMap(); DungeonMap.UpdatePlayerFieldOfView(); string fontFileName = "terminal8x8.png"; _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _rootConsole.Run(); }
static void Main(string[] args) { Random = new RogueSharp.Random.DotNetRandom(seed); // create output system string fontFileName = "terminal8x8.png"; string consoleTitle = $"ECS Test Level = {_mapLevel}"; _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); // create systems, entityManager first EntityManager = new Systems.EntityManager(_mapWidth, _mapHeight); CommandSystem = new Systems.CommandSystem(); MessageLog = new Systems.MessageLog(); SystemsManager = new Systems.SystemManager(EntityManager); RenderSystem = new Systems.RenderSystem(EntityManager); ShedSystem = new Systems.SchedulingSystem(); UseSystem = new Systems.UseSystem(EntityManager); InventorySystem = new Systems.InventorySystem(EntityManager); //listen for critical events Core.EventBus.Subscribe(Core.EventTypes.GameCritical, (sender, e) => OnMessage(e)); //MessageLog.Add("Rogue At level 1"); //create map stuff Systems.MapGenerator mapGenerator = new Systems.MapGenerator(_mapWidth, _mapHeight, 25, 20, 7, _mapLevel, EntityManager); DungeonMap = mapGenerator.CreateMap(); MovementSystem = new Systems.MovementSystem(DungeonMap, EntityManager); CollisionSystem = new Systems.CollisionSystem(EntityManager, DungeonMap); // place monsters mapGenerator.PlaceMonsters(EntityManager); mapGenerator.PlaceGold(EntityManager); //run initial FOV for monsters //DungeonMap.UpdateFOVForMonsters(EntityManager); //creat garbage system GarbageSystem = new Systems.GarbageSystem(ShedSystem, EntityManager, DungeonMap); //create AI system AISystem = new Systems.AISystem(EntityManager, DungeonMap, GarbageSystem); _inventoryConsole.SetBackColor(0, 0, _inventoryWidth, _inventoryHeight, Core.Swatch.DbWood); _inventoryConsole.Print(1, 1, "Inventory", Core.Colours.TextHeading); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _rootConsole.Run(); }
public static void mainRender(RLRootConsole _rootConsole) { _rootConsole.Print(36, 1, "Press e to exit", RLColor.White); _rootConsole.Print(4, 3, "Game", RLColor.Cyan); _rootConsole.Print(4, 4, "1) Play Game", RLColor.White); _rootConsole.Print(4, 5, "2) Multiplayer", RLColor.White); }
public static void Main() { // Uncomment to clear settings if testing or something has broken things. //UserDataManager.DeleteSaveSummaryFile(); //UserData.ApplicationSettings.ClearAllParameters(); StaticDatabase.StaticDatabaseConnection.OpenDBConnection(); UserDataManager.SetupDirectoriesAndFiles(); UserInputHandler.ExtraKeys = UserData.ApplicationSettings.ExtraKeys; UserDataManager.FullLogging = UserData.ApplicationSettings.FullLogging; // TODO: Set the gm option here too. rootConsole = new RLRootConsole(_fontName, _consoleWidth, _consoleHeight, _fontSize, _fontSize, _scale, _windowTitle); rootConsole.Update += RootConsoleUpdate; rootConsole.Render += RootConsoleRender; var mainLoopThread = new Thread(RunStartMenu); mainLoopThread.Start(); rootConsole.Run(); StaticDatabase.StaticDatabaseConnection.CloseDBConnection(); }
public static void Main() { Player = new Player(); MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight); DungeonMap = mapGenerator.CreateMap(); DungeonMap.UpdatePlayerFieldOfView(); // This must be the exact name of the bitmap font file we are using or it will error. string fontFileName = "terminal8x8.png"; // The title will appear at the top of the console window string consoleTitle = "RougeSharp V3 Tutorial - Level 1"; // Tell RLNet to use the bitmap font that we specified and that each tile is 8 x 8 pixels _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); // Initialize the sub consoles that we will Blit to the root console _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); // Set up a handler for RLNET's Update event _rootConsole.Update += OnRootConsoleUpdate; // Set up a handler for RLNET's Render event _rootConsole.Render += OnRootConsoleRender; // Begin RLNET's game loop _rootConsole.Run(); }
public Engine (RLRootConsole console) { Util.Console = console; Util.Messages = new MessageSystem (); manager = new GameManager (); Util.Console.Update += gameUpdate; Util.Console.Render += gameRender; }
public Engine(RLRootConsole console) { Util.Console = console; Util.Messages = new MessageSystem(); manager = new GameManager(); Util.Console.Update += gameUpdate; Util.Console.Render += gameRender; }
public static void multiRender(RLRootConsole _rootConsole) { _rootConsole.Print(36, 1, "Press e to exit", RLColor.White); _rootConsole.Print(4, 3, "Multiplayer", RLColor.Cyan); _rootConsole.Print(4, 4, "1) Host Game", RLColor.White); _rootConsole.Print(4, 5, "2) Join Game", RLColor.White); multiRendered = true; }
public MessageSystem () { game = Util.Console; messages = new List<Message> (); AddMessage ("coffeeRL v0.5 - \"Backfist\""); AddMessage ("Entering floor 1..."); AddMessage ("Prepare yourself!"); }
static void RootConsoleRender(object sender, EventArgs e) { if (MainGraphicDisplay.IsDirty) { rootConsole.Clear(); rootConsole = MainGraphicDisplay.CopyDisplayToRootConsole(rootConsole); rootConsole.Draw(); } }
public Engine(RLRootConsole console, IMap map) { _map = map; _player = new Player(); _rootConsole = console; _rootConsole.Render += Render; _rootConsole.Update += Update; }
public MessageSystem() { game = Util.Console; messages = new List <Message> (); AddMessage("coffeeRL v0.5 - \"Backfist\""); AddMessage("Entering floor 1..."); AddMessage("Prepare yourself!"); }
public static RLRootConsole CopyDisplayToRootConsole(RLRootConsole destination) { lock (_backConsole) { RLConsole.Blit(_backConsole, 0, 0, WINDOWWIDTH, WINDOWHEIGHT, destination, 0, 0); _backConsole.SetClean(); } return(destination); }
static void Main(string[] args) { string fontFileName = "terminal8x8.png"; string consoleTitle = "DougDimmaDungeon - Level 1"; _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _rootConsole.Run(); }
public static void Main() { int width = 200, height = 120; rootConsole = new RLRootConsole("ascii_8x8.png", width, height, 8, 8); root = new Root(); rootConsole.Render += (s, e) => root.RenderManager.RenderDirtyCells(rootConsole); rootConsole.Update += RootConsole_Update; rootConsole.Run(); }
public SPEngine(RLRootConsole rootConsole) { this.rootConsole = rootConsole; mapConsole.SetBackColor(0, 0, 70, 50, RLColor.Blue); invConsole.SetBackColor(0, 0, 20, 70, RLColor.Cyan); mapGenerate(); var pos = map.findPPos(); player.pos = pos; }
public InventoryScreen(bool transparent, bool pauses, RLRootConsole rootConsole) { _rootConsole = rootConsole; _inventoryConsole = new RLConsole(INVENTORYWIDTH, INVENTORYHEIGHT); _messageConsole = new RLConsole(MESSAGEWIDTH, MESSAGEHEIGHT); inventorySystem = GameController.InventorySystem; inventoryUI = new InventoryUI(this); menuControls = new MenuControls(rootConsole); Transparent = transparent; Pauses = pauses; }
public void RenderDirtyCells(RLRootConsole console) { console.Clear(); foreach (VisibleCell cell in _visibleCells) { if (VisibleLayers.Contains(cell.Layer)) { console.Set(cell.X, cell.Y, cell.Color, cell.BackColor, cell.Character.Code); } } console.Draw(); }
public MainScreen(bool transparent, bool pauses, RLRootConsole rootConsole) { _rootConsole = rootConsole; Transparent = transparent; Pauses = pauses; _mapConsole = new RLConsole(MAPWIDTH, MAPHEIGHT); _messageConsole = new RLConsole(MESSAGEWIDTH, MESSAGEHEIGHT); _statConsole = new RLConsole(STATWIDTH, STATHEIGHT); _timeLineConsole = new RLConsole(TIMELINEWIDTH, TIMELINEHEIGHT); GameController = new GameController(MAPWIDTH, MAPHEIGHT); }
public DungeonControls(RLRootConsole rootConsole) { _rootConsole = rootConsole; pressedKeys = new List <RLKey>(); controlState = PlayerControlState.Normal; controls = new Dictionary <PlayerControlState, Func <RLKey, bool> >() { { PlayerControlState.Debug, Debug }, { PlayerControlState.Normal, Normal }, { PlayerControlState.LightAttack, LightAttack }, { PlayerControlState.MediumAttack, MediumAttack } }; }
static void Main() { // Establish the seed for the random number generator from the current time int seed = (int)DateTime.UtcNow.Ticks; Random = new DotNetRandom(seed); // This must be the exact name of the bitmap font file we are using or it will error. string fontFileName = "terminal8x8.png"; // The title will appear at the top of the console window string consoleTitle = $"RougeSharp V3 Tutorial - Level 1 - Seed {seed}"; // Tell RLNet to use the bitmap font that we specified and that each tile is 8 x 8 pixels _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); // Initialize the sub consoles that we will Blit to the root console _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); CommandSystem = new CommandSystem(); SchedulingSystem = new SchedulingSystem(); MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight, 20, 13, 7); DungeonMap = mapGenerator.CreateMap(); DungeonMap.UpdatePlayerFieldOfView(); MessageLog = new MessageLog(); MessageLog.Add("The rogue arrives on level 1"); MessageLog.Add($"Level created with seed '{seed}'"); // Set up a handler for RLNET's Update event _rootConsole.Update += OnRootConsoleUpdate; // Set up a handler for RLNET's Render event _rootConsole.Render += OnRootConsoleRender; // Set background color and text for each console // so that we can verify they are in the correct positions _inventoryConsole.SetBackColor(0, 0, _inventoryWidth, _inventoryHeight, Swatch.DbWood); _inventoryConsole.Print(1, 1, "Inventory", Colors.TextHeading); // Begin RLNET's game loop _rootConsole.Run(); }
public static void Main() { // This must be the exact name of the bitmap font file we are using or it will error. string fontFileName = "terminal8x8.png"; // The title will appear at the top of the console window string consoleTitle = "Theseus"; // Tell RLNet to use the bitmap font that we specified and that each tile is 8 x 8 pixels _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 8, 8, 1f, consoleTitle); // Initialize the sub consoles that we will Blit to the root console _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); Player = new Player(); NPC = new NPC(); MessageLog = new MessageLog(); MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight); DungeonMap = mapGenerator.CreateMap(); DungeonMap.UpdatePlayerFieldOfView(); CommandSystem = new CommandSystem(); // Set up a handler for RLNET's Update event _rootConsole.Update += OnRootConsoleUpdate; // Set up a handler for RLNET's Render event _rootConsole.Render += OnRootConsoleRender; // _messageConsole.SetBackColor(0, 0, _messageWidth, _messageHeight, Swatch.DbDeepWater); // _messageConsole.Print(1, 1, "Messages", RLColor.White); _statConsole.SetBackColor(0, 0, _statWidth, _statHeight, Swatch.DbOldBlood); _statConsole.Print(1, 1, "Stats", RLColor.White); _inventoryConsole.SetBackColor(0, 0, _inventoryWidth, _inventoryHeight, Swatch.DbWood); _inventoryConsole.Print(1, 1, "Inventory", RLColor.White); MessageLog.Add("You wake up in what remains of your ship..."); MessageLog.Add("> Bob: \"Good morning, boss!\""); // Begin RLNET's game loop _rootConsole.Run(); }
/// <summary> /// Main entry point for the program /// This is where the program starts here the various settings are set /// and the root console is created we also hook the events handlers /// for each event. Then we start the console. /// </summary> public static void Main() { var fontImage = @"iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAAB3RJTUUH3wEZFiMyURjM3AAAABd0RVh0U29mdHdhcmUAR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h16twOxhhIo8jrJNtd89Q/YLYgG7+ehVq/AVkUzTyOBjDLW+lR4ItBg7WVFoLKNt9gwbh4+u HaPHRRusBft5vKRevVbQoabT80X86Xf4ulXKwuF036Cqp21XmBbjOC4sskmcKR9UgTFWwONffwXOwXQ21hMMW080HwPzRXMB74g0P8duCPeqnSX0zq38AkpsLsVLOAuMAAAAASUVORK5CYII="; Byte[] bitmapData = Convert.FromBase64String(FixBase64ForImage(fontImage)); MemoryStream bitMapStream = new MemoryStream(bitmapData); FileStream bitFile = new FileStream(Path.GetTempPath() + "rlFontFile.png", FileMode.Create); bitMapStream.WriteTo(bitFile); bitFile.Close(); var settings = new RLSettings(); settings.BitmapFile = Path.GetTempPath() + "rlFontFile.png"; settings.CharWidth = 8; settings.CharHeight = 8; settings.Width = 91; settings.Height = 56; settings.Scale = 1f; settings.Title = "PythonRouge"; settings.WindowBorder = RLWindowBorder.Fixed; settings.ResizeType = RLResizeType.ResizeCells; settings.StartWindowState = RLWindowState.Normal; _rootConsole = new RLRootConsole(settings); _rootConsole.Update += rootConsole_Update; _rootConsole.Render += rootConsole_Render; _rootConsole.Run(60); }
public static void Play() { string fontFileName = "terminal16x16_gs_ro.png"; // for testing use 1138043851 Random = new DotNetRandom(seed); //TODO: Take seed out after debugging string consoleTitle = $"D$ DungeonZ Level {_mapLevel} - Seed {seed}"; //setup systems SchedulingSystem = new SchedulingSystem(); CommandSystem = new CommandSystem(); MessageLog = new MessageLog(); Player = new Player(); // Dont change map width or height //Attempting to make 20 rooms that are between 5 and 13 cells for room size MapGenerator mapGenerator = new MapGenerator(_mapWidth, _mapHeight, 50, 5, 13, _mapLevel); DungeonMap = mapGenerator.CreateMap(); DungeonMap.UpdatePlayerFieldOfView(); // first numbers effect tile size _rootConsole = new RLRootConsole(fontFileName, _screenWidth, _screenHeight, 16, 16, 1.5f, consoleTitle); _mapConsole = new RLConsole(_mapWidth, _mapHeight); _messageConsole = new RLConsole(_messageWidth, _messageHeight); _statConsole = new RLConsole(_statWidth, _statHeight); _inventoryConsole = new RLConsole(_inventoryWidth, _inventoryHeight); //these console methods have to be run before the update and render below _mapConsole.SetBackColor(0, 0, _mapWidth, _mapHeight, Colors.FloorBackground); _mapConsole.Print(1, 1, "Map", Colors.TextHeading); // Create a new MessageLog and print the random seed used to generate the level MessageLog.Add($"{Player.Name} arrives on level 1"); MessageLog.Add($"Level created with seed '{seed}'"); // Remove these lines: _messageConsole.SetBackColor(0, 0, _messageWidth, _messageHeight, Swatch.DbDeepWater); _messageConsole.Print(1, 1, "Messages", Colors.TextHeading); _inventoryConsole.SetBackColor(0, 0, _inventoryWidth, _inventoryHeight, Swatch.DbWood); _inventoryConsole.Print(1, 1, "Inventory", Colors.TextHeading); // have to register events for RLNet for update and render _rootConsole.Update += OnRootConsoleUpdate; _rootConsole.Render += OnRootConsoleRender; _rootConsole.Run(); }
public static void Main () { RLSettings setup = new RLSettings (); setup.Scale = 1f; setup.BitmapFile = "dsc8x12.png"; setup.CharWidth = 8; setup.CharHeight = 12; setup.Width = 120; setup.Height = 60; setup.Title = "coffee"; game = new RLRootConsole (setup); new Engine (game); game.Run (); }
static void Main(string[] args) { MainConsole = new RLRootConsole("terminal8x8.png", mainConsoleSize.Size.X, mainConsoleSize.Size.Y, 8, 8, 1, "Roguelike"); currentState = new MainMenu(); Init(); MainConsole.Update += OnRootConsoleUpdate; MainConsole.Render += OnRootConsoleRender; MainConsole.Run(); }