Adventure Creator Tips and Tricks

Games in project or under development. The posts and games in this section can not ask for money.

Adventure Creator Tips and Tricks

Postby tlaero » Sun, 13Dec08 20:44

On looking at a recent download, I realized that some people might not know about some of the features I take for granted in AC. I thought I'd start a thread where we can share some tips and tricks for making games with Adventure Creator.

Game View
This is the most important tip I can think of. If you're not using game view, you're missing a ton. Start it with Edit->Show Game View. This brings up a second window with all of your pages in a list. Click on the page name (in bold) to open that page. Start typing the page name to scroll to that page. Use Edit->Scroll Game View to scroll the Game View to the currently open page.

Spell Check
Edit->Dump Game Text sends just the titles to a text file. I then open that text file in Word and look for red squiggles. Of course, you have to fix the mistakes in AC. Changing the text in Word doesn't help. But at least it'll tell you what you misspelled.

Find Broken Links
Under the Edit menu there are two settings. "Check Links in Game View" and "Treat Self Links as Broken." When these are on they have a checkmark. If they're not on, select them. The first will put red text in Game View for any html link that points at a page that doesn't exist. Good for catching typos in your links. The second puts red text if you have a page link to itself, since you rarely want to do that.

Image Border
In Meeting Keeley, if there's a hit target on the picture, the image has a yellow boarder. This lets players know when to go searching the image for things to click on. If you want your game to act this way, set a checkmark on "Edit->Automatically Add an Image Border."

Test This Page
To open the current page in a web browser, select File->Browse HTML.

Create a new page just like the current one
I never use File->New. I always just change the name in the File: textbox and hit save.

Change the font size
It's possible to change AC's font size, but because I coded myself into a corner (AC has grown pretty organically from something simple to a fairly complex code base), it's not at all clear how to do it. If you want to know how, let me know.

That should be enough to get started. Anyone else have any tricks they'd like to share? Or, do you have questions about what anything in AC does? Ask away.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Adventure Creator Tips and Tricks

Postby Super » Sun, 13Dec08 20:59

Is it possible to have text be different colors? I don't need it for Celina since you'll only ever be talking to her, but if in another game I want to have you speak to a third party, I think it'd be the easiest way to differentiate between them.

Also, thanks for the spell check hint, I'll use that when I'm done with the rough draft.
Super
legend of the South Seas
 
Posts: 545
Joined: Wed, 11Aug24 20:59
sex: Masculine

Re: Adventure Creator Tips and Tricks

Postby tlaero » Sun, 13Dec08 22:55

The toptext is just HTML. So the same way you can add <br> and <i></i>, you can add text color. That said, I never use that. I prefer various writing techniques for distinguishing characters the way books do it.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Adventure Creator Tips and Tricks

Postby Wolfschadowe » Mon, 13Dec16 23:22

So, the developers and experienced folks out there will read this and say "Yeah, duh," those of you who aren't coders may not know this, or how easy it is once you figure it out.

Create your own small functions that you can re-use and minimize your time in _game.js. The easiest way to do this is to just chain built-in functions.

For example, what if there are two scoring elements, say two girls, in a scene and you want a player action to make one happy, and one angry? (for example, you kissed your girlfriend's friend, instead of your girlfriend?)

AC includes a varPlus1() function, but you can only use it once in an AC onclick box. So you could either make your girlfriend angry with varPlus1('gfAngry'), or her friend happy with varPlus1('frndHappy'), but not both.

Create a function in _game.js called varPlusPlus1() Like this:
Code: Select all
varPlusPlus1(var1,var2) //var1 and var2 are creating variables that are only valid in this funciton. They contain the entries you make using the single quotes in AC
{
varPlus1(var1);
varPlus1(var2);

return;
}
Now when you are in AC, and want to make one character happier, and one character Angrier, you can just use varPlusPlus1('gfAngry','frndHappy'). Or you can do both happy, or both angry, or whatever. The main thing is that you don't have to write a new funciton each time.
This can be expanded with any built-in function. I've used the same method to create re-usable functions like varPlus1setVarChoose('frndHappy','gfRelationship',0,'frndHappy'',1,'friend.htm','gf.htm') This function adds one to the friend's happiness, set's the gfRelationship variable to 0 (because you kissed your GF's friend instead of GF you naughty player!) then checks if your gf's now ex-friend is happy enough to do somehting with you, sending you to the friend page instead of the GF page. You can use it anytime you want to add one variable, set the value on a second, and then check a third variable to determine where to go next, and you don't have to create a new function in _game.js each time. Here's what the code for that looks like:
Code: Select all
function varPlus1setVarChoose(plus,variableSet,setTo,check,chkValue,pagePass,Pagefail)
{
varPlus1(plus);
setVar(variableSet,setTo);
Choose(check,chkValue,pagePass,pageFail);

return;
}


The only limit is your imagination. For clarity I've named the functions to match what they are doing, but you could call them anything you want. Instead of varPlus1setVarChoose() you could use vP1sVC() or bob(), or whatever you want.

Wolfschadowe
User avatar
Wolfschadowe
legend of the South Seas
 
Posts: 559
Joined: Thu, 13Mar21 07:37
Location: West Coast, USA
sex: Masculine


Return to Projects

Who is online

Users browsing this forum: No registered users and 9 guests

eXTReMe Tracker