Welll.....
Manually entering data into an array would be tedious. And, any time you need to make changes or add things... ick.
Manually creating a JSON would be even more tedious. Just making sure you got the syntax right.
Assuming you don't have a lot of experience with MySQL or PHP, what I would do is something like this. And keep in mind, this is not an ideal solution but it would be a good starting place to learn about databases.
First, I would download SQLite Studio (google it) and use it to create a database of the objects in the game. Depending on how you structured it, it would be dead easy to add levels, add new objects, etc. just by adding a new item to the table.
thank you for all answers.
I wouldn't know what to do. The idea of having to add other things (and STUDY other things) bores me... But after all, the more I program, the more I want to do complex things.
I don't know if I should do as you said or do as in the last example of dop2000. (which is already complicated, but I can do it, I'm studying it).
For now I don't really want to download SQLite or learn MySQL or PHP yet, but if you tell me it's really convenient (and I'll need it in the future) then I'll seriously consider it. Is it?
Until now I have inserted the objects for each layout manually, but now I already have 15 - 20 levels in my game. And then I MUST be able to make sure that the levels are a little randomized. I would like to make a game with even 50+ levels. There are already about 10 enemies and I want to add more, and there are also tools or upgrades. However I MUST be able to randomize the game, still following a logic of my own invention.
Here, look at this screenshot, this is the minimum complexity I would like to do, for the moment.
Another thing: I found this link, take a look: https://www.construct.net/en/forum/construct-2/how-do-i-18/store-sub-array-inside-main-102648