Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - aab

Pages: [1] 2 3 ... 33
Discussion / Re: Question of what would be better...
« on: September 20, 2007, 09:32:18 pm »
Yeh, same.
Pressing a button is fine in turn style rpgs, but where the game is action based its a distraction that doesnt make that much sense.
When you walk off a cliff, you expect to walk off a cliff - but just in case the user only wants to walk to the edge etc, just have a 1.2 second delaye before jumping off: The user has to be pushing in the direction of the cliff for the duration of this count.

Entertainment / Re: XFire Tags
« on: September 20, 2007, 09:23:43 pm »

I'm missbathory in WoW, Darkmoon Faire usually.

Discussion / Re: I want to get some C++ books...
« on: September 20, 2007, 09:06:32 pm »
Nor use "C++ in 21 days", go for something with a tone that says it cares about actually working and not about getting sold.

Books can't teach you how to program in a language - Often in teaching programming, In order to explain how one thing works, a second thing has to be understood. In order to undertsand the second thing, the first thing is required.
The linear structure of a book makes this hard ..dynamically reading and learning little things yourself and joining them all together in your own mind might be slower for learning the basics, but for learning how it all works and fits together its good to get used to doing this.

Its also good to learn from as vast a variety of sources as possible, and practice yourself every little bit of code you come accross with each article you read either on the net or in a book (more sources, more styles, more approaches, more ideas, until understanding more compleely formulates in your head - its an implicit thing)
Youll have a rocky start and write alot of code that you'll later be embarressed about; Code that might even work well and do something excellent, but you took the hard route to get there.

Of course a book can be usefull; But don't look as a book as a from start to finish learning guide. Mess about with examples alot and mix them up by adding in your own things, observing.
Don't be discouraged by compiler errors, eventually you'll *almost* stop getting them at all. I got one yesterday i was horrified!

..When i first used C++ i can remmember getting hundreds and having no clue... Esp with other examples: Compiler and project settings can be the problem, its not always the code itself - be aware of that.

and join here:
Listen to everything myork says.
if someone disagrees with him, their wrong, its quite simple lol.

Ask questions when you need to; Dont be afraid. However aklways make sure you have messd about and tried *everything*  that you can think of to get things working; THAT is the crucial thing in learning to program, and youll go far fast if you do exhaust situations logically.

Coding / old tutorial on referencing
« on: September 18, 2007, 03:51:00 pm »

Old one that i did a while ago; Couldnt find it ona  search but someone asked about it so here it is again.

A simple tutorial on using an alias for a variable.

This is quite an early tutorial, however the last part 'mentions' security and efficiency of a class, and requires many months of phsycological C++'ing to go through completely.

There is ALOT to read through, but its seperated into chunks so if you only want to hear of a chunk at a time ok.
Ok..so the chunks each have alot to read through themselves... But it should read quickly as i analyse and explain in the detail that exists...
Some people say in detail, yes, but when i say the detail that exists... i mean everything.

Anyway, the chunks read fast, and theres no summary as the point is...after you read through this, you will never forget lol.

You may have already come accross the method of aliasing variables before realising other uses of it, in the form of a referenced parameter.

For that reason I'll refer to them as references (Also because my grammers horrible and im not sure how to use the word 'alias' properly).

Referencing Parameters (Most of you can read past this part)

   Assuming you can create a function, and pass parameters to a function:

   When you pass parameters to a function, you are giving it a value that it can use to vary what it does, and how it does it.
   Inside that function, there can be if statements and arithmetic operations which vary the results of the operations in that function:
   This is neat as you can use that function many times, and each time it will act slightly differently depending on how you want it to.

   So, eg you could make a function NewLines, that prints a new line the number of times you ask it to:
Code: [Select]

void NewLines ( int numNewLines )
for( int t=0; t<numNewLines ; ++t )

int main()
using namespace std;

int numberOfGaps = 5;

cout<< "start" ;
NewLines ( numberOfGaps ) ; //print 5 new lines
cout<< "end" ;

