forums

TNT Basic Forums > Feedback
Requested Features
< Last Thread     Next Thread >
Author
Thread        Post A Reply

12-07-2001 02:50

Posted by:
Socrates

Click Here to Email Socrates   Find more posts by Socrates

Hi, have studied the manual in some depth and have a few more requested features for you.

Array resizing - ideally like RB's but a simple append/delete item would do. Don't know if you can redim the same array again, there's no mention of it, but that would be nice.

Pointers - hah, in my dreams. RB still doesn't have them. But really, think about it, they're lovely, and new user needn't worry about them, they can just use the "shared" functionality in blissful ignorance of what's actually going on. Probably wouldn't need this badly until you implement...

Data encapsulation - yes I know this is the 3rd or 4th time I've mentioned it, but IT'S REALLY IMPORTANT. I cannot stress this enough. How the hell can i write a multiplayer game if I can't assign player properties to a player object. I'm sure their was a way to do this back in the dark ages, but it doesn't even bear thinking about. IT WILL ONLY TAKE YOU A DAY TO IMPLEMENT< DO IT NOW, PLEASE, I'LL PAY YOU (the shareware fee).

One final note - what's that FX matrix thing all about. That's not like any matrix I've ever seen (unless your identity matrix was a typo). I can see that you'd use it for anti-aliasing or blurring (at least I think you could) but I can't see any other purpose, and in that case why not just have a "blur" function. It's bizzare to find something who's only conceivable use is for writing photshop plugins in the middle of all the other game-oriented functions. Having said that, can't wait to try doing a game with real-time full-screen antialiasing :-)

If you can do this, why not implement proper 2D transform matrices though, then we could do funky scaling and rotation effects.

Plugins - anything, C++, PPC assembler, it doesn't matter, any support for this and I'll be off your back about any speed or graphics issues or anything like that (except data encapsulation, I'm going to hound you every day until you put that in).

One more final note :-) - damn some of your stuff is cool. I love the sound, networking and graphics support. The latter needs a bit of work perhaps, but they're so much more intuitive than anything I've come across before. Nice job.

P.S. wow you're British, I just figured it out. How nice to finally get to write in a language that spells colour with a 'u'. Gonna confuse your american audiences no end though :-)

12-07-2001 03:10

Posted by:
Socrates

Click Here to Email Socrates   Find more posts by Socrates

Ooh, and...

Just spotted that you don't have any logical functions, where's AND, OR, XOR and so on then? You can't have a programming language without those, it's just not cricket.

BTW, with the network commands, there's no way to specify which player to send a message to. All very well most of the time, but not much good for private chat. I suppose you could include the intended player ID bundled in with the integer for the message type... but then you'd want logical functions to seperate the two wouldn't you?

OK, I cheated, you could seperate them just as easily by doing a mod 8 or something, but that's just one example, the whole field of computer science is based on logic gates, you can't just leave them out.

12-07-2001 03:25

Posted by:
Chris D

Find more posts by Chris D

Socrates...

What would you do with Ptrs?
Why do you need them?

What would you do with plug ins?

Im thinking that if TNT is done right you will
have no need for either ptrs or plugins.

In a sense TNT does not need to become RB or FB.

If you really want a good compiler have you tried FB
it has Ptrs and low level tool box calls and could make a program like TNT or B! etc.

12-07-2001 09:43

Posted by:
John Treece-Birch

Find more posts by John Treece-Birch

American Spellings

There is a pretty much undocumented feature in TNT Basic that allows you to use instructions with the American spellings (e.g Color) in your code. The help system and documentation is written entirely in English though but at least you don't have to adhere to that standard yourselves.

John

12-07-2001 11:05

Posted by:
Socrates

Click Here to Email Socrates   Find more posts by Socrates

Well...

Suppose I have a couple of arrays, what happens if I do this

int a[ ]

int b[10]

{do some stuff to elements in b}

a = b

Now one usfull funcitonality would be for a to now become a 10 element array with the same contents as b. But the more usual functionality would be for it to become a pointer to the contents of b, array are usually just pointers to their first element after all.

This becomes more relevant with classes. Suppose I want a spaceship class and a planet class. I might want to be able to ask the spaceship what planet it's landed on, so i would say

theplanet = myspaceship.myplanet

theplanet and myplanet would all be pointers to the actual planet which might be called saturn, but would be an instance of the planet class. Without pointers they would keep making duplicates of saturn though, which would be frustrating and use up memory and time like nobody's business.

So pointers are needed, the question is do you make it clear that's what they are, or not. Now actually I'm not reallly bothered about the answer to that. REALbasic has chosen not to, and for the msot part that works quite well. I believe though that this has been an issue of some confusion for RB users who are expecting the classb = classa duplicate function. Just wondering how the TNT guys intend to adress this issue.

