Comments (5)
The timers and daemons mechanism doesn't care about the turn counter.
If you want timers and daemons to run for each turn as you advance the turn counter in your sleep action, you need to run them yourself. Something like:
while(i++<50 && deadflag == GS_PLAYING) {
turns++;
RunTimersAndDaemons();
}
from punyinform.
While you may not consider this a bug (fair enough), don't you think it would be worth documenting at least? Timers in their basic form (start/stop syntax) are associated with turn count directly. So this behaviour is very likely to go against game author expectations.
from punyinform.
The turn counter is something you can't just change and expect the library to figure out what you mean, just like you can't move the player except for with the PlayerTo routine.
A wait or sleep command that spans several moves typically needs a bit more work anyway - if a daemon makes a person enter the room, or a gunshot is heard, you may want to give the player the chance to abort the waiting and spring to action. Also, you probably want the statusline to reflect the time or moves, even as you wait. There are extensions for Inform 6, like waittime.h, that handles these things.
To make it easier to create a WAIT command, we have now placed the code executed at the end of the turn in a routine called EndTurnSequence. This can be called by the WAIT command to run timers and daemons, each_turn, advance time/turns and update darkness. It's a public routine and we will mention it in the manual.
from punyinform.
Hm, I thnk it's fairly obvious what a game author intends if turn count is manually manipulated: all derived logic (meaning time, daemons and timers) should adapt. Don't think this is a weird expectation at all. Though if I understand correctly what you describe, this would enable to more easily adapt such behaviour in the game code, so thank you!
from punyinform.
There is now a new extension called ext_waittime.h which provides a more advanced Wait verb.
from punyinform.
Related Issues (20)
- Replacement of dictionary words with available constants HOT 1
- Inappropriate message for the Enter action if the preposition is missing HOT 1
- The title of the help menu is not centered in the window HOT 2
- Searching on a supporter object missing from the grammar HOT 1
- Reversed definition of MSG_THROW_ANIMATE and MSG_THROW_DEFAULT constants HOT 2
- A container object with a single scenery or concealed object inside does not display its empty state HOT 1
- The sentence construction differs for MSG_SEARCH_IN_IT_ISARE and MSG_SEARCH_ON_IT_ISARE HOT 1
- Wrong message for 'take off' an unworn clothing object HOT 1
- The strict mode indicator is missing HOT 1
- Grammar of verb 'enter' without noun HOT 1
- Punctuation mark only HOT 1
- Catching AskTo differs from the standard library HOT 3
- Naming the library to make it clear this is not an official release. HOT 1
- Enterable object movement HOT 4
- Additional newline after tall inventory output HOT 3
- Auto-guess noun improvements HOT 1
- Global created before Global.h causes crash in z3 HOT 1
- Document how to generate playable HTML HOT 1
- Inform 6.43 problems HOT 7
- An unnecessary else statement in MSG_PARSER_NOTHING_TO_VERB HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from punyinform.