Previous Blog Next Blog
Prev/Next Blog
by date

A scripting interface?

A scripting interface?
Name:Thomas Shaw 
Date Posted:Oct 03, 2006
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Thomas Shaw

Blog post
Feeling inspired by Mark's Cutscene Creator blog post, I thought I would toss this idea out to people.

First of all, this is NOT something I know how to do at the moment; just something I am thinking about trying to get created or learn how to create myself. I am also interested in hearing from people about their own thoughts on how this could work, whether or not you would find something like this useful, and whether you see something here that will be particularly gnarly to figure out how to do.

I have been thinking alot about this topic lately.

As an artist, working mostly alone, it seems like alot of my time is spent on navigating folders/ fixing typos/fixing broken scripts etc. rather than doing art. For an Indy developer (or just a single person like myself), that is alot of "non-productive" time spent. Surely there must be a way to help manage scripting?

I have been imagining some sort of standalone application or TGE GUI to take the various navigational annoyances out of the types of scripting we do.

Since I work mainly with art and specifically characters, I thought up an interface like this:



Basically, it would just parse the various files that involve the characters; looking for certain words and putting whatever is to the right of the "=" in an editable box in the gui.

This way, you would only be able to edit info that is intended to be editable. For me, this is very helpfull because on cold dark nights when I am very tired, I tend to "edit" things I shouldn't... like actual code. Woops.

Also, when I am tired, I find myself going in loops of opening the wrong files in the wrong places, and all sort sof other goofy mistakes. This would help alot with that.

Everything in that pic is pretty self explanatary I think, except maybe the "Scan files for associated data.." check box.

That idea comes from me trying to imagine how to actually make this app usefull and work with the existing hierarchy of files and folders of TGE.

Since I would want to be able to edit all the relevant entries for a character, I would need to access several different files in the default TGE setup. So I thought maybe there would be a way to automatically scan files for data that is referenced to each other and load that data into the Character Manager editor. For example, I have my "rge_d" character loaded into the editor, it would be cool if you could automatically scan certain files for things that reference or are relevant to that player and then load that data into the appropriate slots in the Character editor.

I'm not sure of the "logic" that could be implimented to accomplish this... Would a simple search for keywords in the files be enough? But what would it do with keyword matches that didn't fit into any of the editors categories, as would probably be the case with different people's game builds? Maybe there would be a tab for "Misc" where it would list out the lines from the code that had hits that don't fit into any category.

At any rate, I think this would be a really cool resource, that could also be implemented for any scripting where you need to have access to several different files at once.

Recent Blog Posts
List:07/09/07 - A script to setup character nodes in MAXscript
03/01/07 - Moved to TGEA
11/10/06 - Wishfull thinking #2: Shapes on Terrains
10/03/06 - A scripting interface?

Submit ResourceSubmit your own resources!

James Thompson   (Oct 03, 2006 at 19:40 GMT)
Hey that looks great

Paul /*Wedge*/ DElia   (Oct 03, 2006 at 19:56 GMT)
Though this is an interesting idea in it's own, if you at least want access to multiple files at once, get a script editor like Torsion or Codeweaver. They will keep a tree view of your project and all your open files in tabs, so you can easily move between the files you need to work on.

Mark   (Oct 03, 2006 at 19:57 GMT)
I would love to see some folks dedicated in making Torque more intuituve and streamlined for individuals who simply don't have programming knowledge or education. An alternative to searching this site for "how to do this and that", and then needing to flip through lines and lines of Torque's seemingly infinite quantity of code to implement a rather simple thing into his/her game.

Certainly things are being done in this respect, with Starter Kits, Constructor on the horizon, Built-In Editors, etc. But none of these things harness what people are truly trying to do here, to create games in their vision, their unique ideas, and not just another First Person Shooter, or another RTS.

I'm not saying these are bad things to have here, bless them, they are a huge help. I'm also not saying TDN and the resources here are not helpful. They truly are.

I think there should be a grand, easy access portal to everything Torque has to offer. This would take a tremendous amount of time to actually accomplish.

A program, working with Torque, can concieve every possible thing a developer may want to do with their game, without needing to even TOUCH a line of code.

If the game developer wants a 'stamina' system in his game, he checks it off in the program.
If the game developer wants an ammunition screen in his game, he checks it off.
If he wants to get his newly created weapon into his game, he introduces the weapon to the program, and the program does it all for him.
If he wants the player camera to act a specific way, the program does it for him.

Your idea here is exactly what I mean. It would be fantastic.

It's this sort of thing I would like to see in Torque. A bunch of check boxes, selections and options, without needing to open a single script file. Yes, it would take a huge amount of time and effort to get finished.

But imagine how absolutely fast it would be to create the fundamentals for your entire game, and possibly far more, in just a single day.
Edited on Oct 03, 2006 20:02 GMT

Allyn "Mr_Bloodworth" Mcelrath   (Oct 03, 2006 at 20:05 GMT)
Take a look at the Dragon script editor for Furcadia. Its how i first learned some good concepts for scripting.