return 0;

      The parameter in the function (eg: numNewLines) is a new variable, created inside that function, for its use only.
   When you call the function and pass a parameter (eg: NewLines( numberOfGaps ) ), it makes the new variable in the function, and makes its value equal to the variable you pass, at the very start of the function.
   /*Strictly, It doesnt eg go 'int numNewLines=numberOfGaps;' when the function is called, however for standard variables (int,float,double etc) the effect of what it does do is the same.*/
   However, because the parameter in the function was only made equal to the variable passed to it at the start of the function, any changes to the variable inside the function, arent going to affect the variable outside the function. The functions variable only copies the value of the passed variable: They are not the same.

   But what if you wanted to get some value back from the function?
   Well you can return ( assuming you know what that is: If you dont you dont
   need to to understand this section of this tutorial ).
   Unless you return some sort of object, or a value with a meaning to you (eg: if(1) doA() else if(2) doB() else.. ) your limited here, until you learn that you can reference parameters.

   This is where references are usefull:
   Referenced parameters are actually the same as the variable that is passed into the function:
   They may have a different name, but as long as they are the same type, its compiles.
   Therefore changes to the variable inside the function, are changes to the variable outside the function.
   Thus, this variable can be called an 'alias' (Same thing, but different name);

   This type of parameter can also be called a 'reference', because it 'references the location of the parameter passed to the function', wheras a normal parameter (eg: int numNewLines) creates a new variable in a new location, and copies the value from the passed parameters location into its location.

   The syntax for a referencing parameter is to put an ampersand inbetween the typename and the variables identifier.
Code: [Select]
void MyFunction ( int & parameter )
// [b]. . .[/b]
   The '&' symbol, when placed infront of a variable (not inbetween two variables) means 'address of'.
   Lets look at that again, with 'address of' in place, to see how much that makes sense: void MyFunction ( int address of parameter )
   If youve used pointers
      Youll see this healthily makes the same sense as it does when assinging a pointer to a variable:

         int x;
         int*px = &x; // px = address of x;

      In addition, note the reverse of using '*'.

      '*' infront of a variable (not inbetween two variables) means 'whats at the address'.
      Such that you can (continuing from above) go:
         int y = *px;   // y = 'whats at the address' px  // same result as going y = x;

      And when declaring pointers:

         int 'whats at the address' pointer;
      See?.Pointer syntax is incredibly sensible.

      If you have used pointers, youll already know that you could use pointers to do the above, eg:
Code: [Select]
void MyFunction ( int * aparameter )
*aparameter = 34;
// [b]. . .[/b]
      But what if someone calls this like so: MyFunction(0)
      Well, the best possible thing that could happen is the program crashing at runtime.
      You could add in a check that it wasnt 0...But still someone could pass any number
      in, C-cast to a pointer.
      So, by using references, the function is safer, easier to use, and easier to write.

   So now, you can make a function that changes the values of its parameters.
   So for example:
Code: [Select]

void DontMakeFive( int x )
x = 5;

void MakeFive( int &x )
x = 5;

int main()
using namespace std;

int value = 32; // value is 32

DontMakeFive( value ); // wont do anything as the 'x' in that function is just a copy.

cout<< value ; // =>this will print out '32'

MakeFive( value ); // will change values value.

cout<< value ; // =>this will print out '5'

return 0;

   Something you cant do:

   You couldnt call the above like so:

   MakeFive( 45 );

   This is self explanitory of course...You cant make 45, 5.
   In particular, because 45, written into your program, is not a variable: Its a literal value embedded into your compiled code.
   Its not like you can go 45 = 5;

Variable Reference (within same function)

   A declared variable can actually be a reference, and be made '=' to another when declared. In doing this, the two variables are the same, but there are two names for this variable. Several languages dont allow this kind of thing. You can write utterly occluded code, eg:

      x = 5;
      y = 10;
      cout<< x; //prints 10, not 5. lol....How Evil.

   Thats the very minimal of the evil that you can accomplish in C++...But in programming, writing good code is more fun, so well think about how this is usefull.

   This referencing variable is created like so:

      int x;

      int &also_x = x;

      //      eg:
      cout<< also_x;

      This is an 'implicit' property: There are very many in most programming langauges.
      What i mean by 'implicit', is that the what you have written doesnt explicitly compile as it is (ie its the opposite of 'explicit').
         ie: the compiler will do things <to the copy of the code it makes for compilation>.
      You can think of the compiler implicitly replacing 'also_x' with 'x', and then removing your line of code 'int &also_x = x;' before it compiles to the final object code that can be run by the computer;

      The compiler will also do these kind of things for constants and enumerates eg:
