Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update engine to playtest 20201213 #764

Conversation

kienanstewart
Copy link

@kienanstewart kienanstewart commented Jan 26, 2021

Hi,

there are few issues (eg. #709 and #702) that require engine updates to work properly. Given that there was a new playtest engine cut recently I figured I would try to see if I could do some of the work required.

It's not done yet - I have the code compiling, but not the game starting with content yet.

If y'all prefer not having WIP PR's, we can close this until I have something more tangible.

thanks,

TODO:

@kienanstewart
Copy link
Author

kienanstewart commented Jan 27, 2021

A few things that I've yet to fix:

  • Vehicle turn (and turret turn) speeds are very slow. Probably related to switching to WAngle
  • Transports don't show capacity pips
  • Minimap rendering wrong
  • Vehicle placement when deploying from war factory and refinery seems off
  • Harvesters dock backwards to the refineries
  • Crash when Blackhawk attacks:
    Exception of type System.InvalidOperationException: Unit shad does not have a sequence named muzzle
  • Wrench icon when repairing buildings is offset and doesn't appear above the building itself
  • Crash when destroyed attack submarine with osprey

@abcdefg30
Copy link
Member

We'll also need to add the upstream ModSDK changes once they are merged.

@kienanstewart
Copy link
Author

@abcdefg30 could you elaborate a bit on the modsdk changes that are expected? thanks for bringing up that there is something to look out for

@pgwipeout
Copy link

pgwipeout commented Jan 30, 2021

Either I'm doing something wrong, or something is squirrely here.
I can't get this to run as is.

launch-game.cmd
Required engine files not found.
Run `make all` in the mod directory to fetch and build the required files, then try again.
Press any key to continue . . .

It seems OpenRA.Game.exe is not built by the engine anymore.
Running the base game from the engine folder works fine.

EDIT:
I see, you are running only on Linux.

Copy link

@pgwipeout pgwipeout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows the game to start on Windows, but crashes due to the missing glyphs.png required for fractional scaling.

Exception of type `System.IO.FileNotFoundException\`: File not found: glyphs.png
  at OpenRA.FileSystem.FileSystem.Open(String filename) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\FileSystem\FileSystem.cs:line 206
   at OpenRA.Graphics.ChromeProvider.SheetForCollection(Collection c) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Graphics\ChromeProvider.cs:line 133
   at OpenRA.Graphics.ChromeProvider.GetImage(String collectionName, String imageName) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Graphics\ChromeProvider.cs:line 168
   at OpenRA.Mods.Common.Widgets.DropDownButtonWidget.Draw() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Mods.Common\Widgets\DropDownButtonWidget.cs:line 56
   at OpenRA.Widgets.Widget.DrawOuter() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Widgets\Widget.cs:line 453
   at OpenRA.Widgets.Widget.DrawOuter() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Widgets\Widget.cs:line 453
   at OpenRA.Widgets.Widget.DrawOuter() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Widgets\Widget.cs:line 453
   at OpenRA.Widgets.Widget.DrawOuter() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Widgets\Widget.cs:line 453
   at OpenRA.Game.RenderTick() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Game.cs:line 703
   at OpenRA.Game.Loop() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Game.cs:line 834
   at OpenRA.Game.Run() in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Game.cs:line 852
   at OpenRA.Game.InitializeAndRun(String[] args) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\Game.cs:line 270
   at OpenRA.Launcher.Program.Main(String[] args) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Launcher\Program.cs:line 26

I copied chrome.png to glyphs.png and it fixed this issue, but you'll need the original designer to export the 2x and 3x files.
make test also crashes instantly with the following error:

Unhandled Exception: System.IO.FileNotFoundException: File not found: ^EngineDir|./mods/common
   at OpenRA.FileSystem.FileSystem.Open(String filename) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\FileSystem\FileSystem.cs:line 206
   at OpenRA.FileSystem.FileSystem.OpenPackage(String filename) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\FileSystem\FileSystem.cs:line 81
   at OpenRA.FileSystem.FileSystem.Mount(String name, String explicitName) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\FileSystem\FileSystem.cs:line 115
   at OpenRA.FileSystem.FileSystem.LoadFromManifest(Manifest manifest) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\FileSystem\FileSystem.cs:line 191
   at OpenRA.ModData..ctor(Manifest mod, InstalledMods mods, Boolean useLoadScreen) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Game\ModData.cs:line 60
   at OpenRA.Program.Main(String[] args) in C:\Users\pgwip\openra\ra2\engine\OpenRA.Utility\Program.cs:line 79

launch-game.cmd Outdated
@@ -5,18 +5,18 @@ title OpenRA
FOR /F "tokens=1,2 delims==" %%A IN (mod.config) DO (set %%A=%%B)
if exist user.config (FOR /F "tokens=1,2 delims==" %%A IN (user.config) DO (set %%A=%%B))
set TEMPLATE_LAUNCHER=%0
set MOD_SEARCH_PATHS=%~dp0mods,./mods
set MOD_SEARCH_PATHS=%~dp0mods,../mods

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the OpenRA SDK this should stay as it was.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied glyphs.png from RA and it seems to work "ok" in that I see the flags and such that I expect. Copying chrome.png I saw pieces of the ui bars instead of flags.

Do you know where glyphs.png should come from normally?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenRA/OpenRA@1282650
This is the commit that introduced them in the engine.
I believe they are modified and split up versions of the original.

Interesting though, I don't see any artifacts using them on Windows.
Might be also why it didn't cause issues on linux.

launch-game.cmd Outdated

if "!MOD_ID!" == "" goto badconfig
if "!ENGINE_VERSION!" == "" goto badconfig
if "!ENGINE_DIRECTORY!" == "" goto badconfig

set TEMPLATE_DIR=%CD%
if not exist %ENGINE_DIRECTORY%\OpenRA.Game.exe goto noengine
if not exist %ENGINE_DIRECTORY%\bin\OpenRA.Game.exe goto noengine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be: if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine

launch-game.cmd Outdated
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
cd %ENGINE_DIRECTORY%

OpenRA.Game.exe Game.Mod=%MOD_ID% Engine.LaunchPath="%TEMPLATE_LAUNCHER%" "Engine.ModSearchPaths=%MOD_SEARCH_PATHS%" "%*"
bin\OpenRA.Game.exe Game.Mod=%MOD_ID% Engine.LaunchPath="%TEMPLATE_LAUNCHER%" "Engine.ModSearchPaths=%MOD_SEARCH_PATHS%" "%*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be: bin\OpenRA.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Engine.LaunchPath="%TEMPLATE_LAUNCHER%" "Engine.ModSearchPaths=%MOD_SEARCH_PATHS%" "%*"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the feedback on the launcher. I wasn't aware of the https://github.com/OpenRA/OpenRAModSDK project. I will merge the changes there since the tag 20200503 (with the exception of the last commit for the playtest that came out the other day). That should hopefully solve all of these more systematically than what I was doing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem, I'll continue to track this and test on Windows.
I've been looking to get into helping with this project, and your work has been the kick in the pants I needed.

@pgwipeout
Copy link

A few notes in my first run of the game.
Doggos are glitchy in attacks.
Missiles still fly way too slow.
Mirage Tanks are trees, but not stealthed.
I crashed the game when I tried to make a spy take the form of a rocketeer, because they can't fly.

@kienanstewart
Copy link
Author

A few notes in my first run of the game.
Doggos are glitchy in attacks.
Missiles still fly way too slow.
Mirage Tanks are trees, but not stealthed.
I crashed the game when I tried to make a spy take the form of a rocketeer, because they can't fly.

These seem to also be issues pre-engine upgrade, so changing the engine shouldn't address them? I don't see relevant open issues for any of them though.

@pgwipeout
Copy link

A few notes in my first run of the game.
Doggos are glitchy in attacks.
Missiles still fly way too slow.
Mirage Tanks are trees, but not stealthed.
I crashed the game when I tried to make a spy take the form of a rocketeer, because they can't fly.

These seem to also be issues pre-engine upgrade, so changing the engine shouldn't address them? I don't see relevant open issues for any of them though.

I've doubled missile default flight speed and it helps. Gotta check against vanilla and tune from here.
I thought they had fixed the dog attack, I'll have to go back and check.
I'm looking for a fix for the Spy issue, then I'll look into the mirage tanks.
I also noticed the Naval Yard (at least on Alliance side) is missing all of the shadow in the construction area.

@kienanstewart
Copy link
Author

I also noticed the Naval Yard (at least on Alliance side) is missing all of the shadow in the construction area.

The shadows look the same to me between pre-engine upgrade and post-engine upgrade. I think this might be a separate issue.

I've cleared out everything I noticed from the engine upgrade so I'll remove the 'WIP' tag so folks can look at it more. Note: during the ModSDK changes I removed the travis CI, I think the project needs to be reconfigured with the github actions instead. However, if desired I'll add back travis.yaml

@kienanstewart kienanstewart changed the title WIP: update engine to playtest 20201213 Update engine to playtest 20201213 Feb 2, 2021
@Mailaender
Copy link
Member

Putting configuration files in the .github folder is enough. Sadly we can't test it until this pull request is merged.

@LinuxDonald
Copy link

@MustaphaTR could you maybe merge it?

@@ -84,13 +84,13 @@ void ITick.Tick(Actor self)
for (var i = 0; i < delayedActions.Count; i++)
{
var x = delayedActions[i];
if (--x.First <= 0)
x.Second();
if ((x.Key - 1) <= 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like we never decrease the key at all?

@abcdefg30
Copy link
Member

Sorry, I don't think merging this as-is is a good idea. We should first update the ModSDK files only, and then in a second step update the mod to use the latest release.

@MustaphaTR
Copy link
Member

MustaphaTR commented Apr 4, 2021

We should first update the ModSDK files only, and then in a second step update the mod to use the latest release.

I don't think that is a good idea, changes to SDK are tied to the changes to the engine. Unless you mean it as 2 seperate commits in the same PR. Updating them without other, regardless of the order, would break stuff.

@Mailaender
Copy link
Member

What I do for @OpenHV is not to make huge jumps between releases, but change it in small weekly engine updates based on single commits. Even smaller steps for larger engine changes. This makes those undertakings a lot more digestible and less painful. Oftentimes you only need to go 10 commits ahead to power that latest engine feature/interface you are depending on. As a release on this mod is nowhere near in sight you can keep it on an "unstable" engine version and with @OpenRA's slow development process with huge veto powers those untagged commits can be sufficiently stable even for test releases.

@abcdefg30
Copy link
Member

Closing as superseded by #778. Thanks for the effort, though.

@abcdefg30 abcdefg30 closed this Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants