@PByrne wrote:
So I'm new to programming and game developing. So far I've created pong and break out and now want to try something a little harder with a chess/checkers hybrid. While planning things I've come to a point where I don't know if what I'm doing is going down the right path or there's something I don't know that would make this cleaner. I haven't started any coding yet just planning stuff. So here goes. Tldr; noob has no idea if what he's doing is correct.
First I have my players select a map. The map class reads a delimeted text file that holds parameters to create tile objects and throws the objects into a map [ , ]. Then I have a grid class that takes the map [ , ] and creates a (x,y) grid the size of the array and makes the tiles draw their image onto the grid. When player1 and player2 are created they create pieces and get places into a playerTeam [ ]. I have a gamestate class that creates a selecter object that has property locationX and locationY which i pass to grid to draw the selector ontop of the tile at map [locationX, locationY] which the player is able to move around. If selector locationX && locationY == the locationX and locationY of one of the players pieces they are able to do actions with that piece object based on the pieces rulset. Say it can move like a king in chess, 1 square in any direction, once the king is selected i want to higlight all tiles in map [ , ] by +-1x and +-1y. Then move selector to one of those points and select that tile and update that pieces locationX and locationY to the selected tiles locationX and locstionY and redraw it there.
Sorry if formating/spelling is awful I'm on mobile right now. Basically does this seem like a decent plan to deal with this or is there a better way that I do not know of?
Thanks for reading all!
Posts: 5
Participants: 4