Beginner - help making starter game

I’m on a Mac OS X (10.6.8) with FrobTads
I do have Xcode, but I’m not sure how they are supposed to interact (some of the instructions say you need it but never say what to do with it…)

I’ve been following all the directions from the TADS website for the creation of their starter game.
I both the text files they tell you to create to start with and in the correct folders.
The command “t3make -d -f MyGame” creates a string of responses ending with:
-> obj/instruct.t3s
symbol_export /usr/local/share/frobtads/tads3/lib/adv3/en_us/msg_neu.t -> obj/msg_neu.t3s
symbol_export MyGame.t -> obj/MyGame.t3s
error: unable to open source file “MyGame.t”
Errors: 1
Warnings: 0

This was supposed to create the MyGame.t3 file in the MyGame directory… but it doesn’t.
The command “t3make MyGame” will create _main.t3s in the directory; however, nothing will open the file.

You don’t need XCode if you installed FrobTADS using the OS X installer (which you probably do.) You only need it for building from source.

Is there a MyGame.t source file?

…no. The manual said to save it as MyGame.t3m. I’ll try changing.

With the MyGame.t file, this was the response:

:mygame dianerankin$ t3make mygame
TADS Compiler 3.1.3 Copyright 1999, 2012 Michael J. Roberts
Files to build: 6
symbol_export /usr/local/share/frobtads/tads3/lib/_main.t -> _main.t3s
symbol_export mygame.t -> mygame.t3s
mygame.t(1): error: expected function or object definition, but found “-”
mygame.t(1): error: expected property name in object definition, but found “=”
mygame.t(2): error: ‘=’ required between property name and value - found “-”
mygame.t(2): error: invalid lvalue - cannot assign to expression on left of “=”
mygame.t(3): error: ‘=’ required between property name and value - found “-”
mygame.t(4): error: ‘=’ required between property name and value - found “-”
mygame.t(4): error: property “obj” already defined in object
mygame.t(4): error: ‘=’ required between property name and value - found “.”
mygame.t(4): error: expected integer, string, symbol, ‘[’, or ‘(’, but found “.”
mygame.t(6): error: ‘=’ required between property name and value - found “-”
mygame.t(6): error: ‘=’ required between property name and value - found “/”
mygame.t(6): error: expected integer, string, symbol, ‘[’, or ‘(’, but found “/”
mygame.t(7): error: ‘=’ required between property name and value - found “”
mygame.t(7): error: expected integer, string, symbol, ‘[’, or ‘(’, but found “”
mygame.t(7): error: property “MyGame” already defined in object
mygame.t(7): error: expected property name in object definition, but found “”
Errors: 16
Warnings: 0

It did create another _main.t3s file but I still don’t know how to open that.

The t3m file is the project file for your game. It tells the compiler which files to build. The starter game file listed in step 1b.6 of the Quick Start guide must be saved as “MyGame.t” (yep, the guide fails to mention this.) The extension “.t” is for actual TADS source code files. These are the files where you actually program your game.

In order for it to be a bit less confusing, you can alter the last line of the makefile from:

-source MyGame

to:

-source MyGame.t

The extension “.t” is optional inside makefiles, but it makes it more obvious which file is meant to be compiled (in this case “MyGame.t”).

.t3s files are of no importance to you. These are intermediate files created by the compiler.

Ok. I changed the file to “MyGame.t” - the one I’m looking at didn’t say what to save it as, just that it should be saved under the MyGame directory.

I’m still having a problem with step 8 : t3make -d -f MyGame is only creating " _main.t3s" not “MyGame.t3”

Just to be sure, you are looking at this guide, right?

tads.org/t3doc/doc/t3QuickStart.htm

Save the text listed in 1b.4 as “Makefile.t3m”. Then save the text from 1b.6 as “MyGame.t”. Both files must be in the same directory. To be sure that the “obj” directory is going to be created, add “-FC” to Makefile.t3m (you can add that right after “-Fy obj -Fo obj”, so it becomes “-Fy obj -Fo obj -FC”). Then, build the game with just “t3make”.

Yes, that is the guide I’m looking at.
The obj folder filled with .t3s files.

There is still no .t3 file to launch the game (?)

I can not explain why there isn’t. I just tried it exactly as I described it, and at the end of the compilation I get:

        compile MyGame.t -> obj/MyGame.t3o
        link -> MyGame.t3p
        preinit -> MyGame.t3

And I’m left with “MyGame.t3” in the current directory.

obj/msg_neu.t3s
symbol_export MyGame.t → obj/MyGame.t3s
MyGame.t(10): error: ‘=’ required between property name and value - found “-”
MyGame.t(11): error: unary ‘-’ operator requires numeric value in constant expression
Errors: 2
Warnings: 0

This is what it ends with. I’ve been trying to figure this out for a week… I was also looking at the start guide at www. How to build FrobTADS on Mac OS X - IFWiki

Everything works until I get to the building section. The last check that… "contains (among other things) these files: frob t3make tadsc " … The only one that I have is frob. Could there be a chance I missed part of the download?

Nevermind… I went through and checked the MyGame file and found the line 10… I’m not sure about the second error, but I fixed the first one and the MyGame.t3 file appeared!
…What do I need to open the game file?

Btw, are you using the proper FrobTADS installer actually? That ifwiki page refers to building FrobTADS from source, which I don’t actually recommend if you don’t know what you’re doing. You can get the installer here:

tads.org/frobtads.htm
(“FrobTADS installer for Mac OS X”)

You can either use the “frob” command-line interpreter included with FrobTADS, in which case you start the game with:

frob MyGame.t3

(With “frob --help” you get a list of options you can use.)

Or, you can use QTads, which is a GUI interpreter:

qtads.sourceforge.net

Simply drag&drop the game in the QTads window or open it through the “Game->Open” menu.

Honestly… I had both… Thinking something should work eventually… But I just took all of it off and reinstalled the FrobTADS installer for Mac OS X

From the terminal : frob MyGame.t3

Runtime error: nil object reference
[Hit any key to exit.]

I’ll try QTads.

I got the same thing in QTads “Runtime error: nil object reference (The game has ended)”

Is this what it was supposed to do?

Nope. Make sure you copied the example game exactly as given in the guide. Also, since you had a bit of a mess previously with two different versions of the compiler installed, make sure the game has been built properly. Delete all files except for Makefile.t3m and MyGame.t and run t3make again. This should hopefully give you a correct build.

Edit:
You can always delete compiler-generated files with “t3make -clean”, but this is supposed to only work after you’ve already have a good build.

It works!!!
Thank you so much!