2012-08-15 18:10:56

@keyIsFull, feel free to send me your adventure files in an email to [email protected] and I can see how I can help.

Assuming you are saying that there are many places in your code where you update the time like so:
global.time += 1;
You could define a function that you call all over the place instead, such as:
function increaseTime(amount) {
    global.time += amount;
    sound("time_passed.wav");
    say("The time is now " + global.time);
}

Then just call:
increaseTime(1);
everywhere instead of setting the variable manually.
Note that any functions or variables you define are available all over the place in the engine so if you define the increaseTime function in one of your files you can call it from any of them.

Not sure if that was what you were asking about.

Hope it helps.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-08-15 19:03:42

I want a global functio that always runs to check the time. In this fuction I could put some if statements to check if global.time == x and then it could run somethng.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-08-16 00:53:36

Hay Ian, is it possible to make an object a container?  In my game I need 3 or 4 of them.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-08-24 14:11:30

In my adventure, since we can't remove locations, I use the context function to take you to the previous location whenever you enter. Annoyingly, it still says the name of the new location and the first menu option, which is inspect, THEN it goes back to the location referenced in the context call. It is rather annoying. Also, you should be able to create a music folder in the folder for your adventure to store its music instead of storing all the music in the global music folder, that way you could just zip up your adventure and send it to friends instead of having all these folders and extra setup instructions. Oh, plus you have to modify the main menu.txt file to include your adventure in the menu.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-09-01 05:12:24 (edited by Ian Reed 2012-09-01 05:15:03)

Hi all

Version 1.01 is now available.
It adds some slightly nicer error messages in a couple places.
It also adds a new function called removeLocation("pet store"); which is the opposite of addLocation();

It will now load music files placed in the Data\Adventure Game\Music or Data\Adventure Game\Adventures\[adventure name here]\Music folders.

As always it can be downloaded from http://BlindAudioGames.com

@nina0116, the engine does not support containers, though you could have a box item and the use action could create the items that were in it and destroy the box.  Optionally creating an empty box item at the same time.

@keyIsFull, regarding the global function to check the time.
When you say always run what do you mean?
Would it run whenever a key is pressed?  Whenever the main action menu is brought up?
Once per second?
10 times per second?

