forums

TNT Basic Forums > Feedback
The future of TNT (again...)
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-05-2003 13:27

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Hmmm... I would like to know how the work on tnt is proceeding...
The two features I personally would need are:

-more speed (You were talking about rewriting TNT as metacompiler or compiler?)

-window mode

Thanks

Matteo

10-05-2003 14:21

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I think the developpers of TNT waid there would be an update to make it faster someday, but I don't know exactly when. Writting a meta-compiler shouldn't be too hard ( considering what they've done until now, of course ) but a compiler is probably a very hard thing to do even for experienced programmers. Anyway I'm not sure.

10-08-2003 20:37

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Work on the current update is proceeding well, this release will be mainly bug fixes, but will offer fixes for all the major bugs that have been reported so far including the getkeys() issue, and the no gfx on emac issue.

It will also add proper support for keyboard input, so you will be able to do high score tables much more easily, without having hundreds of lines of 'is pressed' commands.

There's lots of other bug fixes, but as yet, no work has been done on either the meta compiler or window mode - these jobs are high on the list, and I'll start on them after this release.

Cheers,

Mark

10-09-2003 00:13

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

You should not work too much on window mode unless you want TNT to do other software than games...

10-09-2003 08:29

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

window mode is VERY important

I'm sure window mode is VERY important:
1-Many players won't play games that are not in windows
2-You could avoid changing resolution, wich many people hate

10-09-2003 10:06

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

still me...

I'm happy about keybord input ;-)

Is the metacompiler stuff a huge work? I mean, will you have to rewrite loads of the code?

10-10-2003 00:20

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

> window mode is VERY important
> I'm sure window mode is VERY important:
> 1-Many players won't play games that are not in windows
> 2-You could avoid changing resolution, wich many people hate

yeah, I just said not to spend too much time on it unless you could create apps in TNT ( I mean, other than games ).

>Is the metacompiler stuff a huge work? I mean,
> will you have to rewrite loads of the code?

stop me if I'm wrong! This is how I see things ( a bit simplified )

the code in TNT is understandable by humans, so the computer cannot read it unless it is converted. ( The computer understands binary code, wich is a bunch of characters that makes no sense to a commuon human ;)

An interpreter does not convert the code at all. The program converts the line when it's read.

A compiler converts everything when you choose "build application".

A meta-compiler makes the job easier for the interpreter.
The following lines are what I think a meta-compiler does but I'm really not sure about it... For example, in the command "set sprite transparency", the computer checks if the 23 characters are matching a command name. A meta-compiler would maybe turn "set sprite transparency" into "?5a*" wich makes no sense to a human but is only 4 character-long and thus faster.

10-10-2003 03:51

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

So wouldn't a compiler be faster than a meta-compiler? TNT is a compiler already right?

10-10-2003 07:59

Posted by:
CubeFusion

Location:
California, USA

Find more posts by CubeFusion

TNT is a "Interpreted" language, therefore it is not pre-compiled.

Speed Comparison
Compiler > Meta-Compiler > Interpreted

10-10-2003 23:30

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

You should not expect much more speed unless TNT becomes more than an interpreter. TNT is already a very fast interpreter... just take a look at other interpreters and you will see TNT isn't so slow for an interpreter!

10-11-2003 02:16

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

yeah, TNT's sprite system is amazingly fast considering it's an interpreter.

10-11-2003 03:18

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

TNT is an interpreter?
Then what happens when you build the application? Doesn't TNT compile it? The finished build is all that needs the speed anyway.

10-11-2003 11:36

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

when you build, TNT creates an application that is "TNT+your file", That's why it adds 2MB to the size

10-11-2003 17:26

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Aahh...

10-12-2003 18:38

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Yeah, matteo is right about the built application, we simply join your file to the application then run it the normal way.

TNT is a cross between an interpreter and a meta compiler. It doesn't interpret the text on the fly, rather it runs through it once and builds a tree that represents the exeuctable code and runs that. It doesn't do any text parsing while the game is running.

The tree is not the most optimal format to execute directly, if the tree was instead subsequently output out into a meta-language, that is a language that isn't TNT Basic, but isn't machine code either, then we could have a very optimised execution loop that would run much quicker than our tree currently does. It would also allow us to apply optimisations to your programs much more easily.

The real goal would really be to execute machine code, which is 100% native to the computer. This would mean either converting the meta-language into machine code, or getting our tree to be converted directly into machine code (bypassing the meta-language completely).

It will require a rewrite of much of TNT Basic to get either a meta-language interpreter or a machine code compiler, but we would take that opportunity to add things like OOP and make it easier for ourselves to add other interesting extensions in the future.

Cheers,

Mark

10-19-2003 01:43

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

You TNT developers look pretty amazing: you talk like you could do really anything without any problem. And I bet instead that writing TNT Basic or a compiler is something really hard. You must have a really good theorical knowledge of programming and computer science! (Differently from us hobbyist basic scripters that write programs full of globals!)

10-19-2003 18:58

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

There's some really good books out there on compiler design, using GNU tools like Flex and Bison; we had to learn about stuff like that back at University. Once you know how to write a compiler/interpreter, it's just a case of writing a few language commands to control things, such as moving sprites around.

It's not that hard really, if anyone is interested in writing tools like TNT Basic, I'd recommend the book Introduction to Compiling Techniques: A First Course Using ANSI C, LEX and YACC... which I've just discovered is out of print, so that's not much good, but that and other's like it is where I learnt most of my stuff from.

Cheers,

Mark

04-25-2004 17:17

Posted by:
Turner

Location:
Williamstown, MA

Click Here to Email Turner   Find more posts by Turner

[quote=matteo]-window mode





I agree with this. Though the screenshot ability is built in,it would be nice to take selective screenshots. Also, this would be nice for editing while playing, so one doesn't have to quit everytime one gets an idea.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.