Space Engineers

Space Engineers

157 个评价
Battleship
4
3
4
2
2
3
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
17.622 MB
2024 年 12 月 18 日 下午 3:34
1 项改动说明 ( 查看 )

订阅以下载
Battleship

描述
"YOU SUNK MY BATTLESHIP!"

Incoming, it's the classic board game "Battleship" made fully functional in vanilla Space Engineers with block coding!

[O= - - - - - - - - - - - - - - - - - - - - - - - - -

This game is made possible with 1067 timers, 55 events, 15 broadcast controllers, 2 active hinges, 400 projectors, 200 sensors, and 216 buttons.

PCU: 93580
Blocks: 15688

The ships in your fleet are placed with blocks, and the game is designed to know where they are and detect when a shot hits or misses. When a target button is pressed, the game announces the coordinate. When a shot hits, the game displays a red peg, and when it misses, it displays a white peg. At the end it also broadcasts how many hits and misses there were.

The game can be played either in Normal Mode or Salvo Mode. In Normal, each player gets one shot per turn. In the more advanced Salvo, each player gets as many shots per turn as they have ships, meaning they start off with 5 shots, and when one of their ships is sunk they go down to 4 shots, etc. Your number of shots can be seen at the top of the board where the arrows are.

[O= - - - - - - - - - - - - - - - - - - - - - - - - -

HOW TO PLAY:
In case you're unfamiliar with the game, here's the basics (the rules are also on the inside of the blueprint):

- You and your opponent have 5 ships in your fleet of various lengths:
5: Carrier
4: Battleship
3: Cruiser
3: Submarine
2: Destroyer
- Before you start the game, place these ships with blocks horizontally or vertically onto your 10x10 grid, but not diagonally, and not in adjacent squares with other ships.
- Press the blue "Ready" button when you're ready to begin. The game starts when both players are ready.
- PLAYER 1 ALWAYS SHOOTS FIRST.
- You and your opponent take turns guessing coordinates like "A1" or "J10" to shoot down the other's ships; usually you announce the coordinates, but this game does it automatically when you press the target button.
- When a shot lands on a ship, it's a hit, and when it lands in the water, it's a miss; usually you announce hits and misses, but this game does it automatically.
- When every block of a ship is hit, then that ship is sunk. YOU MUST MANUALLY ANNOUNCE WHEN YOUR SHIPS ARE SUNK at the start of your turn by pressing the respective buttons on the side of your grid.
- One player wins when all of their opponent's ships are sunk; they get a green light and the opponent gets a red light.
- You may reset the game any time by pressing the red "Reset Game" button.
- Stay on your side of the board until the game is over.

[O= - - - - - - - - - - - - - - - - - - - - - - - - -

HOW IT WORKS:

- Your ship grid is a subgrid, and above the board there are Sensors at each coordinate that detect when blocks are placed on the subgrid.
- The Sensors switch on/off the coordinate's Hit and Miss timers so the Hit is on and Miss is off when a block is there; the Sensor also turns on a Record Hit timer for that coordinate.
- There are Hit and Miss timers under the ship grid which turn on their respective projectors for red or white pegs on both their board and the enemy's board.
- Below these are the Shoot timers which trigger both Hit and Miss timers, only the one that's on will activate.

- Pressing the Target Button does several things: it activates broadcast controllers to announce "A1" etc in the chat; it increases velocity of an incrementing Shots hinge; it turns on the Shoot timer under the opponent's grid, and it triggers its Record Hit timer behind the target grid.
- The Shots hinge angle is incremented by events to keep track of how many shots have been taken, which is relevant for Salvo Mode (and Normal Mode is effectively Salvo but capped at 1 shot and unable to decrease shots). These events update the shot arrow indicators, and when all shots are taken, the "last" event reverses the Shots hinge to its origin.
- The hinge returning to origin triggers another event that says the turn is over and and it's time to reveal hits and misses by triggering all the opponent's Shoot timers (only those that are on will trigger) and turning on the Broadcast Hit events which announce how many hits and misses there were.
- Triggering the Record Hit timer increments a series of "Hits" timers that turn the next one on and itself off.
- The Broadcast Hits events read both these "Hits" timers and the opponent's "Shots" timers for which ones are on, and depending how many shots were taken and how many hits there were, the correct event will broadcast "X HITS!, Y misses" when it is turned on.
- At the end, certain lights and indicators are toggled to show that the next player's turn has started.

- The Sunk buttons on the side of the grid turn off the line of small batteries for the ship, indicating on both sides that it was sunk, and broadcasts "You sunk my Battleship!" etc.
- Sinking a ship also triggers a Decrease Shots timer which changes the "last" event in the hinge increment and makes it so 5->4 shots, 4->3 shots, etc. On Normal Mode, this Decrease Shots timer is off so it stays at the 1 Shot event.
- Each event (for number of shots) in the increment has a corresponding Return Hinge timer that sends the hinge back to origin; when you have 5 shots, the 5th Return Hinge timer is on and 1-4 are off; Decrease Shots then turns 5 off and 4 on, so the hinge gets reversed when it reaches the 4th event instead of the 5th. Likewise for going from 4 to 3 shots.
- Win events detect when all of one player's small batteries are off, meaning all ships are sunk. The winner gets a green light, and the loser gets a red light.
- All throughout the game, the button inputs are toggled on/off to disallow shenanigans when it's not your turn.

***** There is an issue where sometimes the projectors decide not to project, particularly on Salvo Mode, probably due to lag. This can be fixed manually by finding the projector in the terminal and turning off and on again.

[O= - - - - - - - - - - - - - - - - - - - - - - - - -

Thank you for checking out this monument to my insane preference for tedium over simply learning how to script. Soon I will be making Tic Tac Toe, and perhaps later a parkour/puzzle/escape room build with multiple levels. I'm open to suggestions.
25 条留言
AeQuArTz  [作者] 1 月 19 日 下午 10:51 
Rock Paper Scissors is feasible... I can do that eventually
KnightForEyes 1 月 16 日 上午 2:23 
actually making 2 warships fight : Nah

Actually playing Battleship in Space Engineers : HELL YE LEMME DO THAT

When do we gonna get Rock Paper scissors in 3D in Space Engineers!
AeQuArTz  [作者] 1 月 12 日 上午 10:31 
Haven't heard of it before. Looks like it would be even more complicated than this project. If there's enough demand I could figure it out, but I have other ideas to work on first. Thanks for the suggestion
Kevin Starwaster 1 月 12 日 上午 10:10 
Wow, looks cool. How about the Sub Search game? (3D version of Battleship, see link)
https://boardgamegeek.com/thread/429041/sub-search-better-than-a-3-d-version-of-battleship
comrade22 1 月 10 日 上午 7:40 
Yes please
AeQuArTz  [作者] 1 月 8 日 下午 2:04 
You mean like a larger version of this game with ships instead of blocks, or warships?
comrade22 1 月 8 日 上午 1:47 
please make battle ships
AeQuArTz  [作者] 1 月 5 日 上午 10:22 
If you're talking about having more than 5 ships or varying the lengths, like three 2-long destroyers, or including 1-long ships, you can indeed place as many blocks on your grid as you want in any configuration and the hit detection will still work, you would just need to agree with your opponent how to identify them. But the sunk indicators are based on 5-4-3-3-2, so instead you could manually announce in the chat when a ship is sunk and trigger the end of game by pressing all the sunk buttons together if you lose (or ignore those and just reset the game)
Abel 1 月 5 日 上午 9:27 
Bip Bip Bip, i detect some genius here
Sodium Chloride 1 月 5 日 上午 6:40 
can it work with different ship combinations?