Breakout Tile Editor
We have made a breakout Tile Editor with C++, to get an idea on how to make game engines.
We First started off by drawing the grid line and allocating the size of each tile, using a for loop to draw lines, the loop goes on according to how many tiles we need on X and Y.
Next we used the mouse position to locate the grid's position when we use the input and finding out which tile we are exactly clicking on to place a tile, we also added an offset to make the mouse's X and Y be on the middle, and check if we are clicking on a tile or not, finally checking which color of a tile we want to place by having and if for each color.
Next up is saving and loading the level, since every tile has id the defines what color it has or if it's empty, we saving the whole grid's ids into a file in the editor, and loading it after that in the game level.