Code: [Select]

int player_health;
const int max_health = 20;

[b]. . . [/b]

//make players health maximum:

player_health = max_health; //v will be replaced with 20

         You can see constants like that are usefull, as if you wanted to change max_health, you wouldnt have to go through every time you used it, and change it to the new literal value (eg 22 ).
         Its also alot more meaningfull.

         But why would you want to reference a variable?
         I mean...You already have the first one..Whats the point.

         Well..You could sometimes use it to make code thats more readable, or uses less variables

         For example, say you had a file, with someones age, then someones height (as ints), and wanted to print them out:
         //Just pretend ive int main, and #include< using namepacce etc:
Code: [Select]
int read_value;
ifstream file( "john.txt" );

cout<< "John is " <<read_value<< " Years old ";

cout<< "and is" << read_value << "cm tall";

         Well, thats ok, but read_value is not a very meaningfull variable name. Ok so who cares in that tiny little snippet of code, anyone can read the next line and see what its being used for. But what about a massive program, with a great deal of reads and outs, and not much meaning around that code?
Code: [Select]
ifstream file( "john.txt" );

cout<< "John is " <<johnsAge<< " Years old ";

cout<< "and is" << johnsHeight << "cm tall";

         hmm...I liked it better the other way as you only had one variable..Now there are two. Duh that thats not good.
         So..Reference anyone?
Code: [Select]
int read_value;
&johnsAge = read_value,
&johnsHeight= read_value
ifstream file( "john.txt" );

cout<< "John is " <<johnsAge<< " Years old ";

cout<< "and is" << johnsHeight << "cm tall";

         Of course, there still exists the possibilty of confusion by someone later on changing one and not realising the change on the other...
         So, you *could* use a confinement on the variables access space:
Code: [Select]
int read_value;

ifstream file( "john.txt" );

int &johnsAge = read_value;
cout<< "John is " <<johnsAge<< " Years old ";

int &johnsHeight= read_value;
cout<< "and is" << johnsHeight << "cm tall";

         A rather simple and slow example that was i suppose....But now lets think about it when weve a large program with lots of nested classes, and we want to do something like:
Code: [Select]
for(int t=0; t<GameEngine->GameArea->tiles[player->Body.Layer].num_tiles(); ++t)


pnt.x = GameEngine->GameArea->tiles[player->Body.Layer][t].x;
pnt.y = GameEngine->GameArea->tiles[player->Body.Layer][t].y;

if( PtInRect(&CloseRect,pnt) )


//and so on.....
         //Pretend you dont know about efficient address iterating if you do.
         Well...thats repeating something...Hard to read..ugly.
         Lets do this instead:
Code: [Select]

MyTileGrid & tileList = GameEngine->GameArea->tiles[player->Body.Layer];

for(int t=0; t<tileList.size(); ++t)

if( tileGrid[t].CollType)

pnt.x = tileList[t].x;
pnt.y = tileList[t].y;

if( PtInRect(&CloseRect,pnt) )


//and so on.....
         Much better, wouldnt you agree?
         And ill bet some of you will look at the first one adn go: "Whait..maybe tommorw..or next year or something" But, if you saw the second version in an example, you'd be ok.

         Another thing to note: A reference must be initiated with a variable to reference.
         Is illegal because x has no variable to alias...nothing to be replaced with.

References in a Class(Youll need to know more than the above for this stuff)

   A class can have a reference member.
   However, remmember that a reference must be initialised with a variable to reference.

   You must therefore pass a variable to the classes constructor, and this must be assigned to the reference member on its initialisation, which can only be done through the implicit constructor initialisation:
   If youve not done that yourself, youll have to find its explanation somewhere else for now.

Code: [Select]
class my_class
int &reference_member;


explicit //if you dont know why this is here : It stops the compiler using this constructor for casting an integer to my_class (eg you could go instanceOfMyClass = x; and it wouldnt mind.
reference_member( to_be_referenced ) //'reference_membe' initialised with the variable 'to_be_referenced'

   There are situations where this can be usefull, and its again safer than using pointers.

   Now...Lets consider a class referncing its own members:

