Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | BlackJitsu | |
Old Version | Published before Godot 3 was released. |
I have created a 2D array using the following code in Godot 3
for x in range(width):
var col = []
col.resize(height)
screen.append(col)
for x in range(width):
for y in range(height):
screen[x][y]= 1
Where screen is declared outside of this code.
Honestly not even sure if this works, but I would like to draw rectangles with the same sizes on to the screen using this matrix. The size would be depending on the viewport size(Ex: You would take the amount of rows in the 2D array and divide it by the viewport’s height to get the size of the rectangles to display on screen)