Skip to content

Adventure (campaign) save feature implementation#4

Open
hfukumori wants to merge 3 commits into
blendogames:masterfrom
hfukumori:save-campaign
Open

Adventure (campaign) save feature implementation#4
hfukumori wants to merge 3 commits into
blendogames:masterfrom
hfukumori:save-campaign

Conversation

@hfukumori
Copy link
Copy Markdown

This is my attempt to implement adventure (campaign save) feature.

Build Environment

The project was built with Microsoft Visual Studio Community 2022 using .NET Framework 4.8.

Testing

The executable was tested on Steam. I could finish several (non-hardcore mode) campaigns with this version, and currently I'm checking campaigns with hardcore mode.

Modification of Project Files

I tried to avoid modifying project files (.csproj) and auto-generated resource files in C# (*.Designer.cs) as best as possible, but some changes coming from the difference in the build environment versions has gotten into the changeset, sorry.

Additional Changes

A .gitignore file was added to the repository. I'd like you to check the content is appropriate for the development in the future.

Let me know if further adjustments or clarifications are needed!

* Save campaign

* Add planetsVisited to PlayerCommander* classes

* Fix restoration of special items

* Refactor

* (Re)introduce hardmode restoration
@flibitijibibo
Copy link
Copy Markdown
Contributor

Huh, this is a nice surprise! At first glance the changes look okay too; I just have a couple questions:

  • Are we able to target .NET 4.7.x? 4.8 breaks ABI so it's hard to maintain updates with that (at that point we'd probably just move to .NET 8, which is probably overkill)
  • Does this work with FNA 25.04 and SDL3? I really should change the SDL2 define, that's on me 😅

@hfukumori
Copy link
Copy Markdown
Author

hfukumori commented Apr 15, 2025

Hi, thanks for comments, I'll answer the questions as best as I can:

  • Are we able to target .NET 4.7.x? 4.8 breaks ABI so it's hard to maintain updates with that (at that point we'd probably just move to .NET 8, which is probably overkill)

I could change the target framework to .NET 4.7.2 (reflected in ee3dedd ) and build the executable. The new executable (Flotilla.exe) worked without a problem.

  • Does this work with FNA 25.04 and SDL3? I really should change the SDL2 define, that's on me 😅

I tried building the whole project with FNA master branch and 25.04 tag, and the build was successful for both cases.
However, replacing the FNA.dll (along with Flotilla.exe) resulted in the error in startup (which was expected) so I have no conclusive answer.
fna_dll_error

For now, migration from SDL2 to SDL3 is beyond my knowledge (and the scope of this Pull Request), so I'm going to leave it to you :)

I downloaded the FNA daily build binary from https://github.com/FNA-XNA/fnalibs-dailies/actions/runs/14425285573 and replaced dlls with them, then I could run Flottila.exe without a problem. Looks like it's working (may have to take time to be sure, though).

Cheers,

@flibitijibibo
Copy link
Copy Markdown
Contributor

That all looks right to me, the old exe probably needs new fnalibs to work correctly.

Will review hopefully this week, thanks!

@hfukumori
Copy link
Copy Markdown
Author

Update: successfully finished a few adventures in hardcore mode. Found out a few additional properties to correctly calculate final score and to enable smite across the saves.
They were fixed in 8539be5.

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.

2 participants