GameMaker Most optimized way of defining planes that store coordinates?

H

helpless_coder

Guest
You're probably confused by the title, it's a bit tricky to explain.

I'm drawing 3d squares at different distances, and I need a way to store all the information for each plane of the square.
So essentially I want to store planes in an array. These planes are defined by four points, in addition to the angle (possibly more).

Optimization wise,
should I create an instance of an object for each plane on the screen? (There are going to be a lot of them)
OR should I make a big string with comma separated values, and later split them into an array for each step.
Or possibly, something else.

Not sure what would be most performance costly, but I personally think the object method seems much cleaner. What do you guys think?
 
H

helpless_coder

Guest
What's wrong with just using a 2D array? I myself prefer using a buffer, but that's just me.
I'll close this thread now as I just read the change notes for GMS 2.3 :D

3d arrays and structs literally solves my issue!
 
Top