time limit in game? (CSBwin)

Dead posts cluttering up the front page of certain non-RTC forums are kept here. Threads have the forum subject attached, except custom dungeon threads (which are obvious)
Forum rules
Please read the Forum rules and policies before posting.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

time limit in game? (CSBwin)

Post by ADDF_Toxic »

I was wondering if there was any way that I could create a time limit in a dungeon? I want it to make the player stop playing after a predetermined time. Thanks.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

food. and no food. basically.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

DSA with a really long delay or chain of delays targetting an end game pad
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

I dont think it`s a good idea... Zoom is right, IMO: when you starve, the game ends. I think this is best idea. Some people have long playing style and hard set time-limit wouldnt be good for them.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

It's a guest thing...
beowuuf, are you talking about &WAIT that you were talking about in another topic? It almost sounded like you were talking about only delaying DSA's, but I wasn't sure...
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The &wait was different - it was for an internal DSA delay between commands (So a chain of explosions wouldn't happen together, which they unfortunately always will do, and you have to cleverly work around)

By delay I mean the DSA can send a message with a much longer delay attached than a normal actuator - don't know the limit on the delay, but it's still enormous. Probably still not long enough to allow much game time, but you can make the DSA target itself, update a counter inside itself, and finally target an end game pad after a set count

So what you could do in the S0 of a DSA is

LA &1+ &dup SA L10 &= ?JC0 L$ M1000S*

In C0 of the DSA put

MSB

What happens is you target a set effect to the DSA from a floor pad the player has to walk over right at the start (or from champion mirrors) the dungeon starts.

You put 0 into the parameter A of the DSA. The DSA then looks at this parameter (initially 0) increments that number by 1, puts it back into parameter A, and the reason for the duplicate is then you still have that number to compare to a pre-determined number (10 in this case) If it is true, the DSA jumps to C0 which is the code line for targetting an end game pad at the potision indicated by parameter B. Otherwise the DSA carries on line S0 and targets itself (L$ loads to position of the DSA) with a set effect after a delay of 1000. Which will of course so the whole S0 line again.

So in this case after 10,000 clock ticks, the game will end. You can tweak that code for the maximum allowable message delay, then the maximum amount of playing time you want
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Delay maximum is about 24000000 = 4000000 seconds = 46 days.
After that the game pretty much crashes anyway so the complicated
counter business is really not going to be effective to make a
92-day delay.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Lol, in that case the code becomes as simple as 'M<pick your delay>S' with parameter A being the target of an end game pad
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Paul Stevens wrote:Delay maximum is about 24000000 = 4000000 seconds = 46 days
Hehehe!
So it seems like each tick is six seconds.
I think I should tell you that this is two levels to walk in, which might make what to do change a little bit, as I need to make it in both levels.
beowuuf wrote:'M<pick your delay>S' with parameter A
Where do you get A out of this?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Where do you get A out of this?
'Twas only an example. You can use 'B' (or even a literal)
if you prefer. See the syntax for 'M' command.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

If given no other instructions, the default message sent will be a set message to the location in parameter A (so actually you just need to use the command 'M<delay>'

So 'M' actually is read as 'MSA' by the DSA
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

So the A is the <pick your delay>?
Mannit beowuuf, the code is getting shorter each time! Lol!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Nope

The send message function code is:

M<delay><message type S, C or T><to location stored in A or B>

So 'M4CB' would, after a delay of 4, send a close message to the location stored in parameter B

'M4SA' would send a set message to the location stored in parameter A after 4 seconds. But as both 'set' and 'parameter A' are default settings, you could just not put them,so the code would be 'M4'

Note you can use '*' instead of a parameter - in this case, it takes the location information from the stack

So L0 MS* would send a set message to the top left corner or the dungeon. L$ Ms* (in my example) sends a set message to the DSA, as L$ loads the location of the DSA into the stack
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

L$ somehow reminds me of the c64 load, 8,1 comand!!
But to the point of my post:

'M4SA' would send a set message to the location stored in parameter A after 4 seconds

Is this delay measured in seconds or ticks?
So M4SA means it 4 seconds or
"4 ticks" 0.66 seconds??
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

4 ticks, with approximately 6 ticks=1 second
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Sorry, typing at work - meant four ticks...deliberately didn'ty give a unit first time, then said seconds without thinking the second time!
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post by PaulH »

I think limiting food is somewhat easier... You could even have a 'trading post' where you could hand in armour and weapons to buy more food/time. However overall, I am not a fan of limiting time unless it is a very small dungeon. I would hate to play 10 levels for weeks and then not be able to finish.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

he said two levels earlier.... i think...
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Yes beowuuf, I said two levels...the first two levels of Dungeon Master(Hall of Champions and Welcome). I'm trying to make a DMDemo type thing(not demo as in tutorial, limited version of it.) It doesn't have the stairs to level three already, there is a message and an end-game instead. Now I'm trying to make a time limit on it too.

Neat idea, Paul about the trading post thing!

I have a few questions:
1. How would I make the DSA in both levels?
2. So the first parameter (L0 in beowuuf's example in "L0 MS*") is the location?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

So the first parameter is the location
Have you discovered the documentation at:

http://www.dianneandpaul.net/CSBwin/doc ... Index.html

The 'Syntax' and 'Language' pages answer such questions for
many of the commonly used functions. It is pretty clear
for this particular case.....I just checked to be sure.

Do you understand the operation of the stack in this 'language'?

You seem to ask a lot of rather basic questions which leads me
to believe that either you don't study the available documentation
or you come up a bit short in your understanding of it. Maybe
we need an additional page with a couple dozen simple examples
that are described in detail. Would this help?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

To make the DSA present in both levels, you have to make it present in both levels! Youj need to go to the level menu for each level, and go to 'eit dsa list' and add the DSA type you created in the 'global' menu.

For the end game DSA, you don't need to make it in both levels - make it in the first level, it triggers, and that is it...
Guest

Post by Guest »

Paul, if I am understanding your first question correctly, I do understand the language(You mean the DSA that is being discussed in this topic, right?)
To your second question...that would probably be a good idea, maybe if they also have dungeons with the examples too, then we can see what's happening.
Beo, I am trying this idea...It didn't work today, but this computer is getting annoying and I need a break, then I will try tomorrow. I do have an idea of what might be wrong, but I'm not totally sure. I will try tomorrow.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

That was me, that guest. I somehow got logged off while in the middle of trying the thing.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Ok, http://www.dmjump.net/dungeon.dat

Simplest form, just walk forward and after ~ five seconds (30 ticks) the game ends - because there are no champions it simply blanks the screen, with champions you would get the stat screen and the proper 'end' bit
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Ah, so it's like a demo! Thanks, downloaded, hehehe, very nice. I just played it. Then I looked at it and figured out what was wrong with mine.

I will post this message, then try my dungeon, then I will post again to say the results, just incase it loggs me off again.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

I'm back. I have tested it...it works in level 2, but not in level 1...strange. If you do not know why it is doing this, that is okay, I can deal with this.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

What works in level two but not level one? THe DSA itself?

Where have you placed it?
What is triggering it (what floor pad, and by what method)?
How do you know it's not working in level one, and are you even triggering it in level one?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

I believe the best way to explain things like a dsa or csbuild "dungeon building" would be a short video tutorial
similar to the recording/playback feature of csbwin/linux maybe

(video tutorials containing a cursor and someone that comments on the cursor! Has to have a title like: enter dsa, basic csbuild,placing doors or what you can do with doors.) and should not be too large.)

to see things done and get explained where to click/ what happens.Together with the documentation and the help of the forum members, if done by someone who knows it well enough, would be great..
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

I'ts the time limit that doesn't work in level one but in level 2. I waited for the time that I set in level 1 and it didn't work, then I tried in level 2 and it did work. Level one is the HOC.
I put a DSA actutator(or whatever it's called) at the bottom of level one. It triggers the end game on level 2 (maybe it needs the end game on level 1) with Parameter A. It is triggered by a floor pad as you walk down the hallway to the HOC triggered by anything.
The DSA actuator on level 2 is triggered by an apple on a pressure plate. The pressure plate is triggered by anything. The acuator is at the bottom of the level again. It triggers the end game on the left side of level 2 with parameter A(like your demo did).
Hopefully this is enough information for you, beowuuf.
No I will not be recording from the start of the game to when it ends the game, because my time limit is 30 minutes, which would not be short. It would be 1 hour if I recorded both and showed it to you.
Also, is this DSA topic the "M[delay]<message type>[<target>]" on PaulS's documentation( http://www.dianneandpaul.net/CSBwin/doc ... guage.html )?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I think that yes, you need to have the end game pad on the same level as the DSA that activates it, otherwise you will have to wait until yougo down to the level with the end game pad on before it starts the timer...I think...
Post Reply