Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Make a compiler? #254720
03/04/09 23:55
03/04/09 23:55
Joined: Sep 2008
Posts: 69
U
upsidedownman Offline OP
Junior Member
upsidedownman  Offline OP
Junior Member
U

Joined: Sep 2008
Posts: 69
Hi, i was wondering if it was possible to write a compiler from inside to program like FPS creator or game maker. Would this have to be done with C++ or would it be possible with lite-c?

Re: Make a compiler? [Re: upsidedownman] #254739
03/05/09 06:05
03/05/09 06:05
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline
Expert
slacer  Offline
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Hello,

what kind of compiler do you have in mind? FPS creator is written in dark basic and has no ingame compiler which lets you add more features to your game at runtime.

Re: Make a compiler? [Re: slacer] #254981
03/06/09 20:36
03/06/09 20:36
Joined: Sep 2008
Posts: 69
U
upsidedownman Offline OP
Junior Member
upsidedownman  Offline OP
Junior Member
U

Joined: Sep 2008
Posts: 69
Well maybe i shouldn't have used fps creator for an example but like GS for example. It can compile to .exe and it is already compiled by VC++ or w/e they used. Is it possible to do this from a lite-c program or do i need to use c++ for that. When i said FPS creator i was referring to the ability to compile to an .exe. I know it is a kinda hard process but i would like to know so i can start learning toward it.
Thanks!

Re: Make a compiler? [Re: upsidedownman] #254997
03/06/09 22:02
03/06/09 22:02
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
Yes, you can use Lite-C to write a compiler. However, C or C++ would be a better choice for this because they are essentially the same as Lite-C just without the reference to the engine library (which you obviously don't need to write a compiler) and without any other dependency that you don't need.

But then again, I don't quite understand what you want to do.


Your friendly mod is at your service.
Re: Make a compiler? [Re: MichaelGale] #255003
03/06/09 22:31
03/06/09 22:31
Joined: Sep 2008
Posts: 69
U
upsidedownman Offline OP
Junior Member
upsidedownman  Offline OP
Junior Member
U

Joined: Sep 2008
Posts: 69
Thanks, i guess i am over my head i wanted to get started on a little test project that i create a little wrapper for lite-c with lite-c then make a compiler that could compile lite-c to an .exe file. Its just that i have been looking all over Google and can't really find a book or tutorial that gives any hints or help to creating a compiler for a language. Thanks i will keep looking.

Re: Make a compiler? [Re: MichaelGale] #255004
03/06/09 22:32
03/06/09 22:32
Joined: Jan 2009
Posts: 76
V
V_Software Offline
Junior Member
V_Software  Offline
Junior Member
V

Joined: Jan 2009
Posts: 76
I think right now its not possible to write an Compiler with lite-C without external libraries (that would probably be written in c++). I think you could only make an Interpreter. And this is already a huge work. Good luck and by the way don’t forget the license it says that it’s not permitted to use it for making a dll that works as a wrapper for the library by providing access to the interface structures or to library functions from outside the DLL. Maybe I didn’t understand it right but imo this tells me that its forbidden to make things like a game maker etc…but maybe u don’t even want it for such a purpose so like said before good luck. But remember a real compiler is a Program that writes special art of code and you can’t make it with a script language, the only way is C++ or Assembler ( and maybe Delphi/Pascal). Yes Acknex engine is compiled but remember the license laugh

Re: Make a compiler? [Re: V_Software] #255008
03/06/09 23:14
03/06/09 23:14
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
Gamestudio already includes a compiler for Lite-C, you don't have to write one yourself. What do you mean with "little wrapper for lite-c"?


Your friendly mod is at your service.
Re: Make a compiler? [Re: MichaelGale] #255009
03/06/09 23:23
03/06/09 23:23
Joined: Sep 2008
Posts: 69
U
upsidedownman Offline OP
Junior Member
upsidedownman  Offline OP
Junior Member
U

Joined: Sep 2008
Posts: 69
I meant a compiler from an already compiled program in lite-c(after it is distributed to an .exe file not using the GS compiler).Sorry didn't make that clear. Well i wanted to just do a test and make a few simple functions and have them be read in lite-c, i guess it isn't a wrapper really but just simplified into easier code. But if V_Software is right then i guess it is not allowed. The hole scripting language to machine code never made sense to me, my friend tried to explain it to me but i just got confused.

Re: Make a compiler? [Re: upsidedownman] #255013
03/06/09 23:48
03/06/09 23:48
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
Of course it would be possible to write a compiler or interpreter with Lite-C. C compilers are written in C, Python and Lua are written in C. Lite-C is C.

I wouldn´t do this though unless you are very interested in implementing stuff like that. It should be possible to simply embed Lua or something.

I think you are right about the license issues though.

Re: Make a compiler? [Re: upsidedownman] #255014
03/06/09 23:50
03/06/09 23:50
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
To be honest, I still don't quite understand you because you seem to confuse some terms. However, I think you want to use some sort of scripting or programming language as extension for your Lite-C application which is absolutely possible and legal. There are several approaches which you can use. The easiest way would probably be by including an existing library such as LUA, Python, etc.

If you really want to design your own language, you will have to write an interpreter to parse the code and something to execute the parsed instructions, most likely a virtual machine. Depending on how complex your needs are, this can be quite easy but it can also be quite hard.

Again, sorry if that's not what you want to do.


Your friendly mod is at your service.
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1