Code: [Select]
class my_class
int &reference_member;
int member_to_be_referenced ; //I dont support variable names this long but ..just an examplifying name.


reference_member( member_to_be_referenced ) //'reference_membe' initialised with the variable 'to_be_referenced'

   Not much point...
   There may be a little point in doing something like this i suppose:
Code: [Select]
struct color

red ( samples[0] ),
green ( samples[1] ),
blue ( samples[2] )
alpha ( samples[3] )
   This would allow someone to use this color class in various ways easily.

   But heres something nice and usefull.

   You know how it can be annoying..writing a get function for all these variables in your class, just so that is safer (people not being able to change data and such that would compromise the integrity of the class), just return a copy of the values they want to know:
Code: [Select]
class my_class
int a,b,c,d,e,f;
inline int geta()const{ return a;};
inline int getb()const{ return b;};
inline int getc()const{ return c;};
inline int getd()const{ return d;};
inline int gete()const{ return e;};
inline int getf()const{ return f;};
   Now that not might be that ugly in that example, but if a,b,c,d,e,f are all different sizes, its a mess to read.
   Well...A public const member could be accessed from outsid the class, but wouldnt be allowed to be changed.

   So...What about a const reference to that member instead of a get function?
   Seems very sensible doesnt it?
   You want the person to access the values, but withought changing them, and thats exactly what it would do.
   It would replace the refernces name with the refferred, but not allow the user to change it.

   So, for example:
Code: [Select]
class my_class
int a,b,c,d,e,f;
const int

const_a( a ),
const_b( b ),
const_c( c ),
const_d( d ),
const_e( e ),
const_f( f )
   Does that not make you happier?

   You could always make it very small and simple, like:
Code: [Select]
class my_class
int a_,b_,c_,d_,e_,f_;
const int &a,&b,&c,&d,&e,&f;

   However naming the members const_a is a good idea as it tells the user of the class that its const.
   geta would always be immediately thought of as a function...
   Ill leave the dilemma of how to name these things up to you.....

   Final thing to mention, is that to remmember to consider what happens when the default
   copy constructor and operator= are called.
   The references would be muddled up, referencing variables from the other class, so the compiler,
   in making sure this is recognised, doesnt create a default operator=() or copy constructor.
   Simply define them yourself, withought equating the refernces of course.

Oh and btw....This is all my own heuristic observation so feel free to comment. But i trust myself.

Other Discussion / Re: I just bought two pair of girl's pants
« on: September 18, 2007, 01:58:24 pm »
Yeah, I regularly wear a kilt, so I guess I'm at the total opposite end of the spectrum here, lol

Kilts are the comfiest, and totally the best thing for the balls too..

..Well, i suppose, you don't wear it true do you? (don't answer that)

Where'd you get the kilt and how much was it? (unless you have more than one, but jesus their expensive crafted things)

LTTP & FSA / Re: [Request] LTTP grass and water overlays
« on: September 18, 2007, 01:55:09 pm »
Use whatever you like, dont worry about anything.
Anything purely zelda i ever do is for all.

Other Discussion / Re: I just bought two pair of girl's pants
« on: September 14, 2007, 07:42:58 pm »
I know! But for the ladies to notice us, we got to cram our genitals into tighter jeans. :S

That and stay skinny and work out...

Not always true.
Many girls like some sort of meat, something to hold onto, and exposed ball shapes and ass lines don't work for many girls; Baggy jeans can be hawt.
Your more likely to pick up a guy.

LTTP & FSA / Re: [Request] LTTP grass and water overlays
« on: September 13, 2007, 10:08:26 pm »
On Here somewhere:

Entertainment / Re: HELP PLEASE!
« on: September 11, 2007, 01:19:51 pm »
Naah, just some sort of electromagnetics, kinematics, one of those kinds of things ..er..
Its like magnets! There ya go!

What type of bridge is it? Can you explain more about whats happened?
Either the strings popped out, snapped, or if its a fixed bridge has it ..somehow disconnected and popped around the side O_O ? Or has part of the bridge come out O_O? Imagine that!

Entertainment / Re: I got Double Bass-drum foot-pedals!
« on: September 11, 2007, 01:14:21 pm »
Trying to catch up with Flo Mounier?

