Re: [Audyssey] Bgt stuff that confuses me
Okay, I'll explain about functions, return values, etc. Let's take an example function that adds two numbers. This would be like you meeting some guy, and saying, From time to time I may call on you. When I do, I'll give you two numbers. I want you to add them together, and then give me the result, as a number. Then, you might tell the guy, 3 and 5. He would then say 8. The return type of a function tells the program what type of value to expect back from the function. If we say void, that means the function will not return anything. If we say int, that means that, when we call the function, we expect it to return an int to us. When we specify function parameters, here's where the first and second ints come into play. These are undefined outside our adding function, because there's no need for them anywhere else. They're kind of like that particular function's private workspace, where it can do anything it wants. It can also define other variables that are only valid within that function, within its private workspace. When the function returns, the janitor comes along and clears away all the junk from the function's private workspace, so nobody else will ever see it again. When we call the function inside the main function, we're passing in two parameters to the function. These parameters will fill the first and second ints. That means, the function already has data in its private workspace when it begins. It then manipulates that data, and returns the result of those manipulations. Hope that helped! Jayson - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 2:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Good analogy Jason. Best Regards, Hawyden -Original Message- From: gamers-boun...@audyssey.org [mailto:gamers-boun...@audyssey.org] On Behalf Of Jayson Smith Sent: Wednesday, March 24, 2010 2:31 PM To: Gamers Discussion list Subject: Re: [Audyssey] Bgt stuff that confuses me Okay, I'll explain about functions, return values, etc. Let's take an example function that adds two numbers. This would be like you meeting some guy, and saying, From time to time I may call on you. When I do, I'll give you two numbers. I want you to add them together, and then give me the result, as a number. Then, you might tell the guy, 3 and 5. He would then say 8. The return type of a function tells the program what type of value to expect back from the function. If we say void, that means the function will not return anything. If we say int, that means that, when we call the function, we expect it to return an int to us. When we specify function parameters, here's where the first and second ints come into play. These are undefined outside our adding function, because there's no need for them anywhere else. They're kind of like that particular function's private workspace, where it can do anything it wants. It can also define other variables that are only valid within that function, within its private workspace. When the function returns, the janitor comes along and clears away all the junk from the function's private workspace, so nobody else will ever see it again. When we call the function inside the main function, we're passing in two parameters to the function. These parameters will fill the first and second ints. That means, the function already has data in its private workspace when it begins. It then manipulates that data, and returns the result of those manipulations. Hope that helped! Jayson - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 2:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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. --- 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
Re: [Audyssey] Bgt stuff that confuses me
Hi, I don't know where you got that idea. No, I didn't say that. My point to Dark was that you can't call a function that hasn't been defined in your script somewhere. If you recall Dark said he didn't understand why he was writing an add_numbers(() function when in the body of main he had already added the numbers 3 and 5. What he failed to grasp at that point is that the add_numbers function he used in main() hadn't been created yet. He actually defines the contents of the add_numbers() function later on in his script. Otherwise you can't call a function that doesn't exist. A better way to explain it is when you open a book to the table of contents and it tells you chapter 5 is on page 75. Well, what happens if there is no page 75 in the book? The obvious answer is you can't look up the contents of chapter 5 right? Well, when writing scripts a similar concept comes into play. If you write a little piece of code like void main () { int result = add_numbers (3, 5); } What you are telling main to do is to call the add_numbers function, which should exist somewherein your script, and take the numbers 3 and 5 and add them together, and then return the result which happens to be 8. If the add_numbers() function doesn't exist it is like turning to a blank page in the book and the script can't continue. That's all I was getting at. However, to answer your immediate question i believe main can appear anywhere in a BGT script. Although, in a lot of the examples I've seen it appears at the top of the scripts. This makes sense since it is the entry point for the script and initializes everything else. Cheers! On 3/25/10, Andy musicproa...@gmail.com wrote: Hi Thom, So you're saying, then, that main has to be at the bottom of the program? --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Hi Dark, I think the concept you are missing here is called scope. Variables can be declared in the local scope or the global scope. There are important differences and uses of each of these types of variables. Global variables are generally declared at the top of your program/script and are visable to every function and variable in your program. Since these types of variables generally remain in memory from the time you start it to the time it ends you want to use global variables sparingly. Only use them for data that needs to remain in memory at all times such as a player's health, ammo remaining, etc. Local variables are variables declared inside a function which belong specifically to that function. When that function exits the variable and the data it contains is destroyed. Since it is specific to that function other functions and variables elsewhere in your program can't access them directly. This is where return types come in handy. A function can return the data stored in a local variable making local variables accessible to other functions and variables as needed. Here is a case in point. int Add (int x, int y) { return x+y; } void main () { int result = Add (5, 7); alert (results, result); } In this simple script I created a function which adds two numbers. The variables x and y are local, specific to the add function. I don't really want the values stored in x and y, but only the result of x+y. Add returns an integer value which is the sum of x and y. and passes it to the result variable in main(). Does that make sense? As for changing global variables you can change the value stored in it anywhere in your program including the same function multiple times. You don't have to create new functions just to reset health or whatever back to 100. HTH On 3/24/10, dark d...@xgam.org wrote: I follow the printing business, but I'm uncertain as to the int first, int second business, sinse these don't seem to have been defigned, also I'm a litle confused as to what a return statement is exactly for. I thought you make global variables and had your functions alter those. For instance, you start with int hp = 100. You setup a function to change this value, then is it not changed until you setup another function to return it to 100 again? Beware the grue! Dark. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Hi, Actually, return statements are alloud in functions that return void. The only different is you don't return an actual value. The way you do this is like this. void main () { return; } Since I didn't pass a value or variable to the return statement it defaults to void.About the only time you want to do this is when your function needs to exit early and without continuing with the rest of the function. HTH On 3/24/10, Oriol Gómez ogomez@gmail.com wrote: I'm going to try to answer your questions: 1. Void fucntions are functions that don't return anythin gI.e: No return statements allowed. 2. 3+5 in between quotes is going to be printed as such. Example: if you say alert(3+5=8); it's going to print exactly that. if you said something like. alert(hey +3+5); that would print 8 because you're putting it outside a string. hth --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Hi Dark, Smile. Welcome to the wonderful world of resource management. Don't feel too bad as this is an issue that comes up all the time with new programmers, because they often think as you do that a number is just a number and don't understand the difference between int, float, long, short, double, etc. Thing is with computers before you can actually store a value, like a number, you have to allocate enough memory on the heap to store it in memory. The value 3 requires a lot less memory than the value 3.14159265. For a small integer value like 3 you can use a short integer which will create just enough space in memory to handle that value. For a large floating point value like 3.14159265 you'll want a double value which will create a much larger block of memory on the heap for storage. While you could create all your numeric variables as double you'll run into the problem of waisting memory needlessly and waisting valuable system resources that could be used elsewhere. That is why it is a good idea only to asign enough space on the heap that you actually need rather than using the largest amount of memory possible just to store a small integer like 3. As for your script questions remember in the main() function when you call the add_numbers() function it hasn't been defined in your script yet. So while the add_numbers() function does indeed add two numbers but if you don't actually create that function somewhere in your script that function doesn't exist. As it happens you create the add_numbers() function after the main() function and it gets called by main to add two numbers of type int. Does that make sense? As far as the variables first and second you declared them as function parameters in the declaration of your function like int add-numbers (int first, int second) which is perfectly legal and proper code. What this does is tell the function that it requires two parameters of type int, and they must be entered when the function is called like int result = add_numbers (5, 7); in order to perform the calculation. Otherwise without declaring first and second as part of the function declaration you couldn't pass any values or parameters to the function. HTH On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
I've never understood that either, probably why I've always gotten such poor grades in math. Homer: Hey, uh, could you go across the street and get me a slice of pizza? Vender: No pizza. Only Khlav Kalash. - Original Message - From: Thomas Ward thomasward1...@gmail.com To: Gamers Discussion list gamers@audyssey.org Sent: Thursday, March 25, 2010 4:36 AM Subject: Re: [Audyssey] Bgt stuff that confuses me Hi Dark, Smile. Welcome to the wonderful world of resource management. Don't feel too bad as this is an issue that comes up all the time with new programmers, because they often think as you do that a number is just a number and don't understand the difference between int, float, long, short, double, etc. Thing is with computers before you can actually store a value, like a number, you have to allocate enough memory on the heap to store it in memory. The value 3 requires a lot less memory than the value 3.14159265. For a small integer value like 3 you can use a short integer which will create just enough space in memory to handle that value. For a large floating point value like 3.14159265 you'll want a double value which will create a much larger block of memory on the heap for storage. While you could create all your numeric variables as double you'll run into the problem of waisting memory needlessly and waisting valuable system resources that could be used elsewhere. That is why it is a good idea only to asign enough space on the heap that you actually need rather than using the largest amount of memory possible just to store a small integer like 3. As for your script questions remember in the main() function when you call the add_numbers() function it hasn't been defined in your script yet. So while the add_numbers() function does indeed add two numbers but if you don't actually create that function somewhere in your script that function doesn't exist. As it happens you create the add_numbers() function after the main() function and it gets called by main to add two numbers of type int. Does that make sense? As far as the variables first and second you declared them as function parameters in the declaration of your function like int add-numbers (int first, int second) which is perfectly legal and proper code. What this does is tell the function that it requires two parameters of type int, and they must be entered when the function is called like int result = add_numbers (5, 7); in order to perform the calculation. Otherwise without declaring first and second as part of the function declaration you couldn't pass any values or parameters to the function. HTH On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Intt is the interjeter. Contact info. email: muhamme...@googlemail.com msn: muhammed123...@hotmail.co.uk Skype: muhammed.deniz Klango username. muhammed - Original Message - From: Bryan Peterson bpeterson2...@cableone.net To: Gamers Discussion list gamers@audyssey.org Sent: Thursday, March 25, 2010 11:03 AM Subject: Re: [Audyssey] Bgt stuff that confuses me I've never understood that either, probably why I've always gotten such poor grades in math. Homer: Hey, uh, could you go across the street and get me a slice of pizza? Vender: No pizza. Only Khlav Kalash. - Original Message - From: Thomas Ward thomasward1...@gmail.com To: Gamers Discussion list gamers@audyssey.org Sent: Thursday, March 25, 2010 4:36 AM Subject: Re: [Audyssey] Bgt stuff that confuses me Hi Dark, Smile. Welcome to the wonderful world of resource management. Don't feel too bad as this is an issue that comes up all the time with new programmers, because they often think as you do that a number is just a number and don't understand the difference between int, float, long, short, double, etc. Thing is with computers before you can actually store a value, like a number, you have to allocate enough memory on the heap to store it in memory. The value 3 requires a lot less memory than the value 3.14159265. For a small integer value like 3 you can use a short integer which will create just enough space in memory to handle that value. For a large floating point value like 3.14159265 you'll want a double value which will create a much larger block of memory on the heap for storage. While you could create all your numeric variables as double you'll run into the problem of waisting memory needlessly and waisting valuable system resources that could be used elsewhere. That is why it is a good idea only to asign enough space on the heap that you actually need rather than using the largest amount of memory possible just to store a small integer like 3. As for your script questions remember in the main() function when you call the add_numbers() function it hasn't been defined in your script yet. So while the add_numbers() function does indeed add two numbers but if you don't actually create that function somewhere in your script that function doesn't exist. As it happens you create the add_numbers() function after the main() function and it gets called by main to add two numbers of type int. Does that make sense? As far as the variables first and second you declared them as function parameters in the declaration of your function like int add-numbers (int first, int second) which is perfectly legal and proper code. What this does is tell the function that it requires two parameters of type int, and they must be entered when the function is called like int result = add_numbers (5, 7); in order to perform the calculation. Otherwise without declaring first and second as part of the function declaration you couldn't pass any values or parameters to the function. HTH On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. --- 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. --- 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
Re: [Audyssey] Bgt stuff that confuses me
Hi Thom, So you're saying, then, that main has to be at the bottom of the program? Thomas Ward wrote: Hi Dark, Smile. Welcome to the wonderful world of resource management. Don't feel too bad as this is an issue that comes up all the time with new programmers, because they often think as you do that a number is just a number and don't understand the difference between int, float, long, short, double, etc. Thing is with computers before you can actually store a value, like a number, you have to allocate enough memory on the heap to store it in memory. The value 3 requires a lot less memory than the value 3.14159265. For a small integer value like 3 you can use a short integer which will create just enough space in memory to handle that value. For a large floating point value like 3.14159265 you'll want a double value which will create a much larger block of memory on the heap for storage. While you could create all your numeric variables as double you'll run into the problem of waisting memory needlessly and waisting valuable system resources that could be used elsewhere. That is why it is a good idea only to asign enough space on the heap that you actually need rather than using the largest amount of memory possible just to store a small integer like 3. As for your script questions remember in the main() function when you call the add_numbers() function it hasn't been defined in your script yet. So while the add_numbers() function does indeed add two numbers but if you don't actually create that function somewhere in your script that function doesn't exist. As it happens you create the add_numbers() function after the main() function and it gets called by main to add two numbers of type int. Does that make sense? As far as the variables first and second you declared them as function parameters in the declaration of your function like int add-numbers (int first, int second) which is perfectly legal and proper code. What this does is tell the function that it requires two parameters of type int, and they must be entered when the function is called like int result = add_numbers (5, 7); in order to perform the calculation. Otherwise without declaring first and second as part of the function declaration you couldn't pass any values or parameters to the function. HTH On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. --- 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. --- 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.
[Audyssey] Bgt stuff that confuses me
Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
I'm going to try to answer your questions: 1. Void fucntions are functions that don't return anythin gI.e: No return statements allowed. 2. 3+5 in between quotes is going to be printed as such. Example: if you say alert(3+5=8); it's going to print exactly that. if you said something like. alert(hey +3+5); that would print 8 because you're putting it outside a string. hth On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
I follow the printing business, but I'm uncertain as to the int first, int second business, sinse these don't seem to have been defigned, also I'm a litle confused as to what a return statement is exactly for. I thought you make global variables and had your functions alter those. For instance, you start with int hp = 100. You setup a function to change this value, then is it not changed until you setup another function to return it to 100 again? Beware the grue! Dark. - Original Message - From: Oriol Gómez ogomez@gmail.com To: Gamers Discussion list gamers@audyssey.org Sent: Wednesday, March 24, 2010 7:01 PM Subject: Re: [Audyssey] Bgt stuff that confuses me I'm going to try to answer your questions: 1. Void fucntions are functions that don't return anythin gI.e: No return statements allowed. 2. 3+5 in between quotes is going to be printed as such. Example: if you say alert(3+5=8); it's going to print exactly that. if you said something like. alert(hey +3+5); that would print 8 because you're putting it outside a string. hth --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Yay, but you can also have function variables. Ok for example, say you make a fucntionw here a user has to choose a menu option. Say taht option is called menu You'd do soemthing like this int menu() { int userposition=0; when you press down arrow userposition=userposition+1; then return userposition; would make userposition a global variable to get this value you'd have to use something like option=menu(); that would call the menu function and give you what the user chose, as the option var Also it's not necessary to use all the different types of int, all you need to know is void, int, double, and string. On 3/24/10, dark d...@xgam.org wrote: I follow the printing business, but I'm uncertain as to the int first, int second business, sinse these don't seem to have been defigned, also I'm a litle confused as to what a return statement is exactly for. I thought you make global variables and had your functions alter those. For instance, you start with int hp = 100. You setup a function to change this value, then is it not changed until you setup another function to return it to 100 again? Beware the grue! Dark. - Original Message - From: Oriol Gómez ogomez@gmail.com To: Gamers Discussion list gamers@audyssey.org Sent: Wednesday, March 24, 2010 7:01 PM Subject: Re: [Audyssey] Bgt stuff that confuses me I'm going to try to answer your questions: 1. Void fucntions are functions that don't return anythin gI.e: No return statements allowed. 2. 3+5 in between quotes is going to be printed as such. Example: if you say alert(3+5=8); it's going to print exactly that. if you said something like. alert(hey +3+5); that would print 8 because you're putting it outside a string. hth --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Hi Oriol, A small correction, void functions can indeed contain return statements, however only the word return with a semicolon after it and no actual value. This allows you to break prematurely out of a function, even if it doesn't return a value. Kind regards, Philip Bennefall - Original Message - From: Oriol Gómez ogomez@gmail.com To: Gamers Discussion list gamers@audyssey.org Sent: Wednesday, March 24, 2010 8:01 PM Subject: Re: [Audyssey] Bgt stuff that confuses me I'm going to try to answer your questions: 1. Void fucntions are functions that don't return anythin gI.e: No return statements allowed. 2. 3+5 in between quotes is going to be printed as such. Example: if you say alert(3+5=8); it's going to print exactly that. if you said something like. alert(hey +3+5); that would print 8 because you're putting it outside a string. hth On 3/24/10, dark d...@xgam.org wrote: Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
I'm more than mildly confused about all that Dark. That could be where I'm having trouble with my current project. All I can say is I'm glad I never went in expecting this to be completely easy, otherwise I'd have been in for a nasty shock. I still have every intention of buying the Light and eventually the pro versions but I think it'd best wait until I'm more comfortable with this whole business. Homer: Hey, uh, could you go across the street and get me a slice of pizza? Vender: No pizza. Only Khlav Kalash. - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 12:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
My friend with the msc in computer science said his favourite book on games programming had a first chapter entitled games programming is hard! and a scond chapter ientitled games programming is bloody hard! ;D. I am finding slowly things are indeed sinking into my brain, but it's taking careful reading of the examples and wrestling with it, --- though to be honest I've not had so much fun learning something in a long time. Beware the grue! Dark. - Original Message - From: Bryan Peterson bpeterson2...@cableone.net To: Gamers Discussion list gamers@audyssey.org Sent: Wednesday, March 24, 2010 8:15 PM Subject: Re: [Audyssey] Bgt stuff that confuses me I'm more than mildly confused about all that Dark. That could be where I'm having trouble with my current project. All I can say is I'm glad I never went in expecting this to be completely easy, otherwise I'd have been in for a nasty shock. I still have every intention of buying the Light and eventually the pro versions but I think it'd best wait until I'm more comfortable with this whole business. Homer: Hey, uh, could you go across the street and get me a slice of pizza? Vender: No pizza. Only Khlav Kalash. - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 12:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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. --- 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.
Re: [Audyssey] Bgt stuff that confuses me
Hi Dark, Lol! What's the third chapter called, Game Programming is Completely Impossible!? Grin Best Regards, Hayden -Original Message- From: gamers-boun...@audyssey.org [mailto:gamers-boun...@audyssey.org] On Behalf Of dark Sent: Wednesday, March 24, 2010 3:27 PM To: Gamers Discussion list Subject: Re: [Audyssey] Bgt stuff that confuses me My friend with the msc in computer science said his favourite book on games programming had a first chapter entitled games programming is hard! and a scond chapter ientitled games programming is bloody hard! ;D. I am finding slowly things are indeed sinking into my brain, but it's taking careful reading of the examples and wrestling with it, --- though to be honest I've not had so much fun learning something in a long time. Beware the grue! Dark. - Original Message - From: Bryan Peterson bpeterson2...@cableone.net To: Gamers Discussion list gamers@audyssey.org Sent: Wednesday, March 24, 2010 8:15 PM Subject: Re: [Audyssey] Bgt stuff that confuses me I'm more than mildly confused about all that Dark. That could be where I'm having trouble with my current project. All I can say is I'm glad I never went in expecting this to be completely easy, otherwise I'd have been in for a nasty shock. I still have every intention of buying the Light and eventually the pro versions but I think it'd best wait until I'm more comfortable with this whole business. Homer: Hey, uh, could you go across the street and get me a slice of pizza? Vender: No pizza. Only Khlav Kalash. - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 12:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. --- 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. --- 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. --- 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
Re: [Audyssey] Bgt stuff that confuses me
Number/variable types relate to resource efficiency etc. As in why store a number that'll never go higher than 32768 - limit for something like an Int16/short - in a variable of a much larger type, like Int64? Same principle as in why would you store a piece of paper in a full on rucksack if that's all you were trying to carry in it. In terms of local and global variables, the theory is that a local variable to only be used within a function/method doesn't need to be available to every other part of the game/script/program etc, and therefore, why would you want the applet to make use of resources to remember it all the time? Lastly, the general difference between a method and a function, is that while a method will carry out an activity/bit of functionality, a function will return a specific value/result based on either what you asked it to look at/do/handle, and a method would specifically just carry out activities based on same types of input etc., and the use of the Return keyword is simply a form of standardised way of telling a method or function that the process has been completed, but if the function is meant to return an actual output value - as in isn't a void function, it'll then use the keyword to return it's output value. There are a set of books called: How to think like a computer scientist And there are around 5 different versions involving the use of learning to program from a very much beginners point of view, but making use of 5 different types of programming...LOL! Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' - Original Message - From: dark d...@xgam.org To: Gamers@audyssey.org Sent: Wednesday, March 24, 2010 8:57 PM Subject: [Audyssey] Bgt stuff that confuses me Hi. Having already read through the tutorial once, I stil find myself mildly confused on a couple of matters. Firstly, all the stuff relating to doubled short or long intagers and bits and bytes. I'm rather uncertain why or when I would want to use variables such as int8, double, or short which relate to the size of bits and bytes. Shorely, a number is a number and can be written as such? Secondly, I'm uncertain as to the difference betwene void functions and return result functions, and I must confess I don't follow this example: void main() { int x=add_numbers(3, 5); alert(Wow, 3 + 5 is... + x + !); } int add_numbers(int first, int second) { int result=first+second; I can see that the alert will write the text string with the int x, however, hasn't the (3 + 5), already produced the result of 8 for x? Also, I have absolutely no idea what the business involving int first and int second is all about, sinse how does bgt know what first and second actually mean? it seems this function is working with a lot of intagers which haven't been defigned successfully, but which work (I tried creating a secript with this and it printed fine). Any thoughts on this would be appreciated. Btw, sinse I'm interested in rpg games (and sinse I'm not exactly overflowing with useable sounds), I thought I'd begin by writing a basic text box turn based combat game similar to acefire. I can't promise anything astounding, but I'm hoping it'll be a good exercise for me if nothing els, and teach me something useful about Bgt. Beware the grue! Dark. --- 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. __ Information from ESET NOD32 Antivirus, version of virus signature database 4972 (20100324) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4972 (20100324) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --- 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.