forums

TNT Basic Forums > TNT Basic - The Open Source Edition
OK... Where now?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

11-24-2006 02:25

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Right, this thing is not going anywhere at the moment because we can't get the original source to compile (properly) under XCode... So what's the answer?

I don't think (IMHO) that trying to bludgeon legacy technology into the modern IDE is the way to go, and I'd appreciate the feedback of those that still use these forums. I think that the best course of action is not to try and get the new IDE to compile the old code, rather get the old code to work under new technological advances... We have the source (for source read 'logic') so why not try to implement this logic using up to date methods?

I know it's a big decision, but it's one that we need to make at some point and now seems as good a time as any. XCode can't compile Classic, and PPC is already the 'New Classic' (Rosetta), so how far back do we want to go?

I guess my question is "Where Now?"

Do we spend months getting Hardware mode to work under OS 9, or do we look to optimized OpenGL graphics on a Mactel box?

I'm supposed to be working on this so would appreciate any feedback, positive or negative. I'm not asking for help, I'd just appreciate our users' opinions (but any help is obviously good...)

Danny (nods)

11-24-2006 05:38

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
Do we spend months getting Hardware mode to work under OS 9, or do we look to optimized OpenGL graphics on a Mactel box?
>>
Nice Work!
My opinions only.
Do the latter. Try to maintain some compatibility with OS 9 (So that, it is still possible to compile for OS 9), until 1.4, when it is left behind. Gives some time to people to switch...

11-24-2006 16:51

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

As I see it, TNT Basic needs to go 100% OpenGL; everything I've run that uses it goes top speed.
And cocoa/objective-c port would also be nice.

11-24-2006 20:28

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

i'm for rewriting it up to date (i could maybe help!)

i think people need to understand that when you keep your old OS you also choose to keep your old apps.

needs to go fully OpenGL either.

And at this point... if parts are to be rewritten, a question is to be asked: should we try to make it cross-platform?

11-25-2006 00:18

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

The ball is rolling...

Glad to hear you're also playing with it, and I totally understand where you're coming from with the cross platform stuff. Do we pick an Open Source Engine that is cross platform and base a newer version on that? I'm not an advocate of a Windoze port (as I've said many times before, this is our baby) but I'm not adverse to a Mac app compiling to PC source if required.

We have kind of come to a cross roads, to move this on we need to use XCode, and it doesn't like PowerPlant (amongst others). We can't compile XCode to classic mode anyway, so PowerPlant is obsolete. If we need to rewrite a major part of the core engine with newer libraries then why not update them all? If a total re-write is on the cards we have to be looking at years rather than months, so where will OS 9 be in a couple of years? It would be like offering System 7 support...

I'd still like to hear people's opinions on this, and if anyone else is doing anything related to the development then please let us know. Now is the time to make big decisions on the future of this project. We have Open Source code that no-one can compile, let alone modify, and we need to know how we are going to address this issue before we can do anything else.

Keep the opinions rolling in... We need a decision on this.

Danny (nods)

11-25-2006 00:26

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

I think there should be rudimentary support for windows...

eg. Windows would be able to use the interpreter to run the source.

This might interest some windows developer into creating a TNT basic IDE for windows.

And... so if there is a rewrite, will all our projects become useless in the rewrite? If this is the case, would be it be possible to rewrite TNT basic part by part, so that in each release people only need to change parts of their game to remain compatible with TNT basic?

11-25-2006 00:49

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

for cross-platform... well i don't like windows either, but they're here... and there's also Linux and other Unices

Quote:

If we need to rewrite a major part of the core engine with newer libraries then why not update them all? If a total re-write is on the cards we have to be looking at years rather than months


I'm not so sure... TNT does not use so many advanced features, getting sprites and stuff working should be pretty straightforward.

But would the interpreter would still work?

And even then, another question. Should we keep the same user API (if i can call it this way) and syntax at all? Right now many parts are a bit crappy - can't even get return values from procedures in a decent way.

Of course my opinion on this is more or less valid since i'm not a big basic fan.

11-25-2006 00:53

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Or, in short... how close to the current TNT should a new version be made?

11-25-2006 01:04

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

maybe ClanLib should be looked at... it's cross-platform and *seems* to do everything TNT does - would make development very quick. (i say *seem* because i never tried it, i'm just throwing out ideas for what they're worth)

11-25-2006 23:25

Posted by:
pseudoprometheus

Location:
Omaha, United States

Find more posts by pseudoprometheus

I would say go for the re-write. Someone makes a good point about how 'sticking with the old system means sticking with the old apps', so as long as there's a functioning copy of TNT that works in OS 9, we should be alright. More can be done on that later if there's an overwhelming demand for it.