The Sound is good, which is what you were recording anyway.

<3 double bass.

why can't people spell cymbal :'(?
Why can't people be intelligent enough to understand the lack of significance in pretention whereby expressing their strict 'intellectual' correctness they fail to forsee their below average emotional intelligence? (emotion being everything in significance to the psyche).

Wtf? How did you fap off in class!? :S

Er- nevermind. I don't really want to know.

But you do! I wore a jacket, pulled my arm inside my shirt and my jacket, stuck my hand in my pants, and you finish this story.

Where did the output go? And how big is that jacket jeeez? ..Don't tell me.

If it is good for you because it gets your heart pumping, then just go and do crazy stuff.
Go bungie jumping.  That adrenaline will get your heart pumping.  Or go sky diving.
Welcome to class, kids. Today we will determine whether the equation (Hr x Boobies ÷ y) x win is greater than, less than, or equal to (Hr x Bungee Jumping ÷ z) x lose. We will let y equal the price of staring at a woman's chest, which we have determined to range from $0.00 - $5.97, the cost of a small tub of bruise cream in the event you are the recipient of a sharp slap across the cheek. The mean of zero and 5.97 is found to be approximately 3, so we will let y equal 3. We will let Hr, heart rate, be a constant value, thus we may cross it out of the equation. Boobies, which can be calculated as win x 2, is, divided by 3, (2/3 x win). (2/3 x win) multiplied by win is equal to (2/3 x win2). Now we can calculate the result of (Hr x Bungee Jumping ÷ z) x lose. As Hr has been excluded from our equations we are left with (Bungee Jumping ÷ z) x lose. We will let z equal the price of one jump, approximately $45 - $150, the mean of which is approximately $98. To calculate the value of bungee jumping, we will assume that Bungee Jumping =  win ÷ hassle, or Bungee jumping = win ÷ 2. So our equation stands - (win ÷ 2) ÷ 98 x lose. The quotient of win and lose is always 1, so the equation can be simplified to 1/2 ÷ 98, which we find to be approx. 0.005.

We are left with the following: (2/3 x win2) > 0.005. Staring at boobs is obviously preferable to bungee jumping as a form of heart stimulation.
Yes but the amount of time you are on a adrenaline rush is longer than staring at someone's rack.  You don't get that butterfly adrenaline looking at someone's boobs.  You do not get that"Maybe I shouldn't do this" afraid mentality.  You get a moral or fear of getting caught mentality.  !@#$% go out and try to rob something.  You'll get a rush from that.
And sometimes it can even be that that gets you up.
I wouldn't be a very good criminal :P

Other Discussion / Re: I just bought two pair of girl's pants
« on: September 11, 2007, 12:22:07 pm »
I've heard that tightness is bad for sperm production; Or rather that free motion and natural swinging aids growth and sustainability.
But the miscomfort with less tight things is that you can sometimes experience..twist, crush etc as you sit.
Tighter stuff sorts this out, keeps em up in place.
Youve gotta weigh the real functional advantages and the disadvantages here people before even caring about the aesthetics.


...Or more likely your own face..

..I mean what happens when the tape falls off?

Well, how big is the warehouse?
If there were too many children such i was standing on a sea of them, most of them would die in the chrush and panic.
I would only have to deal with the few capable of breathing around my side.

They would soon break my legs, but this is about how long i can survive.

Headbutts (From Glasgow, never underestimate the natural skill of the glasgow kiss), elbows, punches, simple clicking of the thyroid cartilidge..
Remmember, pain is a very significant thing to them.. You dont need to kill them, just make them cry; And then kill them when their down.

Thousands i say!

Entertainment / Re: Whats your favourite genre/genres of music?
« on: August 16, 2007, 09:58:33 pm »
Post your favourite genre or genre's of music here.

I like Punk,
Classic rock,
Death Metal, (only certain death metal bands )
and probably some more, I like lots a music XD

Only certain death metal bands? Obv you don't like all of metal, indie, other(which is lol), alternative, rock, classic rock etc...
So which death metal bands? Or is it say a subgenre, like you like technical and not gore?
Or (sorry to say if not) (considering half the people who think their listening to and/or playing death metal have no idea what it is and are simply shredding over laborious progressions over some minor scale while growling at a medium high, distinguishable voice) is it death metal bands that aren't actually death metal?

However, I definitely have favorite genres. I have a soft spot in my heart for power metal especially :D
:) Power on!
Same here.. Listen to Rhapsody, Angra and Wintersun every single day.

