forums

TNT Basic Forums > TNT Basic - The Open Source Edition
TNT2 - Pop Quiz...
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-18-2007 17:33

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

OK, question for you all... Should I revise the syntax of the language?

Basically (excuse the pun) TNT is old school, should the syntax reflect this, or should I go a bit more 'C'. What I'm saying is, do we like the multi-word calls, the occasional 'TO' in the middle of a parameter list and inconsistent use of brackets? Let's take an example:

Frame Rect left,top To right,bottom

OR

frameRect(left, top, right, bottom)

The second version is a hell of a lot easier to parse, but it's not as BASICy, if you see what I mean. It makes no real difference, it's just a preference, so what do we think?

Look forward to hearing your opinions...

Danny (nod the mod)

09-18-2007 20:33

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Okay so the first question is, do we want backwards compatibility? Do we want old-school stuff? BUT there is another question : if we change something, is it just to ease parsing, or a redisign of the language? Because that question is as important.

I won't answer myself because it's highly unlikely that i ever use TNT again myself but thought i'd raise the question ;)

09-18-2007 21:04

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

I like the second way much better because it's easier to read.

09-19-2007 01:46

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

I'm with Someone on this one:

Anything that improves speed/ease of parsing is a good thing.

You're right though Danny - I think it is important not to lose too much of the 'humanity' of the language. If I want to work in C . . . I will (and have).

But, TNTbasic is about the greatest aspect of BASIC which was and is a very straight forward 'non-programmer' syntax.


x = x + 1

is very straight forward

x++

might confuse some people

Again I'm thinking of those, like me 30 years ago, delving into learning a language

But either way Danny I'm just Gosh Darn happy you are taking this on and not letting TNT die!


cheers

barry


09-19-2007 08:28

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Glad you bought that one up...

I'm adding inc x and dec x for the plus 1 / minus 1 stuff as it's a lot quicker to add 1 than it is to add an unknown value.

The faster parsing will make no difference to game speed as it will be compiled to byte code before running. The speed element I mentioned is the time it takes me to write the token matching code, and any delay during comparisons would be minimal to say the least so we're not talking slower compilation either.

Right, thinking as I'm typing here (Wow, a guy that can multi-task, my wife was wrong after all!). My initial project spec on this one said that it should compile existing TNT projects, and I was pretty specific on that. So (and thanks to 'someone' for using the "compatibility" card there) the parser has to understand the original syntax anyway... TNT already supports short cuts, like using either 'Integer' or 'int' to define a variable, and missing the 'u' out of colour for all you crazy yanks, so why not implement both? Spaces, brackets and extraneous (ooh, big for early in the morning) 'TO's and stuff are optional, put 'em in or leave 'em out...

Good idea?

Danny (nod the mod)

09-19-2007 17:51

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

Danny - In my humble opinion that is a fine idea unless it adds unnecessary time to your work - after all we don't want to miss your target release date....what was it.... September 21,2007 ... yeah that's it.......

cheers

-b-

09-19-2007 19:50

Posted by:
Tim

Location:
New Zealand

Find more posts by Tim

TNT 2

I think if we want TNT 2 to appeal to more hobby or semi-professional programmers, including improvements to the parser like DrawRect(x,y,x2,y,2) is no biggie. adding STOS classics like INC and DEC are a great idea.

Its important to have all the effects present for graphics and sprites, transparency, alpha, rotate, RGB colour changing etc.

But from a parser point of view I wouldn't go much further because then your entering territory already served by COCOA and BLITZMAX. The more I learn about BLTIZ the more I see its potential, but boy its a lot more work, I've had it now the same length of time it took me to finish TANG, and I've bearly got an animated sprite running. This is the power of TNT, it allows me to be creative quickly, being at work full time, I don't have time to create my own sprite engines and have no desire to.

09-19-2007 21:55

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

"I've had it now the same length of time it took me to finish TANG, and I've bearly got an animated sprite running."

You've got to be kidding.... BlitzMax can't be that hard to learn, can it?

10-02-2007 00:15

Posted by:
Tim

Location:
New Zealand

Find more posts by Tim

TNT vs Blitz

Well to be fair to Blitz I've only being approaching it causally. Although I bought a book for it recently which set me back $125NZ. You miss interpreted want I meant too. Blitz has no sprite command, so yes, it is a lot harder, you have to create all the sub routines to keep things animated, moving and tracked, whereas TNT does it for you. In Blitz you also have to create your own level and tiling system. Yes I can do all of this, but my point is Time. BASIC is meant to be a causal pastime, hobbyists or a way of encouraging beginners into programming. Blitz is far more serious tool for writing games. But I suspect it wouldn't take much for TNT2 to be on par if not beat it out right. I have little doubt that I will be finishing my third TNT2 game by the time I finish one Blitz title. I'm not dissin Blitz, its a great tool, I have spent alot of money on it, but I have been spoilt with TNT.

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.