As for plugins, well it's mainly just cos I'm greedy. I don' like writing them, but if a language is perfect except for one minor exclusion... it's a nice thing to fall back on. That's all.

I've looked at FB but was put off by the lack of GUI and GUI control, at least RB has decent support in that area built in, in FB, EVERYTHING seems to be a library, it's no easier than C, and I have no problem with the C syntax, that's not why I switched. I really like my hand being held for some things (don't take that the wrong way), I'd just prefer if it were scalable as you mentioned. It's fantastic that TNT has a single command to fade the screen and switch reolution, I hope that one day all basic's are made this way. My current language of choice RB can't switch resolution or fade the screen, period (I know there are plugins, but most of them cost more than TNT, not to mention the constant upgrade prices for RB itself). But how can I use a language if my game needs x and their is NO way to implement x at all.

My ideal language? A C++ compiler that uses single document projects and automatically integrates all used library functions without #include statements or the like. It would also come with a standard library of single commands for screen res switching, fading, sound, graphics music or whatever, but with support for low level access to the internals of these in case they can't quite do what you want.

But I lack the gumption to write it myself, and everyone seems to assume that just because I don't want to spend a week writing an event loop to check for apple events and then spend a further six months working out how sound, graphics, openGL and networking are implemented (by which time I've lost all interest in my original game concept) that I also don't want any power in the language, and have no intention to write anything more than a few hundred lines long. ON THE CONTRARY, I have learned through bitter experience, that it is only by simplifiying these features that I will ever have a chance to make a truly huge project that doesn't trip at the first hurdle.

Trying to simply the language by removing features actually ends up complicating the code, and a human brain can only handle so much complexity before it loses track. Programming requires a rigid structure, and without data encapsulation and other such features then I just don't know how to maintain that.

will be shifting further such stuff to the new forum from now on btw, nice one guys.

12-07-2001 15:41

Posted by:
Chris D

Find more posts by Chris D

Ok I see what you mean buy ptrs...

Ok Ptr are mostly for direct memory access...
WhaT your talking about is actually how most scripting engines, Java Script, Lua etc handle objects.

The only time a new object is ever made is with an explicit call to new....

And that is how I would do it if I was making a language on that level....

So your tell me that RB copies every object fully
any time you pass it anywhere?

Ok I see what you mean by a lack of a clear copy constructor for objects since you can not do....

*a = *b;

etc....

Look at FB again... it had a very nice GUI builder
even back in 93... It was called PG:PRO and was outside of the IDE...

It was neat cause it was totally exaspanabile
it never hid anything from you it just generated code.
Much closer to using C then RB is...

So you Want SuperC....
I nice friendly C with say garbage collection etc.
I have had that same idea myself.
Thought of writeing it one day...

I might be done more easily on OS-X by making a
C preprocessor that translates super C it C/C++ that the command line compiler uses etc.

Example roject builder is just a wrapper around the command line tools any how...
so other people could do that also and make it friendly...

Describe for me a GIANT project you might like to make?

Im sure that will help me an TNT think about what we need to be able to handle.





















12-10-2001 00:38

Posted by:
Socrates

Click Here to Email Socrates   Find more posts by Socrates

"Giant" project

I've been working on a simple 3D engine in REALbasic. No OpenGL or anything, just simple untextured polygons. I have an idea for a stylish Spectre type game, but the sky's the limit for what might go in it if I ever get it working. It may seem perverse to use these types of languages for this purpose, but it's quite fun to do, and as much as I like Quake 3, I know I'm not likely to bother learning enough OpenGL stuff to ever compete, and I like having my own engine that obeys my rules. I may not be able to do textures, but I can break the laws of geometry on a whim without having to wonder how to fool the 3D card's Z buffer into drawing it for me, etc.

