Subrenderer frequency?

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Subrenderer frequency?

Post by kaypy »

The docs on the wiki imply a subrenderer would be called 6 times a second.

In actual use, it seems that a subrenderer will be called much faster for an item looked at via the eye than if put in the hand. Is this intended?

(I had thought I could use that 6 times a second for some idle activity, but looking with the eye turbocharges it. I'm guessing every instant of eye hold is considered an event or something. I guess I should do things properly with messages)
Friends don't let friends eat worm round
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Subrenderer frequency?

Post by Sophia »

Yes, you should use messages for timing.

The rate that subrenderers update is not part of the DSB "specification" and, as you have seen, it can do some inconsistent things. It is also possible it will change in some future version. I've updated the wiki to be more correct.

(As an aside, DSB ticks 5 times per second, not 6)
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: Subrenderer frequency?

Post by kaypy »

I knew messages were the proper way to do it, and I got things working pretty quickly once I stopped being lazy 8-)

But I figured I should find out the way it should behave and update the wiki. Now I get to be lazy there instead 8-)
Friends don't let friends eat worm round
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Subrenderer frequency?

Post by Gambit37 »

I'm truly fascinated to see what you've been working on all this time @kaypy... Any teasers? :-)
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: Subrenderer frequency?

Post by kaypy »

After one too many "this was technically solvable but there was a key under a trash pile about 5 levels ago you missed so now you're stuck", the overall plan is I'm looking at implementing an Oracle for that random dungeon generator I have.

My concept is a small permanent hit to a given character's stats per hint, with a bunch of hints available for a given obstacle:

"
The door is opened by a gold keyhole nearby to the west.

You need an engraved brass crossbar key.

The key is carried by a giggler on the northeast of level four.
"

So what I was looking at in detail at the moment was being able to display a bunch of text like that at once. So I have made a scroll that scrolls.
Friends don't let friends eat worm round
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Subrenderer frequency?

Post by Gambit37 »

That sounds awesome! Looking forwards to seeing it :-)
Post Reply