Meaningwhile, I think we ought to be looking ahead, and re-writing TNT's code so it'll be optimized for current technology. As long as there's compatibility with older TNT source files, and the programming language stays as Basic (since that's the point of making TNT available to begin with), I don't think I'd have any complaints.

Cheers to allnodcoms and someone (and anyone else who decides to join in) for your willingness to make the effort. : )

11-25-2006 23:44

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I think the old projects so be supported as much as possible, but i think at some points compatibility will need to be broken in order to get to some higher points.

Adding new features is not enough, the language must support them. I think we'd at least need:

- some kind of C struct or similar (fixing the array multiplication there is now)
- being able to get return values from procedures
- being able to split the code in many files. putting everything in a single text area makes it impossible to make big projects

probably more... these things should really be thought. do we keep the same interpreter at all? i didn't look at it so i'm not sure how it works

11-28-2006 05:52

Posted by:
Wil Hostman

Find more posts by Wil Hostman

I'm not a programming language hacker, so I'm not speaking authoritatively.

I am lead to believe, however, than an interpreter port isn't that hard to do (RHN of Chipmunk Basic implies this repeatedly... and the inform/z-machine system implies similar).

I'm also lead to believe that compilers are much harder to write and/or port across architectures.

I like the language. I honestly liked Visual Mac Standard Basic better, but it wouldn't run on 9.... It was as easy as newton programming.

But the ability to get a run-time for Intell, PPC, WinME/2K, and Linux would be ideal.

11-29-2006 18:06

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

so... Danny?

12-01-2006 00:22

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

My stand on this... (apologies for the length!)

First off, the reason I asked the question is that I was interested in hearing peoples opinions on how they wanted this thing to move on. This is Open Source after all and we should all have a say in what goes on.

My observations: I can't see this moving very far with the current implementation as it's too bogged down in legacy code. To go further we need to lose the reliance on the Metrowerks APIs and replace the basic 'Toolbox' calls with ones from the newer Cocoa / Carbon APIs. The render code needs to 'properly' use the latest OpenGL or Quartz libraries, sound needs to use OpenAL and networking needs to transition to Bonjour standards. With these adjustments the current language (as it stands) could be ported to the newer technologies, retaining compatibility with the existing IDE / project files, and forming a new base from which to work. Basically I'm saying take the existing TNT syntax and implement it with newer and more sustainable frameworks. Open Source libraries as also an option, as 'someone' has already mentioned. ClanLib, plib, DevLIb-SDK and SDL are all options, but then we're tying ourselves to someone else's project, and we can only go as far as they want to go. It may give cross platform support, but I'd rather we captained our own ship in this respect. I am purely talking about the basic engine as it stands here, not additions to the functionality of the language or improvements to the IDE, just getting the code we have already working efficiently on the hardware we are now using.

I was speaking with Mark a long time ago now about the way in which the interpreter actually interprets, and he said then that if he did it again he would do it differently. I'm inclined to agree, I think a VM approach makes more sense than the instantiated language object with over-ridden run method that is used currently. I did some work on virtual machines about 8 - 10 years ago (yes, I'm old!), and have done a fair bit of assembly coding in my various IT roles.

Another thing I think has held this back is the lack of any real documentation, so I also suggest that any new code has a thoroughly documented API reference to aid future expansion.

Moving on...: Once we can get a version of the source to compile and run the current syntax effectively under XCode then we can move on. The transition to newer APIs may well fix a few of the more common bugs and / or performance issues with the system anyway. Other issues can be ironed out. This gives us a new, functional and documented base, which uses software that is freely available and likely to be around for a while. Then, and only then, should we start thinking about the future of the project. Our goal then, as I see it at this point, is to rewrite the runner engine in XCode so that it will run a game saved by the current version of Hieroglyph. This makes the most logical sense in my view, but I'm open to comments here...