(No jokes)

Joe Rossi   (Oct 03, 2006 at 20:10 GMT)
I do something like this using IUP and Lua, but not Torquescript.. I have a GUI that lets me/anyone click on a TGB object and edit some game specific values, then save to a scriptfile that my particular setup can use. I think that's the problem though.. it would probably have to be pretty game specific to really be useful. I don't mess with parsing/editing Torquescript or datablocks like this because well.. the editors seem to do a good enough job of that for me.

Jeremy Alessi   (Oct 03, 2006 at 20:25 GMT)
Check boxes don't go very far. You need code to make things different otherwise everyone is just changing up some basic properties of the same game. That said, a dedicated IDE where you can write code helps a lot. It's rather unfortunate I think that GG doesn't have a dedicated one but programss like Torsion make up for that.

As for this specific little app, it would be a decent addition to creator I think on some level. It would be nice if you could create different character properties on the fly in game. However, I think there maybe some issue with the datablocks so maybe not. Anyway, it wouldn't be a bad addition but it wouldn't be all that useful as far as real production either. Good for learning about the engine I suppose.

John Rockefeller   (Oct 03, 2006 at 21:25 GMT)
This looks like a great idea and would really help me out with my racing game where we would be able to dynamically (and easily) adjust car values until they feel 'just right' without having to get down to notepad.

Mark McCoy   (Oct 03, 2006 at 21:43 GMT)
^ Exactly, having an editor for the values for whatever you are tweaking would be very cool.

The more extendable/generic it is, the better. An in game datablock editor that allows you make tweaks to all your datablock properties (both stock and custom) on the fly is a great idea. The key is allowing you to test settings quickly and iterate to the next test in less time. The more you can iterate in less time, the better you will be able to make your game.

Thomas Shaw   (Oct 04, 2006 at 02:37 GMT)
Yah, the whole point of this idea, is that, I am constantly going to script, editing basic values, saving, going to the engine, seeing that it didn't work, going back to the scripts, ad nauseum. Opening, closing, finding files that are relevant, scanning through lines of code to find a value I need to change, until my eyes fall out of my head.

It gets old fast.

Plus then I have to try to go back to "Zen Art Zone" in my brain where I do good art. It's a pain.

Also, although I know now, where all the relevant code I need to work on is, it was a long learning process of reading documentation, forums, resources etc.

Maybe this would be a nice helper for people who aren't that interested in changing out a ton of code, but just want to get something up fast.

Actually while I was away from the forums today, I thought about another thing that I could add: a button to create blank default datablock, like say you want to create floating healthpack that is animated to rotate, you choose "animated in-game object" from a short list of equally generic objects. It would then create the appropriate script for you, and you could just fill in the blanks or edit it as needed. --- I have seen so many posts about how to do this sort of thing...

John McArthur   (Oct 04, 2006 at 17:45 GMT)
Just some thoughts...

Quote:

Yah, the whole point of this idea, is that, I am constantly going to script, editing basic values, saving, going to the engine, seeing that it didn't work, going back to the scripts, ad nauseum. Opening, closing, finding files that are relevant, scanning through lines of code to find a value I need to change, until my eyes fall out of my head.



As a wannabee developer, this is one of the most annoying things for me working with torque. I dont know torque well enough...maybe theres some ways around this. I do remember working on a little pet project in directx where certain files would reload automatically in game(effect files) if a timestamp of file was newer then original. Having something like that in torque for scripts, etc would be so nice. Also, starting out, learning this stuff is hard enough, but having to dig between the different "client" and "server" folders and files is hard.

John

Mike Pearson   (Oct 04, 2006 at 20:51 GMT)
Hey Guys,

We are working on some tools like this over at www.netgeos.com. Not much info up yet but I'll post more later.
Edited on Oct 04, 2006 20:51 GMT

Thomas Shaw   (Oct 05, 2006 at 16:13 GMT)
@Mike Pearson, re: Netgeos.. At the risk of hijacking my own comments section, lol:

So, your tools are intended to be generic enough to be useful with any game engine/game that someone wants to mod?

This brings me to another point: As some of you have pointed out, this would really not be very useful unless it was flexible. Typically, people start re-arranging Torques code and folders pretty early in a project.

So, what if there was some sort of setup wizard? Like, the first time you run it, you could go through a tedious process of telling it where your files were, and categorizing them. So I would tell it, this file "rge_d.cs" is a character file and it is located in ..../blank folder.

Actually, now that I think about it, that is what the scan for associated files would be for. It could figure out what files were what by looking for certain, always-present code that is specific to a type of script.

This app actually might be cool as a add-on to Torsion or other IDE...

Mike Pearson   (Oct 06, 2006 at 15:10 GMT)
Yes our hope for the future of ModMaker is to be able to function with several different engines but for now we are focusing on TGE/TAT. Our first product is going to be ModMaker Weapon Editor which should be available in November.

You must be a member and be logged in to either append comments or rate this resource.