by date
Things Learnt from 3D Game Programming All in one
Things Learnt from 3D Game Programming All in one
| Name: | Amr Bekhit | ![]() |
|---|---|---|
| Date Posted: | Jun 10, 2006 | |
| Rating: | 3.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Amr Bekhit |
Blog post
Recently bought the TGE and TSE lisences and bought the 3DGPAI1 book to get started. I thought it might be useful to write down key things I learn as I go along and posting them here may help others.
-To loads up scripts that you want the program to use, you use EXEC. When the scripts are loaded using exec, the inline code is called. The main body of the script is where you place the inline code and can be considered the main() function of the class. When the module is exec'd, the main code is run and can make calls to any of the functions present in the script
-In the 3Dgpai1 book, I noticed that he used the function Main in his classes. A bit of experimentation showed that removing the function Main and putting the code inline has exactly the same effect.
-Switch seems to work fine with strings...perhaps switch$ isn't really necessary?
-Datablocks are used to group properties together in an easy to use variable. The syntax is as follows:
Datablock Datablocktype(datablockname)
Datablocktype defines the properties that this datablock has.
-Use GetWord and SetWord to change values withing strings
-SetTransform is used to set the position and rotation of an object:
SetTransform("px py pz rx ry rz rd")
Px py pz; XYZ coordinates of the rotation
Rx ry rz rd define a quaternion: the rx ry rz define the axis of rotration and the rd defines the angle in degrees.
In the rotation example in chapter 3, it seems that the TGE uses radians? However, messing around with the world editor in the TGE 1.4 demos shows that it is using degrees! Perhaps the author has modified the engine?
-To loads up scripts that you want the program to use, you use EXEC. When the scripts are loaded using exec, the inline code is called. The main body of the script is where you place the inline code and can be considered the main() function of the class. When the module is exec'd, the main code is run and can make calls to any of the functions present in the script
-In the 3Dgpai1 book, I noticed that he used the function Main in his classes. A bit of experimentation showed that removing the function Main and putting the code inline has exactly the same effect.
-Switch seems to work fine with strings...perhaps switch$ isn't really necessary?
-Datablocks are used to group properties together in an easy to use variable. The syntax is as follows:
Datablock Datablocktype(datablockname)
Datablocktype defines the properties that this datablock has.
-Use GetWord and SetWord to change values withing strings
-SetTransform is used to set the position and rotation of an object:
SetTransform("px py pz rx ry rz rd")
Px py pz; XYZ coordinates of the rotation
Rx ry rz rd define a quaternion: the rx ry rz define the axis of rotration and the rd defines the angle in degrees.
In the rotation example in chapter 3, it seems that the TGE uses radians? However, messing around with the world editor in the TGE 1.4 demos shows that it is using degrees! Perhaps the author has modified the engine?
Recent Blog Posts
| List: | 06/20/06 - Thing learn't in 3DGPAI1: CH5 + Added thoughts 06/13/06 - Things learn't from 3DGPAI1: Ch4 06/10/06 - Things Learnt from 3D Game Programming All in one |
|---|
Submit your own resources!| Ramen-sama (Jun 10, 2006 at 20:25 GMT) |
| Paul /*Wedge*/ DElia (Jun 10, 2006 at 20:35 GMT) |
| Mincetro (Jun 10, 2006 at 22:51 GMT) |
Quote:
I guess too many people had issues dealing with PI.
All those Grade Six classes gone to waste...
| Toby W. Allen (Jun 11, 2006 at 10:38 GMT) |
| Amr Bekhit (Jun 11, 2006 at 15:58 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



3.0 out of 5


