#Battle Ship VR
20 messages · Page 1 of 1 (latest)
So if you moved the battle ship to d-5 then the big grid's battleship would move to d-5
Like how the ship just moved 3 spaces forward
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
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
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
So like a grid index?
Funny you mention that, that is pretty much exactly what I was going to do, just without the spectators being on the ship...
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?
So to try to get this right, my grid is a 10x10 would it look like this?
No Ships:
000000000000000000000000000000000000000000
With one-three long ship:
11001100110000000000000000000000000000000000
And the left (0) > right (1) | up (2) > down (3) meaning
0123012301230123 etc

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
no
bro took all that time just to say no 😭
i was trying to correct him but its hard to type and draw