Hello all, I'm new to all this, but i'm intrigued by OO programming as an idea, so ive plumped for the blitzmax pc beta, and am on the whole having great fun learning about how it all works.
I work in the games industry for my job, but im an artist (stop booing please) and this is quite an adventure for me, and a rewarding one at that.
but..
i have a bunch of objects set up with methods etc. galore and my naff asteroids clone was coming along nicely, but my poorly designed interfaces etc. have made things begin to fray around the edges and go a bit* spaghetti-like.
* meaning very very.
I'm especially foxed about the Ptr command, and Varptr, and Var for that matter.
I think i understand that Var in a function argument definition means pass by reference rather than value.
I always get my head in a twist when trying to implement pointers to objects as fields in objects i have made. Perhaps this is the wrong way to do it? Any advice happily accepted.
I'm going to get some OO theory books from the library and see if they can help, but any directly blitzmax compliant assistance with using pointers to reference instances of types would help my accumulating grey hairs massively.
(pesky long winded sentence)
to summarise: im stuck with how pointers work with objects in blitzmax. Also any help with the most sensible principles designing interrelated objects which are to 'own' each other and stuff would be great.
cheers from a budding thickie!
I work in the games industry for my job, but im an artist (stop booing please) and this is quite an adventure for me, and a rewarding one at that.
but..
i have a bunch of objects set up with methods etc. galore and my naff asteroids clone was coming along nicely, but my poorly designed interfaces etc. have made things begin to fray around the edges and go a bit* spaghetti-like.
* meaning very very.
I'm especially foxed about the Ptr command, and Varptr, and Var for that matter.
I think i understand that Var in a function argument definition means pass by reference rather than value.
I always get my head in a twist when trying to implement pointers to objects as fields in objects i have made. Perhaps this is the wrong way to do it? Any advice happily accepted.
I'm going to get some OO theory books from the library and see if they can help, but any directly blitzmax compliant assistance with using pointers to reference instances of types would help my accumulating grey hairs massively.
(pesky long winded sentence)
to summarise: im stuck with how pointers work with objects in blitzmax. Also any help with the most sensible principles designing interrelated objects which are to 'own' each other and stuff would be great.
cheers from a budding thickie!