|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
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! |
|
#32
|
|||||||
|
|||||||
|
Quote:
Decimals. (Easiest) Exactly like: 10.01 10 1.001 1.01 1 0.1 0.01 0.001 And so on... Quote:
Yeah, quite right. It is quite similar to VB But maybe an starting and ending statement: { Your Code here } { = starting } = ending Quote:
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. Quote:
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++. Quote:
How do you do that? ![]() |
|
#33
|
|||
|
|||
|
Quote:
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? |
|
#34
|
|||||||||||
|
|||||||||||
|
Quote:
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:
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... Quote:
java Code:
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. Quote:
|
|
#35
|
|||||
|
|||||
|
Quote:
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. Quote:
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. Quote:
What websites do you look on to find these websites? ![]() |
|
#36
|
|||
|
|||
|
Quote:
I tried using it without a _ but it said an error so I had to put in the _ in. |
|
#37
|
|||
|
|||
|
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... |
|
#38
|
|||
|
|||
|
I'll try to learn C++ by reading some tutorials, which I need to google-up to find some tutorials on C++..
![]() |
|
#39
|
|||
|
|||
|
Quote:
That's probably the best idea. ![]() |
|
#40
|
|||
|
|||
|
I agree with him but i doubt it will happen
|
|
#41
|
|||
|
|||
|
Quote:
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 06:58 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Game Development > Create my own programming language |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|