Game Development Community

Why do we need compiler?

by Eran Caspi · in Torque Game Engine · 08/21/2004 (8:49 am) · 12 replies

I want to buy Torque but I saw that you need a compiler
so I played a bit with the demo and with codesampler tutorials
and I saw that you can make an entir game without compiling
anything and the *.cs files and also not compiled
so why do we need the compiler?
and where can I buy Visual C++ 6?
all I found is Visual C++ .NET standard 2003 but I heard 6 is better.

#1
08/21/2004 (9:12 am)
6 is better i work with it. nut sure you can build a game without compiling - unless will be a game with you and a nice landscape in it. i just bought torque and i am quite happy with the results.
#2
08/21/2004 (9:32 am)
You can do a lot without needing to alter the core engine. The scripting is very powerful as you have already learned. Depending on the game you want to create you might need to add to the engine which would require altering the C/C++ source and recompiling with the compiler. For example, I have added some light effects and the day/night resource to allow my sun to rise and set in my little world.

Check out this resource for some "get your feet wet" VS information:
use Visual Studio 2005 Express Beta Products It might help.
#3
08/21/2004 (9:33 am)
Quote:so why do we need the compiler?
and where can I buy Visual C++ 6?
all I found is Visual C++ .NET standard 2003 but I heard 6 is better.

1) You need a compiler if you want to make any changes to the source code.

Basically, you could *theoretically* build an entire game using Torque script as your only method of defining the project, though you'd be limited by what the precompiled executable had to offer.

There are many, many community resources to extend and add functionality to Torque, but many (most) require slight modifications to the source code - i.e. you need a compiler.

In the end, you'll *probably* spend less time tweaking source code and more time scripting than anything else, but it is a necessity to comile the code if you want to add anything to the engine.

2) As for the debate between VC 6 and VC.NET, I have used both at this point and haven't run into any problems using Visual Studio.NET - but that could change. Who knows. =\

As for functionality, VS.NET is light years ahead of VC6 in terms of interface and being "user friendly" IMO.

Really, I think it just comes down to personal preference at this point.

3) You can probably find a legitimaten version of VC6 on eBay if you wanted to.

You have to be careful of the scammers out their who are selling warez, but I managed to find a *legitimate* copy of VC6 for about $100 - box and all. ;-)

~Hope this helps.
#4
08/21/2004 (9:43 am)
Thank you all for the help.
Im planning to make nice and simple games and sence I don't
really know C++ (I know just the basics) I think I will leave the
compiler part to the end.
One more question (for now :) when you add object or add *.cs files
anyone can see the source, take the models etc. how can I prevent this?
any way to encrypt the files (the *.cs files, the models, texture and all that)?
#5
08/21/2004 (10:18 am)
I recommend VC 7.1 (.NET 2003). I was a long-time VC6 hold-out, but 7.1's fuller ANSI compatibility, and it's slicker (imo) interface are big plusses.

It's true though, you can do *a lot* without needing a compiler at all. Have fun scripting :)

As for "encrypting" models and .cs files... models should already be fairly well encrypted in that people won't be able to steal your source-art. DTS is a pretty difficult-to-import format, so it's as safe as most any format for models in games.

For scripts, it is questionable whether it's really necessary to do so, but if you are set on protecting them, the easiest thing is to only distribute the .dso files that are produced from each .cs file. A .dso is a "compiled" version of the script. They are much, much harder to read. A .dso is generated for every script your game or mod uses, except main.cs. So, if you are extremely concerned about it, don't put any useful code in main.cs (exec sub-scripts from main.cs, and the sub-scripts will be .dso-compiled).

Hope that was clear enough, I'm still kinda groggy from a long night. :)
#6
08/23/2004 (9:55 am)
If your going to make small simple games/scripts which don't involve modifying the engine, why would you want to buy the engine? The demo app basically does the job.

DTS meshes can be imported into blender with the importer/exporter (a few months ago anyways, dont know about it now), but no other data aside from meshes can be imported...

DSO files can in theory be reversed back into .cs files, in theory. I don't think that anyone is actually working on something like that at the moment. You can probably mess around with DSO file generation (which means you'll need the source...) so a generic DSO decompiler can't spit out .cs files of your compiled scripts.
#7
08/23/2004 (6:29 pm)
Sometimes just having the code can be a huge resource.
#8
08/23/2004 (9:56 pm)
Well I want to buy the engine becuase Im planning
to continue learning C++ sometime in the near future :)
so DTS will "encrypt" the models and the DSO files
will encrypt the CS files I can manage with that for now.
and a 2 new questions :D
1. Is the engine easy to understand (if a one knows C++)?
I read that the source code of the engine is a mess
and hard to read is it true?
2. Are there any Publish restrictions?
I don't mean to buy the commercial license when you
sell 250,000 copies. I mean something like putting
GG logo in the begining of the game and stuff like that.

And of course thank you for the help :D
#9
08/24/2004 (12:49 am)
...
#10
06/14/2005 (9:13 pm)
Did anyone actually answer the question?

The question was is there a way to protect your source code of .cs files???? Obviously you don't need to protect .dts files.

My email is ted77756@go.com
#11
06/14/2005 (10:34 pm)
...