Hello,
It is a pleasure to join the community.
This will be a beginner’s question, but I will make it as not-noob as possible.
I understand C# and have no problems using it, but now I need to know how to implement my knowledge into unity.
I would normally watch tutorials or reed books, I will do that indeed, but time is a BIG factor now, I need this project done in a month.
Idea is:
- I need to be able to implement an int[25,25] matrix into the game logic, and represent it visually, so that every cell of the array matrix is a square on the screen, where objects can be placed. (25x25 - 50 squares that will be arranged as e big square plane in unity)
- I need to apply my rules for the game - there are 3 types of objects - a main base, a chicken and a pig, each taking exactly 1cell in both the matrix and the visual plane. There will be no movements, the base will be pre-placed and the chickens will be guarding it (they will be placed at certain positions).
- The player will use the pigs by placing them on the plane (in certain squares that he finds beneficial) and trying to destroy the base and the chickens.
Let’s say this is the int[25,25] matrix at the beginning of the game:
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000220000000000000
0000000020000000000000000
0000000203020020000000000
0000000000000022000000000
0000000022220000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
0000000000000000000000000
I need this to appear in the game in the form of a plane where every ‘0’ is a square, every ‘2’ is a square with a chicken object on it and every ‘3’ is a base square.
Now the player will be able to click on the squares and place pigs, which will be represented as '1’s in the matrix, and they will either die or die killing the chickens and the base, depending on the game rules. Every time a pig is placed on the plane, there will be a loop that will be checking the int[,] matrix to see if the pig succeeded.
Now,
How can I put this into Unity? I am thinking of the isometric view, and it will be something like a chess game kind of feeling. I need the squares to be the only places a game character can be placed, and to have something like a mouse over effect, so that the user can see where he can put the pig.
I believe 2D will be more adequate since I will be using custom drawn sprites.
I don’t want a complete source code of the problem, just give me a direction to follow. I have a month to finish this, so I need specific things to focus on, not the whole Unity for now.
Thank you very much for your time!