openfodder icon indicating copy to clipboard operation
openfodder copied to clipboard

SVGA mode?

Open daninthemix opened this issue 6 years ago • 11 comments

Was just wondering if it would be possible to increase the rendering resolution to 640x480, and just show more of the map?

daninthemix avatar Apr 22 '19 14:04 daninthemix

Hey @daninthemix

We recently added the CLI parameters --columns and --rows which allow you to customize how much is visible in the window.

This feature is really meant for use with the random map generator, but it does work fine for all the original campaigns too

eg. original engine uses 22x16 tiles (Amiga), so we can just double that to 44x32 (you may want to play with window-scale depending on your monitor resolution)

OpenFodder.exe --columns 44 --rows 32 --window --window-scale 2 --campaign "Cannon Fodder" --mission 2 --phase 2

image

You may notice graphical glitches when using this setting on maps smaller than the window though, but they should still play fine

segrax avatar Apr 22 '19 18:04 segrax

Amazing! Going to give this a try. Thanks

daninthemix avatar Apr 22 '19 21:04 daninthemix

Just wondering where I can get the latest build from, that includes all of these additions?

Thanks

daninthemix avatar Apr 27 '19 10:04 daninthemix

You can grab the latest build from https://s3.amazonaws.com/openfodder-builds/OpenFodder-Release-latest.zip

should just copy straight over the existing install

segrax avatar Apr 27 '19 19:04 segrax

Thanks. So this is what I get on the first level of Cannon Fodder 1 with --columns 44 --rows 32.

daninthemix avatar Apr 27 '19 22:04 daninthemix

Yeah, currently we haven't decided how to handle maps which are smaller than the window size, it should still play fine tho -- in the top left portion

segrax avatar Apr 28 '19 00:04 segrax

We've got some features coming soon for random maps generated via the new scripting engine which works well with the adjustable tile count,

image

segrax avatar Apr 28 '19 00:04 segrax

Very cool.

Well if possible I would suggest either 1) dynamically adjust the rows / columns if the number entered is greater than the map total or 2) just show one instance of the map, with any excess rows / columns showing as black.

One other thing I noticed about this is it does causes glitches on the level intros, but that's a minor point.

daninthemix avatar Apr 28 '19 05:04 daninthemix

Where's this feature been all my life? Always hated the sluggish/inconsistent screen scrolling; I might actually be able to beat Cannon Fodder 2 now without casualties. It looks fantastic - totally breaks the balance of the game - but I can get revenge after all these years on the all-seeing rocket soldiers! >) https://drive.google.com/file/d/1V0AVtjac7ll6ExtBw--TP3R_Tzv6RFy1/view?usp=sharing

I'm guessing there's no limit whatsoever on the distance of rocket projectiles? I don't suppose they thought we'd be using 1080p/4K monitors in 1993 =D As far as I can see you either:

  • Scale the enemies viewing/aggro distance, rocket projectile distance, etc or
  • Draw the whole map with dynamic rows & columns but somehow restrict the players view to 320x200 window/viewpoint (fog of war?) or
  • Leave as is. Much of the challenge was in not seeing what was ahead.

This is clearly why Blizzard capped the resolution on Diablo 2 to 800x600 for all these years; is there really any kind of fix for this?
On a more serious note whatever you choose to do - you should probably respect the original aspect ratio of the picture and the framerate (50i/50hz for PAL)

p.s. silly me assuming the CF2 disks are protected by SOS.

andrew-mcmahon avatar Oct 18 '19 21:10 andrew-mcmahon

  1. just show one instance of the map, with any excess rows / columns showing as black.

This is probably the easiest solution, but unfortunately also not as simple as it seems

I'm guessing there's no limit whatsoever on the distance of rocket projectiles?

Correct, there is only a couple of places in which the engine checks distances, but its mostly around hostages finding tents or human soldiers to follow.

This is clearly why Blizzard capped the resolution on Diablo 2 to 800x600 for all these years; is there really any kind of fix for this?

There was an unofficial patch for that years ago, but it really changes the game.

respect the original aspect ratio of the picture and the frame-rate (50i/50hz for PAL)

Frame-rate shouldn't change and by default the aspect ratio is respected... but I'm reluctant to put restrictions on the dynamic mode, those values are designed to be user select-able (some people don't care about aspect ratio).

Perhaps dynamic rows/columns should be restricted to random map mode, so it wont affect the original campaigns, but in saying that... some of the cheats which can be enabled also are not original. That decision comes with its own problems though, mainly around the campaign selection screen (we've deliberately tried to avoid situations where the window has to be resized at run-time, and right now it only happens when you switch between Amiga/PC)

unfortunately these things are never easy and it also ties back into the first point in this comment around the original engine logic and distances, the max-sprite logic is similar... allowing that value to be changed has consequences which scale up as more sprites enter the map.

for example, the original when checking nearby sprites, only checks 1 sprite per engine cycle, so if you have 1000 sprites on the map (original max is 45), it takes 1000 engine cycles to check all the sprites... this has a noticeable effect on soldier behavior, in that you can just walk past them and they don't react until 1000+ cycles have occurred, giving you enough time to get far enough away they never "lock on".

We have semi fixed this when a non-default value is used, but it means the behavior is slightly different to the original (it skips over sprites which are unused until it finds a valid one) - of course, if you have 1000 sprites on the map, it will still be slow in re-acting to nearby sprites as it has to check all 1000

segrax avatar Oct 19 '19 00:10 segrax

After some time, my opinion about game enhancements isn't changed: we can upgrade a bit the graphical core, but we can't overdo it too much, we must remind it's a core more than 25 years old! The opportunity is to obtain new levels and bigger maps, but still not exceed too much the original cap limits, because of @segrax explained.

We meet same problems when you try to create a new Dune II map into scenario.ini pak, where you put more than 100 units and buildings into one map only.... even into opendune where you can exceed the int16 limits, graph core will result very slow to run and slowed run cycles will alter original game behaviour and reactivity of course.

So the final meditation about all this is: "with great powers comes great responsibility" ;o)

drnovice avatar Oct 21 '19 12:10 drnovice