473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Just in time compiling

A group of friends and I are doing a RPG (role-playing game) maker for a
school project. It occured to us, however, that if you want the user to be
able to have almost complete control over the contents of his/her game, that
you would end up with a tiny executable and a huge datafile. We wanted to
keep clear of this as disk accesses take a lot of time to do and there would
be a huge load of them to do this part. We could very easily write a
program to spit out the code but we don't know how to get it to compile into
an executable as part of the software. The user shouldn't have to be a
programmer to get a working game. We basically want them to design a game
and then click a build game button. On that click, the code is generated
and compiled. Now, the way we figure it, is using just in time compiling we
can use .Nets clr, intermediate language, and just in time compiling to
achieve this, however, we don't know how. :) So any thoughts or good
pointers would be most helpful.
Thanks
~Justin

Jan 31 '06 #1
2 1909

"Justin Naidl" <jn***@lsol.net> wrote in message
news:43***********************@news.tm.net...
A group of friends and I are doing a RPG (role-playing game) maker for a
school project. It occured to us, however, that if you want the user to
be
able to have almost complete control over the contents of his/her game,
that
you would end up with a tiny executable and a huge datafile. We wanted to
keep clear of this as disk accesses take a lot of time to do and there
would
be a huge load of them to do this part. We could very easily write a
program to spit out the code but we don't know how to get it to compile
into
an executable as part of the software. The user shouldn't have to be a
programmer to get a working game. We basically want them to design a game
and then click a build game button. On that click, the code is generated
and compiled. Now, the way we figure it, is using just in time compiling
we
can use .Nets clr, intermediate language, and just in time compiling to
achieve this, however, we don't know how. :) So any thoughts or good
pointers would be most helpful.


Well, first thing, don't throw out the tiny engine, large datafile approach
offhand. Most commercial games use this approach(as do most game
construction kits I've seen.) A large executable can cause alot of trouble
in its own right. Test it and see. With careful caching and logical file
design I suspect you'll find pretty good performance.

Now, on to the larger question, compiling scripts. Its to large a topic for
this post, but the System.Reflection.Emit namespace offers almost all of the
classes you could ever need to construct a compiler, and the greater web
contains a wealth of information on it.

Amazon has two books directly on topic, although I've never read them and
can't speak to the quality:
http://www.amazon.com/exec/obidos/tg...glance&s=books

http://www.amazon.com/exec/obidos/tg...glance&s=books

There is a mailing list as well, although it is a very quiet mailing list,
as well as other resources at
http://www.gotdotnet.com/team/lang/

If you want to just use C#, VB.NET, or another language that provides a
CodeDOM compiler as your scripting you could use the appropriate classes.
Do you know what language you are planning on using, there might be a
compiler for it if it exists? I can probably give you more information if I
knwo what approach you are looking to do.
Jan 31 '06 #2
Justin,

In my opinion can you use this.

http://msdn2.microsoft.com/en-us/library/s4kbxexc.aspx

It is there as well in C#. You can create it, and than start the compiling
process by invoking the compile proces using the commandprompt.

Just as idea

Cor
Jan 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
17
by: newbiecpp | last post by:
I have hard time to understand run-time environment. Let assume that I have a program that has a simple variable alpha. When this variable is statically allocated, the compiler can use the...
9
by: MLH | last post by:
Trouble is, it doesn't happen every time. Yesterday, for example, it happened only once and not again afterward. Some days ago, a similar situation. Today, well - I tried 7 times straight to open...
11
by: Phill | last post by:
I'm new to C# and so far I'm pretty happy with the language and the design behind it. My only real concern is about performance. I wanted to ask a question about how a program you build in Visual...
4
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error...
2
by: Jan Althaus | last post by:
Mostly for testing reasons I'd like to see if it makes sense to chose the following approach for just-in-time compilation of shaders for a renderer: Seeing as the shaders themsefs consist mostly...
14
by: spamtrap | last post by:
Mostly for testing reasons I'd like to see if it makes sense to chose the following approach for just-in-time compilation of shaders for a renderer: Seeing as the shaders themsefs consist mostly...
13
by: Analizer1 | last post by:
Hello all I have a idea...and dont know if it is possible...... we have a pretty huge system at work and we send EDI Special formatted Data to Several Other Companies, via sFtp,dial up, vpn...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.