Page 3 of 3 First 123
  • Jump to page:
    #31
  1. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    Alright. Many programming languages have multiple ways of defining numbers: decimal, hexadecimal, binary, octal... Which of those do you want to support and how should they look? Remember to define them in a way that you can still discern them even if they consist only of 1's and 0's.

    You can't say that
    F1B2D3 is hex because
    123456 could also be hex.
    _______________________

    Also since you have no visible end to a statement and considering you're pretty much following VB I assume that statements are terminated at line end. Is that right?

    If so do you provide a way to make one statement span multiple lines?
    _______________________

    When you've got that all you can start with a first coding exercise: Write a program that reads a text file and checks every line if that line is a valid number (according to your definitions above).

    ie:
    123456 ... number
    12.456 ... number
    foo ... not a number
    bar 1 ... not a number
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  2. #32
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    43
    Rep Power
    0
    Many programming languages have multiple ways of defining numbers: decimal, hexadecimal, binary, octal... Which of those do you want to support and how should they look?
    Decimals. (Easiest)
    Exactly like:
    10.01
    10
    1.001
    1.01
    1
    0.1
    0.01
    0.001

    And so on...

    Also since you have no visible end to a statement and considering you're pretty much following VB I assume that statements are terminated at line end. Is that right?
    Yeah, quite right.
    It is quite similar to VB

    But maybe an starting and ending statement:

    {
    Your Code here
    }

    { = starting
    } = ending

    If so do you provide a way to make one statement span multiple lines?
    Code:
    String as [SpanMultipleLines]
    SpanMultipleLines = $Duplicate_Number
    
    While SpanMultipleLines;
    A statement here...
    1 <code here>
    2 <more code here>
    3 <even more code here>
    4 <some more code here>
    End SpanMultipleLines
    $Duplicate_Number = Statement duplicating into multiple lines

    Code:
    You then add while [var name];
    A state ment here.
    Code here, numbered like:
    
    If Thisbuttonpressed Then
    1 Msgbox "Hello"
    2 Msgbox "Hello Again"
    3 Msgbox "Hello Again Again.."
    So on...

    Is that correct span multiple lines cause i don't really know ; just give me any example of a correct span multiple lines.

    When you've got that all you can start with a first coding exercise: Write a program that reads a text file and checks every line if that line is a valid number (according to your definitions above).
    Are you suppose to write a program on visual basic or visual c++.

    If it is Visual Basic, please give me come code for it. If it is C++ then i need code for C++.

    Write a program that reads a text file and checks every line if that line is a valid number
    How do you do that?
  4. #33
  5. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Location
    Auckland, New Zealand
    Posts
    4
    Rep Power
    0

    Arrow ONLINE Tutorials


    Originally Posted by Buzzy661
    I started reading "The Programming Language Wiki" and i read First Steps and it says you need to have a game programming language and game engine.

    I want to know how to make my own game engine and my own game programming language, but if someone gives my any help of making my own programming language or game engine, i can proceed on reading!

    What program could make my own program language, like C++ or vb but i want to make my own!

    Please, i need help!

    There are actually so many Online Tutorials in making your own program.

    I used to do Online Tutorial when i was in college
    and i used it in our thesis project..
    You just have to be very patient i reading the guidelines..
    and also, it is also important to get info from Programming books ....
    Books are still helpful...

    But assistance from experts is the best solution...
    So how is it?
  6. #34
  7. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    Originally Posted by Buzzy661
    Decimals. (Easiest)
    *snip*
    No. In Java an C# you have to possibility to write numbers in multiple ways. When you have something like an amount, a speed or something else like that to define Decimal format is fine but sometimes want to define a bit pattern or a long series of bytes. Many programmers prefer to write such things in hex or binary format and this is how it looks:
    java Code:
    int somenumber = 1234;
    byte[] somebytes = new byte[] {0x1a, 0x2B, 0x3c, 0x4d};
    short somebitpattern = 0b1100100111001110;

    If you want to have the same options you need to define it. As for the way java does it note how every hex or bin number starts with a zero and then the x or b. With this trick the parsing is simplyfied because everything that is a number starts with a digit...

    Originally Posted by Buzzy661
    Is that correct span multiple lines cause i don't really know ; just give me any example of a correct span multiple lines.
    Sometimes you write a statement or expression that gets really long. It can help readability if you break it into multiple lines. In C# or Java that is no problem since a statement is not finished until a semicolon is encountered. See:
    java Code:
    integer result = MyUtilClass.difficultCalculation(this.value1, this.value2, this.value3 > THRESHOLD ? Math.floor(this.value3) : Math.ceil(this.value3));
    integer result = MyUtilClass.difficultCalculation(
            this.value1,
            this.value2,
            this.value3 > THRESHOLD ? Math.floor(this.value3) : Math.ceil(this.value3)
    );

    This is not so much a technical problem but a readability issue. It helps readers determine where a new statement starts. If you don't have a visible statement terminator I would help if you specified a visible statement connector. I believe that VB uses the _ to indicate that the statement is continued on the next line. It should work without it too though.

    Originally Posted by Buzzy661
    Are you suppose to write a program on visual basic or visual c++.

    If it is Visual Basic, please give me come code for it. If it is C++ then i need code for C++.
    Just pick whatever language you feel most confident in. Look for tutorials on how to read files and give it a try.
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  8. #35
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    43
    Rep Power
    0
    Originally Posted by Hugh of Borg
    java Code:
    int somenumber = 1234;
    byte[] somebytes = new byte[] {0x1a, 0x2B, 0x3c, 0x4d};
    short somebitpattern = 0b1100100111001110;
    Yes, quite similar to my script, all you write is:

    Code:
    Integer as [Somenumber] = 1234
    Byte as [Somebyte] = {0x1a, 0x2B, 0x3c, 0x4d}
    Short as [Somebitpattern] = 0b1100100111001110
    That is how you define some sort of decimal in the my script.

    Originally Posted by Hugh of Borg
    java Code:
    integer result = MyUtilClass.difficultCalculation(this.value1, this.value2, this.value3 > THRESHOLD ? Math.floor(this.value3) : Math.ceil(this.value3));
    integer result = MyUtilClass.difficultCalculation(
            this.value1,
            this.value2,
            this.value3 > THRESHOLD ? Math.floor(this.value3) : Math.ceil(this.value3)
    );
    Code:
    {
    Integer Result = MyUtilClass.DifficultCaculation;
    [value1, value2, value3 > THERESHOLD ? Math.floor (value3) :: Math.Ceil (value3)]
    Integer Result = MyUtilClass.DifficultCaculation(;
          Value1,
          Value2,
          Value3 > THERESHOLD ? Math.floor (value3) :: Math.Ceil (value3)]
    }
    That is the basic code when you write a statement and it gets really long (on my code).

    And to indicate the continuing the next line, this uses a ; function.

    Just pick whatever language you feel most confident in. Look for tutorials on how to read files and give it a try.
    What websites do you look on to find these websites?
  10. #36
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    43
    Rep Power
    0
    I believe that VB uses the _ to indicate that the statement is continued on the next line. It should work without it too though.
    I tried using it without a _ but it said an error so I had to put in the _ in.
  12. #37
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    64
    Rep Power
    11
    I don't mean to be funny or anything... But you clearly do not understand the amount of time, effort, skill and patience you must have in order to create YOUR OWN programming language...

    You would be far better learning a simple language like BASIC (Perhaps Visual Basic? Or heck, if you really want to make a game, checkout DARK BASIC) and building your own framework on top of it.

    I have gone through this entire thread, and you seem to assume that all this is going to take is for someone to send you a list of lines to paste into notepad, tell you what compiler to use, make some adjustments and there you have it...

    In your second to last post you gave an example of how a snippet of code would look in your language, but you even included the same class and method calls... (Math.Floor for example)

    I respect Hugh of Borg for trying to help you achieve your goal, but I really do not feel your quite aware that what you are attempting to do is incredibly difficult for even the most skilled of programmers...

    To make your own language, your going to need a very thorough understanding of C/C++ or some other low level programming language... Which kind of defeats the purpose of creating your own, because by the time you have enough knowledge to actually make your language, you might as well just create the game in the language you learned...
  14. #38
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    43
    Rep Power
    0
    I'll try to learn C++ by reading some tutorials, which I need to google-up to find some tutorials on C++..
  16. #39
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    64
    Rep Power
    11
    Originally Posted by Buzzy661
    I'll try to learn C++ by reading some tutorials, which I need to google-up to find some tutorials on C++..
    That's probably the best idea.
  18. #40
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2009
    Posts
    7
    Rep Power
    0
    I agree with him but i doubt it will happen
  20. #41
  21. No Profile Picture
    Turning coffee into code
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Location
    UT Austin, TX
    Posts
    164
    Rep Power
    94
    Originally Posted by TomGlenn
    I respect Hugh of Borg for trying to help you achieve your goal, but I really do not feel your quite aware that what you are attempting to do is incredibly difficult for even the most skilled of programmers...

    To make your own language, your going to need a very thorough understanding of C/C++ or some other low level programming language... Which kind of defeats the purpose of creating your own, because by the time you have enough knowledge to actually make your language, you might as well just create the game in the language you learned...
    I too have great respect for people with that kind of patience (Hugh of Borg).

    I've been in commercial development for over a decade, professional game development for 5 years, and compiler/language/runtime implementations for 2 years. At this point, I can do a decent job of identifying strengths and weaknesses of languages, but there is no way in hell I'd try to create my own language with any expectation of utility.

    For games, the programming language and game engine need to provide the following:
    * Efficient use of computational resources (the CPU) - need a well established compiler among other things
    * Efficient use of space (consoles have significantly limited memory compared to desktops) - this removes several functional languages from the table
    * Elegant support for event-driven and data-driven programming paradigms

    Edit: I'm really torn on what to post here. You've (the OP) literally requested an encyclopedia worth of knowledge in just a thread. It's all going to come down to how serious you are. If this is something you're going to make happen no matter how long it takes, then we need to reset you on the right track: learning how to program, followed much later by learning how to program games.
    Last edited by 280Z28; July 3rd, 2009 at 05:58 AM.
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo