How large of a game can you make with Quest and.. are turn scripts for statuses worth using?

adammadam
Hi everyone! I've nearly finished making an introduction for my first game. The only problem I had now is, it's started running a little slower at times, nothing serious but like a 3 second pause after clicking a command sometimes, when earlier it was instant. And.. I sometimes get random errors such as this

Error running script: Error evaluating expression 'status + FormatStatusAttribute(attr, GetAttribute(element, attr), StringDictionaryItem(statusAttributes, attr))': StringDictionaryItem function expected dictionary parameter but was passed 'null'
Error running script: Error compiling expression 'LengthOf(status) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'
Error running script: Error compiling expression 'status': RootExpressionElement: Cannot convert type 'Object' to expression result of 'String'

The thing is, these errors werent consistent in appearing, sometimes I could play through without getting the error at all, other times it will appear in different places when new text comes up either after clicking a command or going to a new page. It seemed to be 50-50 if this will show up or not when playing through the full thing I've made so far.

I thought maybe it was because I've made a turn script to give the player lots of statuses like "if player x < 75 slightly hungry" etc for many things, theres 23 different "if" commands there so far on that turn script governing all the statuses so far. It was set to check every 1 second. I thought that must be what was slowing it down and since I've changed it to check every 10 seconds the game has sped up and these errors have stopped.

I'm just wondering though, I'm only at the intro of my game and I wanted to make something kind of big, if my intro is say 2% of my total end game.. will I still be able to make the full game alright? Is there any advice for someone wanting to make a large game, what to do to make sure it doesn't get really bogged down, run slowly, give errors like this?

lightwriter
Hmm, I get that random error sometimes too when I play my game... must be a bug in Quest.
As for the lag, I do believe just like any program it depends on your RAM... if you have a decent computer with like 8 GB of RAM then you'll experience less lag than someone who who has a computer with like 2 GB of RAM.

HaganeSteel
I'm not sure what you're trying to do, but I'd wager what you're trying to do can be done more efficiently using the attributes tab, an integer, and a changed script. I don't think you'd need a turn script for that.

If you have 23 statuses, make something set this integer to a number. If "fine" is 0, then "poison" can be 1. A changed script can make the necessary changes when the integer moves from 0 to 1.

For example: We'll have 2 attributes:
player.Status
player.changedStatus

player.changedStatus will check every time player.Status changes. Let's say "fine" is 0, and "poison" is 20. It would be: player.Status = 20. Then the changedStatus script would run and say, "Oh, the player is poisoned. Better change the information on the Status window and run this turn script so he loses HP every turn now."

You shouldn't need to check every turn for every status ailment.

As for the errors, I don't know. I have occasionally gotten canAdd and Int32 errors on my game that I haven't been able to replicate. Quest has debugging tools, but they didn't tell me anything useful either.

Quest is, without a doubt, a wee bit unstable.

XanMag
My solution would not to use @#$&* turn scripts at all. Maybe I interpret your intentions incorrectly, but here is what I would do.

Certainly there has to be an event that triggers a change in attributes. I'd raise flags post-event. And, remember, you can create an event at any point in your game to flag. If you are getting a mess of error messages already, it certainly would not be good down the road. Simplify it. I'm definitely not a good one to offer corrections, but whenever my game goes wonky, 99% of the time it is because I have too much shit going on and I've over complicated my code. I usually fix it by deleting the object or script, think as simple as possible about what I want done, and restart (of course I copy-paste into word, but the point is to get rid of the garbage and restart within Quest). It almost always corrects when I do that.

I know it is not much help but it works for me.

As for the delay... I experience delays when playing other peoples games online. When it is downloaded, I NEVER get delays. Just put in the game description a suggestion to download.

Good luck and happy gaming!

XanMag

adammadam
I did actually mean timer not turn script.. I got them mixed up.

XanMag wrote:My solution would not to use @#$&* turn scripts at all. Maybe I interpret your intentions incorrectly, but here is what I would do.

Certainly there has to be an event that triggers a change in attributes. I'd raise flags post-event. And, remember, you can create an event at any point in your game to flag. If you are getting a mess of error messages already, it certainly would not be good down the road. Simplify it. I'm definitely not a good one to offer corrections, but whenever my game goes wonky, 99% of the time it is because I have too much s*** going on and I've over complicated my code. I usually fix it by deleting the object or script, think as simple as possible about what I want done, and restart (of course I copy-paste into word, but the point is to get rid of the garbage and restart within Quest). It almost always corrects when I do that.

