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

Addtional Map with New Content #424

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

Conversation

TrinketKite
Copy link

@TrinketKite TrinketKite commented Feb 6, 2025

As discussed in #423, this is a pull request for discussion of content which should be added. Any suggestion is appreciated. Below is a list of suggestion I think should be added. This may expand or change.

A new map is created for this - assets/maps/level2.tmx. Original map will remain same and additional content will be created in level2.tmx.

Current Roadmap

  • A new game start level (just played once) - Before reaching the main map, player should feel welcomed
    • Give player ability to stand on platforms
  • Starting hub with:
    • Cool logo for AAAAXY 2
    • 4 pathways to other levels (Yet to be decided)
    • A hidden secret
  • Maze/Escape level - Find a way out of confusing space
  • Add more Gravity Switching Level (This part seems short)

How to Test

Copy this fork repo and follow build instructions:

git clone https://github.com/TrinketKite/aaaaxy.git
cd aaaaxy
git submodule update --init --remote
make

Now before running the ./aaaaxy you need to run make assets-update-all mainly to generate the checkpoints map of all *.tmx maps as it is required by the game.

make assets-update-all

Tip: This is a long process so if you want, you can execute sh scripts/generate-checkpoints-only.sh (created only for this fork repo) to only generate the checkpoints map if its changed. But it is recommended to run make assets-update-all atleast once. This will be script will be removed once this repo becomes available for merging.

sh scripts/generate-checkpoints-only.sh

To test the map, type ./aaaaxy -cheat_level <tmx> where <tmx> is replaced with the name of level file you want without the .tmx extension. Level file must be located in assets/maps/*.tmx to be used.

This new map is written in level2, so run ./aaaaxy -cheat_level level2 to test. Remember! There is no save game when testing, you need to manually move your Player object in the Tiled application, save and then run to test different areas.

./aaaaxy -cheat_level level2

@divVerent
Copy link
Owner

To be clear, making changes to the existing map will likely break existing runs (which is checked by automated tests) and probably requires a new major version. The gravity flipping section is kinda fair game though, as changes to secrets are "allowed' without considered breaking (see https://github.com/divVerent/aaaaxy/blob/main/RELEASING.md#versioning).

Some changes will need the checkpoint map to be recomputed, which technically breaks runs, but I assume time spent in the UI is minimal, so I would think that is OK in a minor version update as well.

However, once the changes are significant enough, I will do the work to allow this to be an additional, "experimental" map to choose from in the game.

@TrinketKite
Copy link
Author

TrinketKite commented Feb 7, 2025

From my understanding, if I change the existing map, I will need a major version as it may break speedruns.

So should I really be changing the existing map? My goal simply was to add more to the existing map without changing the already created map. But this may have an impact on 100% speedruns.

Therefore, I think that creating another map in the same level.tmx as an addon content would be a better idea, meaning the existing map will remain same but players can select this optional map (through some UI maybe).

Any suggestion in my approach?

Edit: My english :p

@divVerent
Copy link
Owner

From my understanding, if I change the existing map, I will need a major version as it may break speedruns.

So should I really be changing the existing map? My goal simply was to add more to the existing map without changing the already created map. But this may have an impact on 100% speedruns.

Therefore, I think that creating another map in the same level.tmx which will be as an addon content would be a better idea, meaning the existing map will remain same but players can select this optional map (through some UI maybe).

Any suggestion in my approach?

I'd prefer it being a separate level.tmx file, so these can later also be packed independently. I will add a selector UI for that.

Thank you!

@TrinketKite
Copy link
Author

Alright I will change the "Extend gravity flipping section" as "Add more gravity flipping section as a secret level".

I will name the new file as level2.tmx (very creative :p) and try to see how to test it in the game.

I will be committing to the repo whenever I think that good, small but well defined progress has been made. I will definitely clarify any doubts and take any advice.

It may take a long time for me to make a commit as Github is my hobby and not my full time. Thanks!

@TrinketKite
Copy link
Author

TrinketKite commented Feb 8, 2025

QUERY 1

Instead of going to the new map through UI, should we try to integrate it directly into the existing map as a secret? Like the screenshot below (sorry, should have written "To New Map", instead of "Addon Content"). Checkpoint - In The Beginning

AAAAXY

Of course this will no way affect the original map runs and players can switch between maps after this map has been discovered. But we need a way to find how to combine level.tmx and level2.tmx together which may prove hard.

A consequence of this will be that any activated power ups from original map will remain in the new map and players will treat it like a optional extension of the original map. Not much of a concern but if you might want a completely different map with completely different progression then doing like this may not be the idea.

So what should be the decision, start new map through UI or a secret path in original map? I am asking to help me make the starting section of the new map accordingly.

divVerent added a commit that referenced this pull request Feb 9, 2025
Helps with #424 by allowing an alternate level tmx file by `-cheat_level=foo`.
@divVerent
Copy link
Owner

I find this interesting, however I definitely don't think they can be connected seamlessly in the current design of the game logic.

For now I'd suggest you consider them separate files, and I think I should find time later to add a command line flag to load a different .tmx file as a start for this.

In the end, though, I can totally imagine using e.g. a "teleporter" added to the main map to jump to addon content, instead of a menu. There are definitely a few places where this could be safely added.

@TrinketKite
Copy link
Author

TrinketKite commented Feb 9, 2025

Alright thanks! For now I will continue making the level2.tmx as a separate with completely different progression, meaning the power ups need to be re-activated after entering this new map. Save file also needs to be created separately.

@TrinketKite TrinketKite changed the title Addtional Content to Existing Map Addtional Map with New Content Feb 9, 2025
@TrinketKite
Copy link
Author

TrinketKite commented Feb 10, 2025

Problem 1

When running ./aaaaxy -cheat_level level2, the game throws an error stating it couldn't load the checkpoints map level2.cp.json. I am not able test it because of it. README.md says to run make assets-update to update checkpoint map if changed but it hasn't worked and no level2.cp.json is created. I believe it only does for level.tmx.

Log:

[FATAL] could not initialize game: precaching engine: loading level: loading checkpoints: could not load checkpoint locations for "level2": could not open /generated/level2.cp.json: open generated/level2.cp.json: no such file or directory

I will anyway look for a solution for this. But it is recommended that you make a commit in your repo to fix this permanently.

@TrinketKite
Copy link
Author

TrinketKite commented Feb 10, 2025

Side-note - Ignore this, unrelated

I have accidentally hidden my comments without knowing that these cannot be viewed without being signed in to Github. If the maintainer can unhide my comments then I request to do so as I cannot do it myself. I will no longer hide comments in future.

Well now I am able to unhide for some reason

@divVerent
Copy link
Owner

Problem 1

When running ./aaaaxy -cheat_level level2, the game throws an error stating it couldn't load the checkpoints map level2.cp.json. I am not able test it because of it. README.md says to run make assets-update to update checkpoint map if changed but it hasn't worked and no level2.cp.json is created. I believe it only does for level.tmx.

Log:

[FATAL] could not initialize game: precaching engine: loading level: loading checkpoints: could not load checkpoint locations for "level2": could not open /generated/level2.cp.json: open generated/level2.cp.json: no such file or directory

I will anyway look for a solution for this. But it is recommended that you make a commit in your repo to fix this permanently.

I figured this out: you need to compile the game using:

env AAAAXY_GENERATE_ASSETS=true AAAAXY_GENERATE_CHECKPOINT_LOCATIONS=true make

This is seldomly needed, and disabled by default as the checkpoint locations depend on the exact version of the graphviz package and even platform it runs on (damn floating point), so I couldn't get reproducible builds with that enabled.

@TrinketKite
Copy link
Author

TrinketKite commented Feb 11, 2025

After inspecting the build scripts and Makefile, make assets-update-all already does include the AAAAXY_GENERATE_CHECKPOINT_LOCATIONS environment variable. So I ran both, first make and then your command you provided. None of them worked.

I can not believe that I was wasting time troubleshooting when the real problem was that in scripts/build-generated-assets.sh in line 28, there is a typo in the name of the variable as LOCAITONS. So changed it back.

line 28
- if [ x"$AAAAXY_GENERATE_CHECKPOINT_LOCAITONS" = x'true' ]; then
+ if [ x"$AAAAXY_GENERATE_CHECKPOINT_LOCATIONS" = x'true' ]; then

Further I had to change line 37 to take lname variable

line 37
- neato -Tjson assets/generated/level.cp.dot > assets/generated/level.cp.json
+ neato -Tjson assets/generated/$lname.cp.dot > assets/generated/$lname.cp.json

So level2.cp.json now gets generated. But now a checkpoint locations hash error comes claiming it doesn't match. I copied the hash in the error to level2.tmx map custom properties in Tiled application as it was done in level.tmx and now the error doesn't show anymore. save_game_version is also required in map custom properties which I gave as 1.

Now I am able to play whatever I create in level2. I suggest making a commit in your repo to fix this.

@divVerent
Copy link
Owner

Sounds good so far! As you are working on a new map, I am considering implementing a new engine feature: slopes.

Interested?

@TrinketKite
Copy link
Author

Yep! I think it would be a cool feature. I will mention #428 here.

Sorry for late response, been busy.

@TrinketKite
Copy link
Author

Just a note here, I changed my username and my gpg sign key to be more public. Formerly known as HashingPath

@divVerent
Copy link
Owner

Sounds good!

I now have played the game through after my code changes for slopes - I will soon release a version with that feature set, which will then also allow you to use the feature.

@TrinketKite
Copy link
Author

Very cool! Look forward to it

@divVerent
Copy link
Owner

Filed #436 for the work to support multiple "worlds".

@TrinketKite
Copy link
Author

Query 2

Should I start a new discussion in this repository? I have some questions regarding the progression of the new map and some new features if possible. So I would like to start a discussion rather than discussing all here.

@divVerent
Copy link
Owner

Sounds good, feel free to start a discussion under "Discussions" - makes more sense there than on this PR anyway.

@TrinketKite
Copy link
Author

I will create a discussion soon.

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