• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • beginning C# for cc developement

    Discussion in 'Archives' started by bloodlove, Apr 15, 2010.

    1. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      ok i am redoing this for honorbuddy 2.0 so here is the new deal all members in honorbuddy 2.0 must have the override command in their declaration such as

      Code:
      public override void combat()
      {
      // code goes in here
      }
      
      i will not explain what overriding is as that is a complicated and advanced topic of programming just accept that you have to do it period
      beforewe begin i want to explain a few points of knowledge you may find usefull

      http://msdn.microsoft.com/en-us/library/yzh058ae.aspx
      this is from Microsoft they offer a lot of utilities to help you understand the language you are working with

      alright variables are another item variables are declared singularly or in multiples you can only declare multiples of the same type
      example

      Code:
      int var1 = 0,var2 = 12,var 3;
      // a integer is a 32 character numeric variable meaning it can accept 32 numbers in it imagine variables as containers that you put whatever you want in them
      bool useSpell1 = 0, useSpell2 = 1;
      /*this is a boolean variable it has 2 values 0 which is false and 1 which is true and also accept these as overloads which means instead of you typing  bool useSpell1 = 0
      you can instead type bool useSpell1 = false
      */
      string sayThis = "this is what i want it to say"
      // a string is a alphanumeric variable meaning it accepts prettymuch any unicode character you can think of and if you reach the limit of string then your doing something horribly wrong
      
      ok now in this simple priest routine we are going to use global scope. scope is the range in which you can use a variable.
      Scope is very important because it can make or break a large program for what we are doing the overhead it creates keeping them all globaly
      will not matter. scope is difficult to explain because you have to understand parent child relationships and is also altered by access modifiers public protected private so on and such.

      to globally declare a variable it needs to be declared outside of a member and in the parent class.
      example:

      Code:
      using blah;
      using blah1;
      using blah2;
      using blah3;
      
      public class priest : CombatRoutine
      {
          int var1 = 0; // <---- this is global
      
          public override void combat
          {
              int var2 = 2; //<----- this is not global but because this member of the class is public the other members of this class can call this integer. point still is it is not global
          }
      
          string strOutput = "i am global nuff said"
      
          public override void heal()
          {
          }
      
      }
      
      ok the string that is declared is still global because it is declared outside of any member and in the class.
      I strongly suggest keeping all your variables in one area to avoid confusing spaghetti code (a mess of code strewn everywhere).
      this will save you headaches if something goes wrong and this gets alot more complicated.

      also keep in mind the best programmers are lazy programmers. why you may ask?
      the answer is simple, because we want to do things as easily as possible with the least amount of code, while still keeping things well organized and dynamic.
      hard coding is bad in my opinion if you are loading a method with a hard coded value your doing something wrong.
      sometimes hard coding is unavoidable but it is rare and means most likely if you can not figure out another way you need to ask for help from a senior dev.

      ok, so here is a crash course in c# development what you will need is:

      MS Visual Studio C# express get it here - http://www.microsoft.com/express/Downloads/#2008-Visual-CS

      patience and the ability to read.

      ok to start lets start with a basic form open up vs go to file>new>project a window should appear select class library

      after you have done that it will think do some other stuff and show a blank code space

      alright on the right side of your screen you should see a item called solution explorer if you do not go to view and click solution explorer under that menu

      ok this is the project file you are working on here and its elements . here there should be a gray looking folder that says references right click that folder. Select add reference and there should be tabs at the top of the popup window that appears. The 4th tab should say browse click it and direct the file picker to where you have honor buddy loaded.

      there will be some ddl's there select those dlls using the ctrl button and then click ok.



      Part 2

      ok now to provide a basic template with the basic members that are required by honor buddy dont worry what members or methods are yet just go with it

      Code:
      code is coming patience
      
       
      Last edited: Apr 21, 2010
    2. LiquidAtoR

      LiquidAtoR Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,430
      Likes Received:
      52
      Trophy Points:
      48
    3. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      accident sorry
       
    4. Tony

      Tony "The Bee" Staff Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      128,834
      Likes Received:
      571
      Trophy Points:
      113
      moved(filler)
       
    5. khurune

      khurune Member

      Joined:
      Jan 15, 2010
      Messages:
      836
      Likes Received:
      4
      Trophy Points:
      18
      While the link you quoted is ok, I think bloodlove is planning on adding alot more gurth to the guide as in, how to x or why x does x ect... It'll be good for those that actaully don't know what there doing like me.

      @bloodlove take ya time, Am gonna keep checking back on this and see if it helps me.
       
    6. butane

      butane New Member

      Joined:
      Mar 8, 2010
      Messages:
      516
      Likes Received:
      1
      Trophy Points:
      0
      looking forward to this!
       
    7. kingv

      kingv New Member

      Joined:
      Jan 15, 2010
      Messages:
      32
      Likes Received:
      0
      Trophy Points:
      0
      This looks like it will be a good guide when he gets it done, I even dl'd the C# express so I am ready to go.
       
    8. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      bump bump bumpity bump more added fot variables and moving into scope
       
    9. Nomfather

      Nomfather Member

      Joined:
      Jan 28, 2010
      Messages:
      440
      Likes Received:
      3
      Trophy Points:
      18
      Lookin' good matey, thumbs up.
       
    10. matt01ss

      matt01ss New Member

      Joined:
      Mar 2, 2010
      Messages:
      56
      Likes Received:
      0
      Trophy Points:
      0
      Love the motivation



      What I would like to see is a description of all the methods required to run a proper CC. I've seen there are sections for pulling, healing, attacking.. etc. The thing I'm not sure about is the basics of what is within a CC and what are the baseline methods and properties needed.
       
      Last edited: Apr 16, 2010
    11. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      matt that will all be covered
       
    12. Synik

      Synik Active Member

      Joined:
      Jan 30, 2010
      Messages:
      995
      Likes Received:
      42
      Trophy Points:
      28
      Would it not be nicer to have them learn C before throwing them into C#.
      I know C is not a required learning before going into the likes of C# or C++ but I was always told learning C even as a crash course meant for smoother and cleaner transitions into other derivatives of C.
       
    13. khurune

      khurune Member

      Joined:
      Jan 15, 2010
      Messages:
      836
      Likes Received:
      4
      Trophy Points:
      18
      While I agree with your comment, I must return that the avg CC only uses a very small part and is for most of repeated through out the CC with just slight changes (IE Spells) So just a basic crash course into How CC's are written and what method class object ect.. Is required, this would give people enough information for them to pick up and understand how the CC is written and Why x does x and not y. (Just my opinion thou)
       
    14. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      c is useless when it comes to .net c# as the only thing it helps you with is a common understanding of data types and accessor types thats it which any anguage can do. understanding c con-volutes the ability to learn c# as you try to relate non relational information between the 2.
       
    15. Synik

      Synik Active Member

      Joined:
      Jan 30, 2010
      Messages:
      995
      Likes Received:
      42
      Trophy Points:
      28
      Ah okay fair enough.
      I was always told to learn C before any of its derivatives which is what I camp currently doing but I suppose you guys are right and getting into C# or C++ briefly will not hurt. :)
       
    16. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      updating for honrbuddy 2.0 will be redoing the .cs file template here in a few moments (bump)
       
    17. CodenameG

      CodenameG New Member

      Joined:
      Jan 15, 2010
      Messages:
      38,369
      Likes Received:
      231
      Trophy Points:
      0
      you might as well learn Html, or Basic, or PHP, any other programing language, (yes i know html is a markup language) but all of them have the same basic principles.
       
    18. butane

      butane New Member

      Joined:
      Mar 8, 2010
      Messages:
      516
      Likes Received:
      1
      Trophy Points:
      0
      Why? Strange comment.
       
    19. bloodlove

      bloodlove Member

      Joined:
      Mar 27, 2010
      Messages:
      91
      Likes Received:
      1
      Trophy Points:
      8
      because he is the gman lol he was referencing a previous comment lol
       
    20. butane

      butane New Member

      Joined:
      Mar 8, 2010
      Messages:
      516
      Likes Received:
      1
      Trophy Points:
      0
      oh lol, makes more sense
       

    Share This Page