Author |
Topic: Syntax v1.00 (Read 524 times) |
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Syntax v1.00
« Thread started on: Mar 18th, 2007, 4:49pm » |
|
I've added many commands to the next version of Game BASIC. Just a little more debugging and testing and i'll be finished. Here's a sneak peek of Syntax v1.00, the first real syntax. I decided to take this huge step because now Game BASIC can be used to create very fun text based games and simple graphics based games. I will explain a few of the new commands right now.
The first new command is output=. It is exactly like the print statement in most BASIC dialects.
Code:
The next new command is input=. Obviously it is like the input command in most BASIC dialects. It puts the inputted text into a string variable which is expressed with a '!' to begin the name of the variable as shown in this following example.
Code:
input=What's your name? -!name
The final commands I will give previews of are the remaining non used commands from Syntax v0.01. For more information on them check the other post.
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #1 on: Mar 19th, 2007, 7:43pm » |
|
Just added another command which I think I can share with you. It is called type=. It is defined in the code's very first line so that the compiler knows which command set to scan for and how the translation should be done. Following the '=' sign should be the game type. The two types are tb and gbg. tg stands for text game or traditional game. gbg stands for graphics-based game or game basic game. USAGE: Code:
OR
Code:
I finished programming my Game Engine so Hurray! The IDE, helpfile, and tutorial guy (like the paperclip in Microsoft Word) are all that is left. Some special beta tester who recieved a PM from me will test it and give suggestions on Saturday or sooner of this week, while others will see it 3 to 4 days after the beta release.
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #2 on: Mar 22nd, 2007, 05:17am » |
|
Another command has just been added. It is called embed=. Using it you can directly embed C++ code into it. A pretty nice feature!
|
|
Logged
|
|
|
|
SS
Administrator
    
member is offline


Gender: 
Posts: 100
|
 |
Re: Syntax v1.00
« Reply #3 on: Mar 22nd, 2007, 6:55pm » |
|
on Mar 22nd, 2007, 05:17am, Nitesh Menon wrote:| Another command has just been added. It is called embed=. Using it you can directly embed C++ code into it. A pretty nice feature! |
| Are you making this in libertyBASIC or C++? You getting me so comfused, lol.
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #4 on: Mar 22nd, 2007, 7:48pm » |
|
i'm programming the compiler in Liberty BASIC. To compile the code into a stand-alone exe it translates the Game BASIC code into C++ and then compiles the C++ code.
|
|
Logged
|
|
|
|
SS
Administrator
    
member is offline


Gender: 
Posts: 100
|
 |
Re: Syntax v1.00
« Reply #5 on: Mar 22nd, 2007, 9:00pm » |
|
on Mar 22nd, 2007, 7:48pm, Nitesh Menon wrote:| i'm programming the compiler in Liberty BASIC. To compile the code into a stand-alone exe it translates the Game BASIC code into C++ and then compiles the C++ code. |
|
Well I am trying to make a compiler. I mean to make my programming language into a EXE. I am going to release the Editor version today but it still have some bugs I cant fix but trying to fix.
|
|
Logged
|
|
|
|
Jakevfr
Administrator
    
member is offline


Posts: 24
|
 |
Re: Syntax v1.00
« Reply #6 on: Mar 22nd, 2007, 10:10pm » |
|
^ My compiler that ports it directly into assembly (eventually into straight machine code) is nearly complete. I'll be releasing it on the LB Forums soon, so you may want ot look out for that.
Can't wait to see what you've done man. I'm looking forward to it
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #7 on: Mar 26th, 2007, 6:34pm » |
|
Release is going to come extremely soon. It may support basic Direct3D (But not DirectDraw) functions.
|
|
Logged
|
|
|
|
Bill W.
Global Moderator
    
member is offline

Hello, Earth!

Gender: 
Posts: 11
|
 |
Re: Syntax v1.00
« Reply #8 on: Mar 27th, 2007, 09:15am » |
|
on Mar 22nd, 2007, 10:10pm, Jakevfr wrote:| ^ My compiler that ports it directly into assembly (eventually into straight machine code) is nearly complete. I'll be releasing it on the LB Forums soon, so you may want ot look out for that. |
|
Jake, Nitesh, I should keep closer tabs on you both. 
Perhaps translation to C or Assembly isn't such a bad idea after all. I still like dynamic execution better. It's more fun having to write an entire standard library of commands, functions, and subroutines. Plus, it's downright quicker. So, when I actually have time to write code...
|
|
Logged
|
- Bill W. "The knack [to flying] lies in learning how to throw yourself at the ground and miss." - Hitchhiker's Guide
BillDubya.net - Various stuff by me, inc. my blog JustLiberty
WinXP SP2, LB4.03, 256 MB RAM
|
|
|
SS
Administrator
    
member is offline


Gender: 
Posts: 100
|
 |
Re: Syntax v1.00
« Reply #9 on: Mar 27th, 2007, 5:19pm » |
|
True, Assembly is what I am using to make a exe in. FASM, NASM, or MASM compiler will be included so it can convert into a Assembly code and compile into a exe. maybe I can support it to create dll in MASM.
|
|
Logged
|
|
|
|
Jakevfr
Administrator
    
member is offline


Posts: 24
|
 |
Re: Syntax v1.00
« Reply #10 on: Mar 27th, 2007, 11:00pm » |
|
on Mar 27th, 2007, 09:15am, Bill W. wrote:Jake, Nitesh, I should keep closer tabs on you both. 
Perhaps translation to C or Assembly isn't such a bad idea after all. I still like dynamic execution better. It's more fun having to write an entire standard library of commands, functions, and subroutines. Plus, it's downright quicker. So, when I actually have time to write code... |
|
I prefer it as well, however I want my program to be super fast, so assembly is the only way to go
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #11 on: Mar 28th, 2007, 07:27am » |
|
what do you mean by port it into functions and subroutines. this intrigued me. How is it compiled using this method?
|
|
Logged
|
|
|
|
SS
Administrator
    
member is offline


Gender: 
Posts: 100
|
 |
Re: Syntax v1.00
« Reply #12 on: Mar 28th, 2007, 3:59pm » |
|
Making making an exe file, let it make a .asm output file. then if your commands become something like this:
Code:
open"file.asm" for output as#1
select case c$
case"input"
msg$=word$(s$, 2, chr$(34))
prompt msg$;m$
print#1, "<asm code goes here"
end select
close#1
And so fourth, let it goes like that so when you make an exe, (like Thristle-Win) and make a kill commands after the exe file is created and completed.
|
|
Logged
|
|
|
|
Nitesh Menon
Administrator
    
member is offline


Posts: 149
|
 |
Re: Syntax v1.00
« Reply #13 on: Mar 28th, 2007, 4:36pm » |
|
i was asking Bill. I know how to port code.
|
|
Logged
|
|
|
|
Caplet
Moderator
    
member is offline

...?

Posts: 44
|
 |
Re: Syntax v1.00
« Reply #14 on: Mar 28th, 2007, 7:25pm » |
|
hmmm... I'm not very good at assembler code but does it this how it work with GBasic? Makes text in the program into a .asm (assembler doc.. i think) Then compiles into an exe using FASM, NASM or MASM Am i correct on this? I would like to learn more about his because of my new language
|
| « Last Edit: Mar 28th, 2007, 10:31pm by Jakevfr » |
Logged
|
Gnome Forum - http://gnomecode.conforums.com
|
|
|
|