The Windoze issue: I don't see a need to write a windoze version, and my views and reasons for this can be found elsewhere on this forum. I for one will not go out of my way to write one, but neither do I suggest biasing the code against a cross platform port (which is definitely the case with the current system). One of our members (appleide) is already writing an alternative editor in RB, and good luck with this by the way. This could be compiled for windoze to allow the other 99.9% of the world's computer users to write TNT source code, but even with the move to a less 'Classic' way of handling resources it wont be able to deal with saving the additional data (unless the final project was to be compiled by a version hieroglyph running on a Mac!). With a VM approach to interpretation it would be possible to 'compile to byte code' and have that code run on either platform, but only on intel Macs. We're now talking about raw, multi-byte binary data, so endian issues arise, which would rule out G5 and earlier processors without serious additional work.
BUT...
This is Open Source... If someone (but not necessarily 'someone' ;) ) wants to do a port then by all means go for it. We just need to supply a standards based source with good documentation and a revised way of handling external resources (PCs don't do bundles or Mach-O packages).

Conclusion: I feel the source for the runner engine needs to be rewritten from the ground up. The time frame for this can be discussed, but with very few developers (who all have real life commitments) we 'are' talking a long time. We need to generate interest in this, but we have released C++ source to a basic language, and for the most part the people on this site (by the very nature of it) are having trouble with BASIC. What chance do we have of getting C developers?
It's not all doom and gloom, we can get this moving as long as people are still posting to these boards. But I've rambled on enough, I'll leave you with my thoughts and I welcome your feedback...

Danny (nods)

12-01-2006 00:52

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Overall i agree with everything
we need a rewrite as a VM.

only thing i more or less agree with is about cross-platform... oh well i think we'll never agree on this one :) as i said, i don't like windows either, but i'm a big Linux supporter - so all the projects i've worked on up to date were all cross-platform

however, compared to you i'm an amateur and it's your project after all ;) i could help but i'm not sure at all i have the experience required to be a main developer (as of now i'm building a rather big project on my own, but it's not as fast as it could, the code is not as clean as it could either, and i'm not used at all to working with other people's code)

12-01-2006 00:57

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

ohh forgot to mention: as of now i have lots of time to spend on this though

12-01-2006 01:01

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

BTW i've used OpenGL quite a lot, though even though i'm not exactly sure how to do heavy optimisations. I wonder how the current implement implementatin is actually slower than softwer mode - all programming i did with OpenGL gave lightning-fast results.

12-15-2006 00:45

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

so... anything happening here?

12-23-2006 05:06

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

ditto.

12-23-2006 20:02

Posted by:
Mark Tully

Location:
TNT HQ, England

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

Moving TNT Basic to the newer APIs used by OS X would make it a lot more future proof and generally make it able to take advantage of new technology more easily.

The most obvious way to do this would be to start afresh, however I think it would mean a LONG time would go by before the replacement got anywhere near the functionality of the orginal. Like Danny said, it would be a long term project. If a rewrite is attempted, I would seriously consider building it as a cross platform tool, perhaps using SDL, OpenGL and OpenAL. That way it would run on OS X, Windows and Linux.

Another possibility is to gradually upgrade the current TNT Basic to work with the new APIs. That would yield continuous improvements, but to be honest, probably won't be as much fun for everyone as writing it all again from scratch!

I'm on hand to offer help and advice to whoever wants to take a shot at it, whichever route is chosen, but I'm afraid I'm not going to be able to commit any code time at the moment.

Cheers,

Mark

01-13-2007 16:44

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Right, the Bull has been grabbed...

...firmly by the horns in fact.

I'm going for it!.

Here's what I've got in mind and what I'm doing at the moment.

Project Goals
To implement a Virtual Machine to run projects generated with the current Hieroglyph IDE, or any future IDE which produces ".tbproj" files that comply with current standards. It should be a direct replacement for the existing TNT app, and should implement all of its functionality:

a) Syntax checking.
b) Runtime Interpretation.
c) Byte Code 'compilation' of 'stand alone' projects.
d) Separate engine for binding to 'stand alone' projects.

Project Implementation
The new TNT app will use a cross platform, 3rd party library to provide its functionality, and will be available as an XCode project written in C/C++. The library currently on the table is PLIB (though functionality linking is still some way off, so this may change), and a complete list of its features can be found by clicking here. Binaries will be available for all OS X compatible Macs. There will not be a Classic Binary Version due to restrictions within XCode, although anyone with a copy of CodeWarrior should be able to produce one with minimal work.
A Windoze / Linux version should also be possible with minimal work, and while I will not actively support such a conversion I will not bias the code against it. Therefor I propose a 3rd generation of resource storage, as both of the current strategies are incompatible with non-Mac based platforms.
Extensive documentation will be available for the resource file format, the internal architecture of the VM and the byte code syntax to assist in future expansion.

Future Plans...
I would really like to introduce a 'real compiler' for TNT, allowing for true binary applications to be produced. This could either be implemented by producing a C/C++ project to throw at GCC, or by writing a custom linker to build binaries from the runner engine's code and wrapping it all up as a MACH O package. This would obviously not be cross platform (one of the main reasons for me avoiding Winux versions).

Once a stable version of the VM is running under OS X, with current bugs and issues resolved, I want to start to extend the language. This would come from things that have been requested on the Sourceforge request list or posted to these forums. Don't start writing in just yet though, as Mark has confirmed we are a Long way from here. I am not expecting a stable version this year, and I would expect the preparatory work and research to last several months.

I'm looking into the possibility of a 'plug-in' architecture for the new version, allowing updates to be released as add on packages. This feature is best described as 'embryonic'... (definition: "Nice idea... Not a bloody hope!")