Glad to see no 'HardXCore' or 'DeathXCore' or any of that scene bollocks. Oh, and nothing that BMTH can fall under *shudders*
Its not all !@#$%.. Just 90% of them are money and girl lusting talentless uncreative arseholes regurgitating the same thing that one amateaur band got famous doing before they developed muscular and throat injuries in 1993 from their lack of skill...

Ok, let me try this, non significance to ordering;
Genres (so far):
Glam Rock
Blues Rock
Hard Rock
Doom Metal
Stoner Metal
Sludge Metal
Classic Rock
Country Rock
Folk Rock
Melodic Death Metal
Swedish melodic death metal named hardcore thrash (think gothenburg, basically this started both the above and the below)
Metalcore (not the !@#$% stuff, too much is all the same, !@#$% wanna get some creativity and self respect).
Post hardcore (same as above)
Power metal
Progressive Metal
Progressive Rock
Post Rock
Black Metal
Death Metal
Technical Death Metal
Brutal Death Metal
Gore Metal
Thrash Metal
Technical Thrash
Groove Metal
Post Thrash
Neo Classical Metal
Heavy Metal (aka classic metal, true metal)
Guy told me Arcade Fire are Chamber rock.. Guess i listen to that too then just a bit (one band, yet!)
Pop Rock.
Arena Rock
Well known Punk (that is to say, i haven't looked much, or at all myself! bands that have been handed to me basically).
Pre thrash speed metal (where punk and heavy metal made love to many beautiful children of the 80's! Although the 90's is the best for metal no question)
Extreme power metal aka power metal with harsh vocals and a consistent theme (think late 90's finland)
Epic Metal
Gothic Metal
VIKING METAL :) Its as real as you and me!
Alternative Metal (where appropriate :P)
Alternative Rock
Avant Garde Metal
Hip Hop (only the gud oldies!)
Video game music!
Instrumental Rock
Instrumental Metal
Folk Metal
Symphonic Metal
Symphonic Rock
Grindcore (yes, their different!)
Blackened Death Metal

And also, whatever Daft Punk are, and what the Yeah Yeah Yeahs are, though only just (one band).

My absolute favs are Symphonic Power Metal, Viking and Folk influenced Progressive extreme Power Metal, Black Metal, Brutal Technical Death Metal.

Other Discussion / Re: Ask a Scotsman
« on: August 15, 2007, 09:32:34 pm »
What is this, youtube?

I was joking, see the "Ill answer truthfully! honest!" followed by direct obvious lie?

and Ned = Non educated delinquent to some....

Though not the collins ENGLISH dictionary.
..Consider, i am Scottish.

Other Discussion / Re: Ask a Scotsman
« on: August 14, 2007, 06:12:06 pm »
What about me?
And where are the questions?

Ill answer truthfully! honest!

I just killed a haggis in the ginger mushroom forest today, you can ask me about its interiors.

And Sheldon, your such a N.E.D

Discussion / Re: How Do you...
« on: August 13, 2007, 03:47:17 am »
You could use the J2ME wireless toolkit. Theres a mobile phone emulator that basically looks like a mobile phone as youd expect.
Its all real easy, links to a good command reference i think, but you always have to be aware of your limitations of course, specially with space.

Other Discussion / Re: Ask an Englishman
« on: August 13, 2007, 03:14:45 am »
... nope, not unless overdramatizing something, like Confused said. However, I am holding a campaign to put the words naught and yonder back into common use.
Don't forget heed, and the tolkien style usage of 'save'.

Crumpets are like pancakes but slightly more savoury with a slightly more rubbery texture and large pores spread throughout.
They are both somehow drier and more moist than pancakes; Try them to understand.

Other Discussion / Ask a Scotsman
« on: August 13, 2007, 03:08:51 am »
Go, ask.
Here to seperate the legends, the myths, the facts...

For example, i am neither drunk nor ginger, but i love whisky and have a ginger beard.

Pages: [1] 2 3 ... 33

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved

Page created in 0.036 seconds with 31 queries.