Im trying to make a battleship game. i was wondering how i would make a grid like area where you can place a ship. Also how would i make my ships
and i would like the user to be able to rotate then 90 degrees before placing them.
You could make a checkerboard of regions (not necessarily like a checkerboard, maybe crosshatch) with a trigger so if the player clicks in the region it places the ship there with maybe a trigger to rotate it if a key is pressed (just change the direction the unit is facing). It would be cool if u just used the flying units of the game (with scaling edited to make them the proper length and width.
how would i make my BC scale is x1 and y5 z .8 to be on the grid correctly and no go off of it .
Like i would like to know the distances from the from of the BC to the back and keep its ends in the grid.
Just as a basic guess, this would seem to be easiest with a whole bunch of regions in a grid defined in a multi-dimensional array. Region [0][0] would be top left. Region [1][0] would be one space to the right. Region [0][1] would be one space down... etc.
The "ship" would have to be multiple pieces for a true Battlefield type effect. Then when you click in a region, you prompt for up/down/left/right/etc. From there you just add the proper number of pieces by adding or subtracting from the array and placing pieces.
That would be the easiest way to make a Battleship style game in my opinion however it wouldn't look as good without custom models this way. You'd just have 4 duplicates of a single unit to create one ship and 3 of another to create another ship, etc. But it's a start.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Im trying to make a battleship game. i was wondering how i would make a grid like area where you can place a ship. Also how would i make my ships and i would like the user to be able to rotate then 90 degrees before placing them.
If anyone can help it would be much appreciated.
You could make a checkerboard of regions (not necessarily like a checkerboard, maybe crosshatch) with a trigger so if the player clicks in the region it places the ship there with maybe a trigger to rotate it if a key is pressed (just change the direction the unit is facing). It would be cool if u just used the flying units of the game (with scaling edited to make them the proper length and width.
cool i will try that
this is my code
how would i make my BC scale is x1 and y5 z .8 to be on the grid correctly and no go off of it . Like i would like to know the distances from the from of the BC to the back and keep its ends in the grid.
bump
@mfirelord: Go
This is a great idea for a game! Maybe speak to programmer? He did that Chess map with grid squares.
@QMJ3: Go
Besides the lack of anyone being named programmer, I agree. (His name is progammer people!)
Just as a basic guess, this would seem to be easiest with a whole bunch of regions in a grid defined in a multi-dimensional array. Region [0][0] would be top left. Region [1][0] would be one space to the right. Region [0][1] would be one space down... etc.
The "ship" would have to be multiple pieces for a true Battlefield type effect. Then when you click in a region, you prompt for up/down/left/right/etc. From there you just add the proper number of pieces by adding or subtracting from the array and placing pieces.
That would be the easiest way to make a Battleship style game in my opinion however it wouldn't look as good without custom models this way. You'd just have 4 duplicates of a single unit to create one ship and 3 of another to create another ship, etc. But it's a start.