Hello
I'm quite new to Blitz3d and was wondering if there were any articles that compare it to C?
I've been coding in C for years and getting my head around some of the stuff in Blitz3d is a little tricky.
eg.
1) I'm using Protean and created a project but how does Blitz know where to start? There is no main().
2) If I write code outside of a function in what order does it get executed if I have bits of code in several files?
3) What actually happens with the variables? Say I have 'temp = MyFunc()' When does temp get created? Destroyed? Should I care?
4) How does the Type stuff work? It's supposed to be like a structure right? I have some code which does 'player1.Player = CreatePlayer()'. Inside the function it does 'p.Player = New Player' What's player1, what's p? Where is getting these from? When I want to access this player it has to 'For p.Player=Each Player' - there's that 'p' thing again!
5) One of the elements of the Player type has 'Field entity'. What type is this? It calls p\entity = CreatePivot().
6) There's a toggle for wireframe and the code is 'wire = NOT wire' which is fair enough but I haven't created wire anywhere, let alone initialised it.
7) How do I free up my mesh when it's no longer needed?
Hope someone can clear some of these up.
Thanks!
scott
I'm quite new to Blitz3d and was wondering if there were any articles that compare it to C?
I've been coding in C for years and getting my head around some of the stuff in Blitz3d is a little tricky.
eg.
1) I'm using Protean and created a project but how does Blitz know where to start? There is no main().
2) If I write code outside of a function in what order does it get executed if I have bits of code in several files?
3) What actually happens with the variables? Say I have 'temp = MyFunc()' When does temp get created? Destroyed? Should I care?
4) How does the Type stuff work? It's supposed to be like a structure right? I have some code which does 'player1.Player = CreatePlayer()'. Inside the function it does 'p.Player = New Player' What's player1, what's p? Where is getting these from? When I want to access this player it has to 'For p.Player=Each Player' - there's that 'p' thing again!
5) One of the elements of the Player type has 'Field entity'. What type is this? It calls p\entity = CreatePivot().
6) There's a toggle for wireframe and the code is 'wire = NOT wire' which is fair enough but I haven't created wire anywhere, let alone initialised it.
7) How do I free up my mesh when it's no longer needed?
Hope someone can clear some of these up.
Thanks!
scott