I know it is not much help but it works for me.

As for the delay... I experience delays when playing other peoples games online. When it is downloaded, I NEVER get delays. Just put in the game description a suggestion to download.

Good luck and happy gaming!

XanMag


you know I think you are right, if it's already running slow now because of using a timer, I may as well remove it, I could easily have the status update every time the player enters/leaves a room, every time they do random things like speak to someone, pick up an object etc and I could of focus that around points in the game where the status is more likely to change, like when they are doing things in combat put a few update status lines in there

HaganeSteel wrote:I'm not sure what you're trying to do, but I'd wager what you're trying to do can be done more efficiently using the attributes tab, an integer, and a changed script. I don't think you'd need a turn script for that.

If you have 23 statuses, make something set this integer to a number. If "fine" is 0, then "poison" can be 1. A changed script can make the necessary changes when the integer moves from 0 to 1.

For example: We'll have 2 attributes:
player.Status
player.changedStatus

player.changedStatus will check every time player.Status changes. Let's say "fine" is 0, and "poison" is 20. It would be: player.Status = 20. Then the changedStatus script would run and say, "Oh, the player is poisoned. Better change the information on the Status window and run this turn script so he loses HP every turn now."

You shouldn't need to check every turn for every status ailment.

As for the errors, I don't know. I have occasionally gotten canAdd and Int32 errors on my game that I haven't been able to replicate. Quest has debugging tools, but they didn't tell me anything useful either.

Quest is, without a doubt, a wee bit unstable.
.

I put all my statuses in a timer, I made integer attributes for many things like health1, hunger1, fatigue1 etc, but i didnt want just numbers showing, so I made secondary attributes health, hunger, thirst etc. Then a timer with things like if player.health1 < 75 player.health = slightly injured. then < 50 moderately injured. Then for hunger and for many other things. with it checking every second it worked to update any of the players statuses whenever anything happened, but it also just didnt like it. On 10 seconds it's fine.. but I think I will remove it anyway because it might slow down again in the future with all the things I could add.


lightwriter wrote:Hmm, I get that random error sometimes too when I play my game... must be a bug in Quest.
As for the lag, I do believe just like any program it depends on your RAM... if you have a decent computer with like 8 GB of RAM then you'll experience less lag than someone who who has a computer with like 2 GB of RAM.


yeah my computer isnt the best but it's erm.. 3.9ghz quad core with 8gb ram so I know there would be people on much worse ones who could also try to play my game once it's finished and idk how much worse it'd be in that case! I found that extending how long my timers activate fixed the error for me so maybe that will solve it for you as well.

The Pixie
I guess Quest updates the status variables each turn. If you are also changing them with a timer, it is possible you have two scripts trying to change te same thing at the same time, which might give the error seen. What happens if you disable the timer?

Given the values can only change during a turn, using a turn script instead of a timer would be better, and a pretty easy change (copy-and-paste the code from the timer). XanMag's solution is even better.

adammadam
The Pixie wrote:I guess Quest updates the status variables each turn. If you are also changing them with a timer, it is possible you have two scripts trying to change te same thing at the same time, which might give the error seen. What happens if you disable the timer?

Given the values can only change during a turn, using a turn script instead of a timer would be better, and a pretty easy change (copy-and-paste the code from the timer). XanMag's solution is even better.


it could be due to that because I had a timer updating the health status to say moderately injured, severely injured etc, and I also had another timer which would every 2mins or so make the character say something if their health was at a certain point like "your injuries ache".. Plus then there are other scripts like what's happening in combat tied to the health of the character. And then many other attributes too.

If I disabled the timer the errors stopped and the game worked fine, just didnt get the statuses updating. Even just changing the timer to every 10 seconds instead of every 1 seconds solved the problem of errors coming up and Quest running slowly as well.

I did just decide to change it over by deleting the timer and copy and pasting the status change updates all over the story at certain events, like when leaving a room, or when performing an action in combat etc, so whilst it may not always be instant I think I can work with it and in some ways it's a bit more flexible like that as well, so I could be more creative with it over the updates being on a timer.

HegemonKhan
usually if your game slows down or 'freezes~hangs' (just like with browsers with bad or malicious scripts running in the background), it's due to an unseen coding~conflict issue, not an actual performance issue. I mean, your computer can handle your OS (which is ~ at least 50,000,000 ~ 50 million code lines) !!! and~or your games (who knows how many code lines they have~use, might be less or more than an OS' size, don't know game programming size yet, lol) too, which is far larger than any quest game you'll ever make, lol.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums