Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old May 4, 2020, 15:32   #1
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 174
Dean Anderson is on a distinguished road
Cthangband 7.0 Changes

So, after releasing 6.4 as a bugfix version, I've started work on Cthangband 7.0.

The intent is that this will be a very big change.

The first big thing is that I'm putting graphics back in. Last time I tried this, I gave up and reverted the game back to its previous version because I didn't like the results. That was because I tried to do too much. What I did then - and it worked - was to take off the UI and make the graphics fill the screen, and put in a mouse interface with a drag-and-drop inventory and the like.

The problem was that it fell between two stools. It wasn't professional-enough looking to stand against other games of that type, and the interface didn't feel like Angband.

This time, though, I'm introducing graphics in a more classic manner, in that the main interface will remain text-based and it's just the overhead view that will be graphical.

To do this (remember, Cthangband is in C# rather than C) I've written my own "MonoRogue" library that uses MonoGame. The good thing with using MonoGame is that I can get good enough performance out of it.

The way I'm doing it is I'm using 32x32 tiles (the David Gervais set) for both graphics and text - I've created a bitmap font for it - and because of the 6.2 change to screen resolution I have an 80x45 display of square tiles that fits perfectly with the 16:9 aspect ratio of most widescreen monitors.

What I do is have a number of layers which I can turn on and off. The simplest type of layer is a "Background" layer, which simply contains a single image, and the most complex are the "Tile" layers that contain 80x45 tiles, each of which is taken from a tilemap and drawn with its own tint and a "Text" layer that contains swappable screens of 80x45 characters taken from the bitmap font and drawn with their own tint.

For Cthangband, I have a set of background layers for the different backgrounds (menu, game, map/journal/character, game-over screen, winner screen, and so forth) of which I only ever have one switched on; and then five tile layers (floor, feature, object, monster, sfx); and then a text layer on top.

Every layer has its own in-memory texture to which it draws that is 2560x1440 in size - the exact size to hold eighty by forty five 32x32 tiles or glyphs at 1:1 size. I only need to redraw to one of these textures when the contents of the specific layer changes. When I need a screen redraw, I draw each of the pre-drawn layer textures in turn onto a 2560x1440 buffer - again at a 1:1 scale - and then when I'm finished I draw that fixed-scale buffer onto the screen or window. It is only with this last draw that any scaling is done, so I never get any artifacting or visible tile borders like I would if I tried to scale the individual tiles as I drew them.

This system also means that I can colour or shade each cell of each layer independently to indicate light levels/colours or similar so that I don't need to have separate tiles for different light levels and I can do things like displaying the floor tile in a dim colour due to low light while drawing a monster seen by ESP at full brightness, or draw any tile with a subtle yellow tint for torchlight rather than just having select tiles drawn in bright yellow instead of their normal colour.

The library is finished and working, although I'm still wiring it up to the game it at the moment, but so far it's looking pretty good. On my 1920x1080 reolution screen the tiles are all being reduced from 32x32 to 24x24 but you don't notice the loss of resolution because the whole screen is being anti-aliased by the graphics card as it does it.
Dean Anderson is offline   Reply With Quote
Old September 8, 2021, 17:33   #2
iggy_hunter
Rookie
 
Join Date: Sep 2021
Posts: 1
iggy_hunter is on a distinguished road
Source Code

Is there a repository for the source code for the latest C# version for continued development?
iggy_hunter is offline   Reply With Quote
Old September 11, 2021, 15:52   #3
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 174
Dean Anderson is on a distinguished road
Quote:
Originally Posted by iggy_hunter View Post
Is there a repository for the source code for the latest C# version for continued development?
Yes. It's on my hard drive and my back-up devices, and continued development is happening.

By the way, the post you responded to is quite out of date. Since making that post I've released Cthangband 6.5, which doesn't include the changes mentioned in my post above because again I wasn't happy with the results so reverted them again.

Currrently I'm playing Cthangband 6.6, but I've not released that version yet - it's still a development version.
Dean Anderson is offline   Reply With Quote
Old September 27, 2021, 05:40   #4
alaras12
Rookie
 
Join Date: Sep 2021
Posts: 2
alaras12 is on a distinguished road
Was one of those changes to 6.5 the elimination of the options menu? I couldn't find it anywhere after installing!
alaras12 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cthangband Crash karat Variants 9 April 28, 2020 12:11
[Announce] Cthangband 6.2.0 Release Dean Anderson Variants 35 March 16, 2020 17:10
Cthangband 6.1 Release Dean Anderson Variants 8 September 3, 2019 03:03
[Announce] Cthangband 5.0.0 Released Dean Anderson Variants 67 March 31, 2016 14:16
[Cthangband] Who (if anyone) is currently maintaining it? Dean Anderson Variants 4 March 27, 2015 15:50


All times are GMT +1. The time now is 20:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.