#Battle Ship VR

20 messages · Page 1 of 1 (latest)

gleaming zealot
#

Hello! I'm trying to make a battleship game where the small table controls ships that will be on the big table? How would I get the areas to correspond with each other?

#

So if you moved the battle ship to d-5 then the big grid's battleship would move to d-5

gleaming zealot
#

Like how the ship just moved 3 spaces forward

raven parrot
#

Yooo sorry I can't really help but I had an idea for a battleship game that I wanted to share with you since you're already making it

I had the idea of a game with two players in a little room playing batteship, but every move the two players in the room makes affects real battleships in a large sea outside and any players who aren't playing the game of battleship will be on the battleships praying that they won't be hit.

#

In case you wanted to use that. Good luck regardless

south perch
# gleaming zealot Like how the ship just moved 3 spaces forward

this is an idea that might be best done with a string to represent the grid
The string should be Left > Right, Down > Up
This means the first character is the bottom left, and the last character is the top right

With 100 characters, you can represent every single slot on the board
Give each ship its own number, 1, 2, 3, 4, 5

Now, every time a ship moves you can re-compile that string
0 means that a tile is empty
Any other number means its a ship

So for example, lets say the grid was 3x3, and I had 1 ship that was 2 tiles long

If it was at the bottom left, facing right, the string would be 110000000
If I moved it up one, it would be 000110000

If I had 2 ships, 1 is 2 long, 2 is 3 long, 2 facing up at the bottom right, and 1 facing right at the bottom left, the string would look like this:
112002002

#

If you want to find a position on the grid:

Grid to Index:
(X * XWidth) + (Y*YWidth) = Index
Index to Grid:
Modulo(Index,XWidth) = X
(Index / YWidth) = Y

gleaming zealot
#

Thanks!

#

It’s not 100% clear on how I would do this, I’ll have to play around for a bit bit that gave me a stupid good place to start

gleaming zealot
#

On the topic of ideas, I was planning on having the red squares rotate the ship, any other ideas on rotating the ship instead of using a square?

gleaming zealot
#

And the left (0) > right (1) | up (2) > down (3) meaning
0123012301230123 etc

raven parrot
#

I think having spectators on the ship would be a fun dynamic just cause every move you make is no longer an arbitrary move on a board it's a move that could affect the lives of players on the ships

#

i think its funny

raven parrot
#

bro took all that time just to say no 😭

south perch