# Build a shared crafting bench for a two-player survival game

> Put three planks in a co-op workbench and give two players one bridge to build. Check how the server handles two requests for the same materials.

- URL: https://www.summerengine.com/de/blog/build-a-shared-crafting-bench
- Published: 2026-11-26T00:00:00.000Z
- Author: Summer Team
- Tags: Multiplayer, Survival games, Tutorial

## Quick answer

Let the server own the workbench inventory and recipe. Each player asks to craft. The server checks the available materials, spends them and creates the result together so both players see the same bench.

Put a stream across a path and a workbench beside it. The bench has three planks. A bridge costs all three. Now give both players a **Build bridge** button. What happens if they both press it before either sees the other’s result?

That small race is worth testing before you add a hundred recipes. The game has enough wood for one bridge, both players are allowed to build it, and the result is easy to check by walking across.

## Put the recipe in one place

Ask your coding agent to add the bench to a Summer multiplayer project:

> Create a shared bench with three planks. Show its stock to both players. A nearby player can request one bridge for three planks. The match server checks the stock, distance and whether the bridge already exists. For an accepted request, spend the three planks and create one bridge as one game action. Tell both players what changed. Give the second player a useful message if the bridge is already built.

Each window can show the cost or gray out an unavailable button. The server still checks on arrival. Between a player seeing “3 planks” and pressing the button, their partner might already have used them. Summer’s shared-state guide describes this pattern for collecting, buying and opening objects. [Shared game state](https://docs.summerengine.com/build/shared-state)

## Try the test from each side

Start two Local Play windows. Let the first player build the bridge alone. Both should see the bench fall from three planks to zero. Walk across with the second player. A visible bridge that only its builder can cross is a different bug from a bad inventory count.

Reset the example and try both buttons close together. Count the bridges and the remaining planks. You want one bridge, zero planks and the same answer in both windows. If your hands are too slow to exercise the race, ask the agent to send both craft requests against the same starting stock during the local test. Repeat with only two planks. The bench should keep both and the path should stay empty.

## Decide what should still be there tomorrow

If this is a shared survival world, the bridge and bench stock belong to the place. A lantern a player earns permanently can belong to that player. Check the crafting action in the running match first, then decide how returning players should find the world. [Save a shared world and each player’s progress](https://www.summerengine.com/blog/save-a-shared-co-op-world-and-player-progress) · [Summer’s survival and sandbox guide](https://docs.summerengine.com/build/games-like/survival-sandbox)

---

## Machine-readable resources

- Site index for agents: https://www.summerengine.com/llms.txt
- Full inlined content: https://www.summerengine.com/llms-full.txt
- Porting catalog: https://www.summerengine.com/llms-porting.txt
- Structured catalog: https://www.summerengine.com/agent-catalog.json
- Sitemap: https://www.summerengine.com/sitemap.xml
- Documentation: https://docs.summerengine.com
- Summer API (assets from any agent or code; public per-call model prices): https://docs.summerengine.com/api