In the scripts folder there is function global_onKey(key, mod) {
This function gets called whenever someone presses a key.
I could likely add another global function that gets called based on when you need it called, let me know what you're thinking.
Also, if you're zipping up your game and sending it to people I'd love to see a copy.  I may be able to better help with things you need if I could see how it's working.

My apologies to both of you for the late response.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-09-02 22:30:11

NVM, I figured out a better way that uses a sequence variable instead of a time variable. Actually, come to think of it, a time variable would still be nice.
I was thinking, that from any location where you are, ou could have it say a message if a condition was met. For example

if(sequence==11)
global.say("THe bomb just blew up, and you are dead.")
If the entire adventure was in a building and you had an unlimited amount of time.
global.context("main menu")
ANd this could all be in a global.txt script file or something.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-09-03 00:40:28

Here is AGE version 1.02

I've added an elapsedSeconds() function that gives you a floating point number with the number of seconds that have passed since the game was launched.
There is also a new global event that you can tie into by creating a function called global_onProcessed();
This function gets called each time the game goes through it's processing loop which is roughly 10 times a second.

You can see examples of using both of these in the chillingHam sample that now includes a bomb.

@KeyIsFull,  I've implemented the bomb scenario you described in the bomb.txt file and the chillingham sample global_events.txt file.
Hope you find it useful.  I'm still interested in trying out the game you are working on.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-09-03 21:01:14

Here is AGE version 1.03

It fixes 2 bugs that KeyIsFull found.

1 A bug where removeLocation would not work if you called it from within an onEnter event.
2 A bug where the music() function would not restart the same music file after you had called the musicStop() function.

As always you can download the latest version at:
http://BlindAudioGames.com

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-09-04 04:38:13

Glad to see how the engine is coming along.  My first game should be finished in a few days.  To be fair the game is an unautherized adaptation of the nentendo game "Shadowgate".

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-09-04 05:13:42

@nina0116, sounds like a cool idea.  I played shadowGate a very long time ago.  I did not beat it though.
I look forward to playing the accessible version you make.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-09-11 21:16:24

Hay Ian, is ther a way to have the gae run a function in rooms no matter what action the player takes?  In shadowgate the player has a torch, and every action they take weather that is examing an object, taking an object, or using an object the torch gets dimmer.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-09-15 21:00:49

I've nearly finished my game, but I have run into a problem.  I need to know if there is a way to generate random values.  This is needed for a random riddle spoken by one of the creatures in the game.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-09-15 23:15:09

I haven't looked into how the engine itself works as deeply as I'd've liked, but since it uses javascript, maybe javascript's random numbers would work?

In which case, the code I'd use would be something like this:

function random_number(min, max) {
return min+Math.round(Math.random()*(max-min));
}

Which would be called like this:

var num = random_number(1, 10);

Which should set num to a value between and including 1 and 10.

But... I don't know how that would fit.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2012-09-16 18:29:38

Actually, it does work but not in the way you want. Remember case matters.
var k;
k=parseInt(Math.random()*10)
Creates a random number from 1 to 10 and stores it in k

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-09-17 21:10:10

Thanks guys.  The game should be finished soon.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-10-06 05:44:00

It's a shame there hasn't been any activity on this thread here for a while.  However I have a problem that someone may be able to help me with.  In shadowgate the player is able to take unlit torches they find as they search the castle.  The problem I am having is that the take function I have created to cut down on the number of torches the player sees in their inventory is giving me an error that doesn't make any sence.  Below is the file for an unlit torch.
Object
1 // parser version
// flags
inspect | It's a torch. An oil-soaked rag is wrapped around it.
take |@ take_torch();
burning torch |@ light_torch();
@
function take_torch(){
if(global.strange_torch == true){
say("as I pull the torch off the wall, I notice something strange about it");
createInventoryItem("odd torch");
reloadActionHandler();
}
if(global.dragon == true){
dragon_flame();
}
say("I pull the unlit torch off the wall.");
global.torches = global.torches + 1;
destroyItem(“unlit torch”);
if(global.torches == 1){
createItem("unlit torch");
reloadActionHandler();
}
}
function light_torch(){
global.torches = global.torches - 1;
global.lit_torch = global.lit_torch + 1;
say("the torch is lit.");
global.light = global.light + 45;
if(global.torches == 0){
destroyInventoryItem("unlit torch");
reloadActionHandler();
}
}

The error I am getting when trying to take an unlit torch is: Noesis.Javascript.JavascriptException: ReferenceError: take_torch is not defined.  Any ideas would be apreciated.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2012-10-10 04:58:28

Hi all, sorry for my lack of responding on this thread.  I'll try to do a better job of responding.

@nina0116, after the changes we made via email are you still having the problem with Noesis.Javascript.JavascriptException: ReferenceError: take_torch is not defined?

If not, let me know.

Thanks

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2012-10-11 23:23:46

no at least that problem is fixed.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2013-03-10 10:43:36 (edited by Ian Reed 2013-03-10 21:58:57)

Hi everyone,

It's been ages since I've released a new version of the adventure game engine.

For quite some time Nina0116 has been working on the ShadowGate adventure which is a port from ShadowGate for the original Nintendo.

I'm happy to announce that Nina0116 has completed the adventure and now you can try it for yourselves.

The ShadowGate adventure is really the highlight of the whole release but I'll include a changelog so you know about the other engine updates.

I want to give a big thanks to Nina0116 as the engine has been a bit of a pain to work with and Nina's feedback and willingness to trudge forward despite the engine's problems have really served to improve the engine.
I'd also like to thank Allan Thompson for his very thorough job of testing the engine and ShadowGate adventure.
Even now he has found a few minor bugs that I'm sure Nina0116 will fix soon, but we wanted to release the game as the game is completely playable and a really fun experience.

The game can be downloaded from http://BlindAudioGames.com

Here are the changes for AGE 1.04:
1 When calling the music() function the filename is now case insensitive.
2 A getItem() function is now exposed which works just like getInventoryItem() but for items in the current location.
3 A createLocationItem() function now exists.
4 A destroyLocationItem() function now exists.
5 An onArrive event now exists for locations and should be used instead of onEnter.
6 Saving and loading is now supported
7 Javascript errors now report line and column numbers
8 You can now include menus in your adventure folder.
9 Made it so a location description is announced the first time you enter that location.
10 Updated loading of your game to reparse the adventure scripts rather than loading them from the saved game.  This allows saved games to benefit from bug fixes in script updates and makes debugging considerably better for scripters.
11 Added a goToActionList() function.
12 I've re-written the user guide.
13 Added some visuals for menus so low vision users can take advantage of them.

I hope you all enjoy Nina's hard work.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2013-03-10 18:18:15

The engine is working fine so far, however there is kind of an inconvenient bug. If there are no items in a room and you select the use command, it says there are no items here to use despite the fact there are items in your inventory you could use.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2013-03-10 20:51:23

OK, I found a few bugs in Shaddow Gate:
1, I can't find the key. I've done everything I can think of and the key is not showing up. I looked in the script file and I don't see anything that would make the key not hidden. I took both unlit torches and lit both of them, but that doesn't work.
When I light both torches the number of lit torches remains 1 I believe. The number of unlit torches becomes neggitive. If I light the torches on the wall, the number is neggitive as well.
I am stuck going in and out of the first and second room...
Thanks,

2013-03-10 21:41:42

If your talking about the key near the entrance use the skull.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2013-03-10 21:54:28

stewie, thanks, the bug with not being able to use items in your inventory when there are no items in the room is a problem in the game engine that I need to fix.

Frastlin,
1 As stewie suggested try using the skull.
Thanks for the bug report about the torches.  We'll look into that.

~ Ian Reed
Visit BlindGamers.com to rate blind accessible games and see how others have rated them.
Try my free JGT addon, the easy way to play Japanese games in English.
Or try the free games I've created.

2013-03-11 01:06:43

Thanks for the note about the unlit torches.  I'll take care of that.

Want to order food, but can't get out? Try this .
https://postmat.es/Tw5eUTrBn4

2013-03-11 01:40:15

Hello,
Playing the game I noticed some other odd things:
In the cold room, the other gems when used on the pedestal have no message when used.
I'm horrible at these types of games, so I made it to the iron door behind the mirror and am stuck. It may be helpful to have a hint option.
Can we use Jaws to play?
I'm excited about this; it looks like a very simple scripting language with lots of possibility.
What would be really awesome is if we could have pictures or something like flash to add to the menus to make it something styled like battlion, the RPG game that is almost all lists, simple graphics and sounds.

On another topic, in reading back a couple posts I see that there are supposed to be other sample adventures? Are those not released now Shadowgate is out?
Thanks,