Hi Andy,
Actually, thats a struct not a construct. It stands for structure.
Anyway, to answer your question a struct and a union are both ways to
arrange related data/variables together. Structs are kind of like a
stripped down class, but instead of storing the data on the heap it
gets written to the stack. Two different areas of your random access
memory. However, that's the technical side of things. What you really
need to know is that it makes programming easier because instead of
having 500 global variables you can arrange them and place them in
structures specifically asigned to a type of game object. For example,
here is a sample struct.

struct Player
{
int ammo = 0;
int health = 0;
float x = 0.0;
float y 0.0;
float z = 0.0;
}

As you can see this simple structure has a number of variables that
are specific to our game player.  We can actually create a number of
different player's using this same structure without having to asign
new variables to do it. Simply create a new instance of the struct and
start using it.
Which is my entire point to Phil here. While I do believe BGT is a
great tool I come from a long history of developing in languages like
Java, C++, and Microsoft's .NET sweet of programming languages. As a
result I have a vast amount of training/skill in working with object
oriented design principles, and from what I've seen so far BGT is very
procedural in nature. That makes the engine limited in a way. Not
limited in what it can create, but limited from an advanced
programming standpoint. I can't really use my best practices and
object oriented design training here as the engine is designed for
simplicity. I understand that since largely its users have no
programming experience, but for a skilled programmer it doesn't offer
more advanced features I am particularly looking for.

Cheers!



On 4/1/10, Andy <musicproa...@gmail.com> wrote:
>     Hi Tom,
> Slightly off topic here, but what's a union and  a construct?
>
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to