Commander of Nod's northern forces, programmer, reverse-engineer, game designer and a 東方 lunatic who enjoys swimming in the cherry blossom -colored sea. Original creator of the CnCNet client that is used by almost every active Tiberian Sun and Red Alert 2 mod. Co-leader of @[Dawn of the Tiberium Age](mods:the-dawn-of-the-tiberium-age:10865) and the author of various Tiberian Sun game engine improvements. Ex-staff of @[Twisted Insurrection](mods:twisted-insurrection:10974). Enjoys all cute things and large groups of enemy units to wipe out.

Report RSS [Tutorial] Sharp-scaling DTA and other client-based games with CnC-DDRAW

Posted by on

The classic Command & Conquer games were developed with resolutions common in the 90s in mind, like 800x600. With larger modern displays the games still feel reasonable to play at somewhat higher resolutions, but going too high like 1080p, 1440p and especially 4K makes the games play badly. Many details get too small to notice, infantry might get too small to be properly seen on the battlefield, micromanagement gets tedious due to small units and the sidebar UI gets too small in the overall game viewport to be quickly used in the middle of combat.

A common way to solve this issue is to play the game at a lower resolution. But while it works, it makes the games look blurry if done with typical scaling methods. Luckily, the CnC-DDRAW renderer, nowadays mostly developed by FunkyFr3sh, gives a solution to this. By sharp-scaling the game window to your native resolution you can keep the games crisp while still using a game resolution that fits the games' design. The downside is that this requires you to use an in-game resolution that is an exact multiplication of your native display resolution.

Most common examples:

  • with a 2560x1440 monitor you'll have to use an in-game resolution of 1280x720 for a 2x scaling factor
  • with a 3840x2160 (aka 4K) monitor you can also use a 1280x720 in-game resolution for a 3x scaling factor
  • with a 1920x1080 (aka 1080p) monitor you can use 960x540 for a 2x scaling factor, although this might be too small to comfortably enjoy mods with large maps like Dawn of the Tiberium Age or Twisted Insurrection (and it's most likely even worse for Yuri's Revenge mods as the RA2 engine forces bigger cells and so, also bigger graphics)

I personally have a display with a native resolution of 2560x1440, so I use an in-game resolution of 1280x720 and have it 2x upscaled. I'll use my setup as an example in this tutorial.

Step 1: Select your preferred in-game resolution in the client options menu

As I'll be using 1280x720 scaled to 2560x1440, I'll select 1280x720 as my in-game resolution.

Resolution selection


Step 2: Select CnC-DDRAW as the Renderer

cnc ddraw


While still in the options menu, make sure that you've selected CnC-DDRAW as your renderer. Afterwards, press Save on the client options menu and exit the client.

Step 3: Edit ddraw.ini in your game directory

Open your game directory and look for a file called ddraw.ini. (depending on Windows settings, the .ini file extension might not show up for you; in that case, look for a configuration file called simply "ddraw". Do not open the ddraw.dll dynamic link library file though)

While there
1) change the width= and height= keys under the [ddraw] section to your native display resolution.
2) look for a key called d3d9linear= and set its value to 'false'. If the key doesn't exist, simply add it as d3d9linear=false
3) set the value boxing= to true
4) EDIT!! Latest cnc-ddraw version also needs d3d9_filter=0

So if the section originally looked like this:

[ddraw]
width=1280
height=720
.... <some other keys here>
boxing=false
.... <a lot of other keys here>
d3d9_filter=2

I'll change it to look like this instead:

[ddraw]
width=2560
height=1440
.... <some other keys here>
boxing=true
.... <a lot of other keys here>
d3d9linear=false
d3d9_filter=0

Also check that there's no section called [game] at the end of the ddraw.ini file. If there is, delete it!

Save your modified ddraw.ini file.

Next time you launch the game, you should be enjoying a sharp-looking game with a reasonable viewport.


Comparison shots:

Original 1280x720 (aka 720p) image (view original):

720p

Sharp-scaled to 2560x1440 (aka 1440p) (view original):

1440p


Post comment Comments
Mynameislol
Mynameislol - - 117 comments

While this works great ingame, the menus are being put into the top left corner of the screen.

Reply Good karma Bad karma+1 vote
Rampastring Author
Rampastring - - 1,190 comments

That's a limitation of CnC-DDRAW. The menus use a very old technology known as Graphics Device Interface (GDI) that's hard to scale, so the renderer doesn't scale them at all.

Reply Good karma+1 vote
Mynameislol
Mynameislol - - 117 comments

The resolution scaling also distorts the edges with this method, i think we're going to need a new renderer if we want this without comprimises

Reply Good karma Bad karma+1 vote
Rampastring Author
Rampastring - - 1,190 comments

What do you mean with distorting the edges? I haven't noticed anything like that.

Reply Good karma+1 vote
Guest
Guest - - 689,988 comments

im not sure if this is the cause of the black borders around the game. My monitors native resolution is 1920 x 1080. Based on your guide above, i should be adjusting it to 960x540 for a 2x scaling factor. However, i dont see that option listed in the TS options menu from the 6.0 client. Is there a way to manually configure the in-game resolution to be 960x540?

Reply Good karma Bad karma+1 vote
Rampastring Author
Rampastring - - 1,190 comments

You might need to add 960x540 as a custom resolution through your GPU driver control panel.

Reply Good karma+1 vote
Guest
Guest - - 689,988 comments

i think what he means is that instead of the game being Full Screen, there are Black borders around the game. i tried the method above and experienced better quality on 1920 x 1080p monitor, but the game is shrunk to the middle of my screen, and around the edge of the game are just black borders. Not sure if there is a work around for that. Essentially, i get much better quality but i dont get to enjoy Full Screen mode

Reply Good karma Bad karma+1 vote
Rampastring Author
Rampastring - - 1,190 comments

If you get black borders, you are using an in-game resolution that could be sharply upscaled to 1920x1080.

You can probably set boxing=no to eliminate the black borders, but it won't make a difference for quality.

Reply Good karma+1 vote
zproxy
zproxy - - 108 comments

dosbox has 2x 3x scalers. tibsun needs it too. to scale up the sidebar and the rest.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: