The game opens on a map picker #44

Open
agra wants to merge 1 commit from task/4201-map-picker into master
Owner

Tracker: #4201

Launching the app to host now opens a map picker listing first_map and test_scene. Choosing one hosts the game on that map and plays in it.

  • src/scene/maps.sx lists the maps. src/hud/map_picker.sx is the screen, its input and its layout.
  • --map <name> skips the picker on the app, and names the map on --join, hulken-server and the bots tool. With none, those three take the first map.
  • A joining app does not learn the host's map. One on the wrong map is refused and prints why, as a mismatched world file always was.
  • The host starts after the choice, so a port that does not bind is reported after the picker.

Checked: tools/gate.sh fast passes, 112 tests. In the running app the picker opens, the keyboard chooses a map and the test scene loads and plays. hulken-server --map test_scene serves a bot joined with the same --map, and refuses one on the first map. A real mouse click was not driven by the test run; the click path is covered by tests/map_picker.sx.

Head: fc7c41b3ba

Tracker: [#4201](https://sak.swipelab.com/tasks/4201) Launching the app to host now opens a map picker listing `first_map` and `test_scene`. Choosing one hosts the game on that map and plays in it. - `src/scene/maps.sx` lists the maps. `src/hud/map_picker.sx` is the screen, its input and its layout. - `--map <name>` skips the picker on the app, and names the map on `--join`, `hulken-server` and the bots tool. With none, those three take the first map. - A joining app does not learn the host's map. One on the wrong map is refused and prints why, as a mismatched world file always was. - The host starts after the choice, so a port that does not bind is reported after the picker. Checked: `tools/gate.sh fast` passes, 112 tests. In the running app the picker opens, the keyboard chooses a map and the test scene loads and plays. `hulken-server --map test_scene` serves a bot joined with the same `--map`, and refuses one on the first map. A real mouse click was not driven by the test run; the click path is covered by `tests/map_picker.sx`. Head: fc7c41b3badf60d32423f82438b4fb2c85fc7e69
Launching the app to host opens a panel listing the maps. The pointer or the
up and down keys move its cursor, and a click, Enter or Space chooses a map,
which the app says it is loading, hosts and plays. `--map <name>` skips the
picker, and names the map a joining app, the dedicated server and the bots
tool load, each taking the first map with none.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/4201-map-picker:task/4201-map-picker
git switch task/4201-map-picker

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff task/4201-map-picker
git switch task/4201-map-picker
git rebase master
git switch master
git merge --ff-only task/4201-map-picker
git switch task/4201-map-picker
git rebase master
git switch master
git merge --no-ff task/4201-map-picker
git switch master
git merge --squash task/4201-map-picker
git switch master
git merge --ff-only task/4201-map-picker
git switch master
git merge task/4201-map-picker
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sx/hulken!44
No description provided.