I kinda lost momentum for the game when I got stuck with an enemy AI problem (I couldn't get the enemy tanks to stop driving through each other) but I loved the fact that it ran without modification under system 9, X and Windoze. I subsequently made a fresh start with a much better engine with 6 degrees of freedom and matrix based transforms, multiple cameras, etc. That eventuallly lost momentum as well when RB 3.5 came out and used half my object names for it's own 3D implementation.

I'm still very keen to do this game, and TNT looks like another promising candidate, except that with transparency and full-image antialiasing and blurring (and net support) I think this thing could actually be pretty damn cool in a retro kinda way. But without object-oriented code there's no way I can re-make my engine in TNT. Half the cleverness of it was that it used objects that knew how to draw themselves so that the engine handled their depth-sorting and view-frustrum culling and so on without knowing whether they were a triangle, an N-gon or a scaled sprite, or whatever, allowing me to add new object types by simply making a subclass of the standard object, and letting the engine handle it in the standard way.

Anyway, I'm digressing from the main point which is that TNT's speed is more than enough for this purpose (the fireworks demo shows that it can do at least 900 vector operations in a 30th of a second, where my RB project was drawing about 600 polygons in a 10th), but without data encapsulation and inheritance even the 3D engine for this game would be impossible, let alone sticking the game engine on top of that, and this isn't even a giant project, my next one will probably be far more ambitious.

The thing that makes this project hard to do under TNT is that the people who wrote TNT didn't expect me to want to do it, and if I can think outside the box, then there will be other people who will too, which is why a language like TNT needs room for expansion, and that room only comes from features like those I requested.

I have the source code for the tank game and 3D engines I wrote in RB (both unfinished but functional under 3.2) if you'd like to have a look at them. The tank game is not exactly the world's best example of orderly code, and I doubt they're well commented, but as long as you promise not to use them against me (or without asking me) you can have them.

12-10-2001 09:43

Posted by:
Mark Tully

Find more posts by Mark Tully

Ptrs/Plugs and the like

Firstly, OOP will be done, as John has said before don't hold your breath though! Of course the more you nag the more we'll feel the need to work on it :)

It took me a while to get back into non-oop programming, that fireworks demo messed with my head a bit because it was very hard for me to not think of fireworks/particles as objects (!) but it's possible. I will conceed however that somethings are just better written/easier to write/maintain/expand if written in OOP. It's high on our todo list - promise!

As for plug ins, if we were to do this, it would not be for a while. As you point out, there are a number of reasons this could benefit our users, and TNT Basic itself. As you can see from Hieroglyph, we're not adverse to plug ins. Plugs won't be for a long while, it would at least have to be after we implemented our meta-compiler.

Ptrs: I was thinking of using java style object referencing with reference counting to handle garbage collection, how's that? That would address your "saturn" example, but not your array referencing one. Of course, Java doesn't have ptrs and I believe the array referencing can be done without them, but I'm not sure we need it?

FX Matrix is basically photoshops matrix function. It was implemented for playing with really and has never been intended to be used for real time filters. You can do blurs, sharpens, shadowing and embossing very easily, I'll post an example up soon when I find a suitable candidate image.

Array resizing: you can re dim arrays, if we've not documented that we should have! You can't insert elements, we've got more array functions on our todo list and we'll put them in soon.

Think I got all your questions!

Mark

12-10-2001 10:16

Posted by:
Socrates

Find more posts by Socrates

Cool

The object referencing with counting and garbage collection sound ideal.

I don't really need to reference arrays. My only query would be what happens when you pass an array to a subroutine - with RB passing the array with empty brackets means you can access it's elements from within the subroutine. This obviously equates to using the first element as a pointer. How would I access a local array from within a procedure in TNT (without wrapping it in a class I mean).

I don't need array duplication, you can do it the old fashioned way with a loop. I just though it might confuse some of your users if a() = b() does something they don't expect.

Similarly plugins are not of maximal importance. would just be nice to have them when things settle down.

That all sounds fine, so thanks.

And I have no intention to leave you alone about data encapsulation, "Hound you every day" I said, and so it shall be :-)

12-10-2001 16:32

Posted by:
Chris D

Click Here to Email Chris D   Find more posts by Chris D

3D follow up

Big project.

Spector... neat Idea.

I DO think RB3D would do a game like that just fine.

Also for 3D collsion detection... Sphere based colision
detection is EASY and relativly fast to do and would probably work well for that project.

Your OOP approach to it sounds correct :-)

RB compiler is just too slow to make a good 3D engine
from scratch... and its not the oop getting in the RB just has a slow compiler.

See right now you on OS-X you could write a good 3D engine using open GL and java and it run great.

Sure I would like to look at your 3D code..
See it it still works in RB3.5...
email it etc...



10-15-2002 08:26

Posted by:
Mark

Click Here to Email Mark   Find more posts by Mark

Tables access

Talking of data encapsulation, why isn't there a function so that reference tables can be accessed by the application in the same way as Visual Basic? Any plans or ideas on this?
Thanks, Mark

10-15-2002 19:12

Posted by:
Mark Tully

Find more posts by Mark Tully

Reference Tables

I've not used Visual Basic, what are its reference arrays used for?

Mark

10-22-2002 21:50

Posted by:
Mark_667

Find more posts by Mark_667

re: tables

With it being a Microsoft product, these can be used for importing Microsoft Access tables, as well as things like matrices, which some users have complained about the layout in TNT in the forums. Anyone else got more examples or ideas on this?

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.