A final note, I'd also like to rewrite Hieroglyph at some point in the future. As I've posted elsewhere in these forums, I started doing some work on a new IDE in RB, work on this went by the board when the open source stuff came along, but I will probably pick this up again. I want to implement a graphics editor, multi file support and various other bits and bobs. This may be my 'buffer project', the thing I work on when TNT starts to fry my head!

Currently I'm still very much at the design stage, I'm working through the VM internals and looking at options for the parser. I will post all updates here, and provide links to any documentation or interim releases as I consider them viable.

So, that's the state of play... Looks like being a busy year, but at least it will give me something to do while I wait for the iPhone! (Oohhh, want one!!)

'Till next time...

Danny (nods)

01-13-2007 18:24

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Good ideas

Just as a question... there at least a few open-source VMs around - do we gain that many advantages from starting a new one from scratch?

Well anyway i wouldn't be of much help for the VM itself, but when it comes to implementing the functions on top of the VM, or maybe also in writing a hieroglyph alternative, i probably could help

01-13-2007 18:28

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

as for supporting current projects - we probably will need to change the way graphics and audio are stored, since PICT and SND are long deprecated and not supported anymore.

01-13-2007 19:03

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Good points...

We do gain through writing our own VM, we are building it with the express purpose of running a single instruction set and optimizing performance for a games environment. I've done a fair bit with this sort of stuff previously (albeit a fair while ago!) so I have a good understanding of VM architecture. VM may even be a bit of a misnomer anyway, but it covers what I plan to do with it.

Resource formats within tbproj files is beyond the scope of this project, but when 'compiled' the files will be converted to more universal formats. I plan to standardize all resource types to a single format at that time, one graphic format, one sound format etc. This reduces runtime checking and means that only one handler is needed to play or display. Quicker and smaller... I'm thinking .png for images (because of the alpha stuff) and maybe .wav for the sounds, but nothing is confirmed as yet, I'll see what works best.

Danny (nods)

01-14-2007 09:46

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

If there's going to be a "VM", would users have to download it by themselves like Java, or would it be like now, where the app is basically Hierogryph code+graphics+sound+TNT Basic, all into one?

Also... for language I have got a small feature request... to be able to seperate the code into multiple files.

Thanks for all this, by the way!

01-14-2007 15:07

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

no need to be downloaded seprately

a TNt VM would be small enough to be bundled with your game

what is big in Java is not the VM anyway, it's the standard API libs

01-14-2007 15:13

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

It will be a separate download to start with, by that I mean during early development. It'll just be a case of backing up your old copy of TNT Basic.app and replacing it with the new one.
When we get this thing up and running it will be exactly the same as it is now, the new TNT app will be bundled with Hieroglyph.

I'd like multiple file support as well, and when Hieroglyph gets sorted it will definitely be there...

Danny (nods)

01-14-2007 15:58

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

question about multiple files...

how do we work this out? in C it's easy, since everything is in functions. In TNT, you can put code outside procedures... so we have a main file, and in others you can only put procedures?

01-14-2007 16:46

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Pretty much...

There are many advantages to breaking up code into smaller routines and saving these out to separate files which are linked at run or compile time. As you've used C before you know exactly what I mean, it's the way C works and it does it very well. Multi file support would give TNT Basic users the option to link to (or #include if you like) separate, stand alone modules. This opens up a world of opportunity for additions to the language that are written in the language.

As an aside, the #include directive is one of the things I'm looking at with regard to plug-ins. It would mean using something like the header file (for syntax checks etc.) and a pre-compiled library of binary (or byte) code to be linked in. As I said though, very early stages here...

Back to files again, it also allows the use of 'toolkits', a particular favorite of mine. If you have some pieces of code that you use often, and you know they work, why re-write them every time? Just save them to a different file and include them in the projects that needs them.

The way things worked would need to be monitored by the IDE, and it's not just a simple case of breaking one big file into a number of smaller ones. A useful addition though, so worth the extra effort.

Danny (nods)

02-09-2007 00:47

Posted by:
sabshire

Location:
nitro, wv

Find more posts by sabshire

i'm up for it

Sounds like a great idea! I'm on board! I can't really help too much on the coding side, but I am more than willing to test the fire out of anything you have. TNT basic has been a lot of fun for me, and I would love to see it continue to grow.

03-11-2007 10:56

Posted by:
Wil Hostman

Find more posts by Wil Hostman

Roadmap

I'm just a part time basic programmer with some C and Python experience...

I like the language for TNT.

I like the idea of updating to a new library set to propel it forward.

So long as the code from old editions will run in the new, it's no skin off my nose how it does it.

Cross-platform compatibility is a definite plus, though, in terms of acceptance of OS Software beyond small niche.

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.