Page 12 of 20
Posted: Fri Jun 04, 2010 7:19 am
by Kjorteo
Man, even back when I was in my newbie phase where I barfed out premade enemies everywhere (see if you can guess why the Centipede Plains in the original Adventure of Sam are called that), even then I never used ruffians.
Posted: Fri Jun 04, 2010 4:01 pm
by Schroedingers Cat
Man, ruffians were my prefab enemy of choice.
They were UNPREDICTABLE.
Unlike bears.
Posted: Fri Jun 04, 2010 10:43 pm
by Aplsos
ya ruffians were the best prefabs by a mile. my fav 'ruffian moment' if you were is the genies eyes turn to rufians.
Posted: Sat Jun 05, 2010 4:14 pm
by Zenith Nadir
near as i can tell tigers behave the same as lions only with shooting? you've already programmed lions so that's half the work done already. you just gotta give 'em guns and work out the firing rate command (remember that tiger bullets are slightly different to object and player bullets, but i forget how exactly). the two counters for ruffians are "intelligence" and "resting time". now, i'm just going from observation here (you're the programmer, not me) and am probably stating the obvious, but here's what i figure:
--
* the "intelligence" stat in every creature determines the ratio of number of random movement cycles versus cycles where the creature moves towards the player. a creature with intelligence 1 will mostly move randomly, while a creature with intelligence 9 will seek the player on most cycles.
* the "resting time" stat in ruffians determines how long a ruffian stops moving between movement routines. when ruffians move, they move quickly in a straight line for a short time, then stop, then start again. the unpredictability everyone's talking about comes from not knowing how long the ruffians will move and stop coupled with how fast they are; unlike lions and tigers which seem to operate around #cycle 3, ruffians work at the equivalent of #cycle 1. a ruffian's intelligence stat determines how likely a ruffian is to move towards the player in its movement phase, but unlike lions this movement comes sporadically and quickly.
* any creature created with a #put, #become or #change command ingame will have all its stats automatically set to 1. maybe there's a way to tweak that.
* bears have just one stat, sensitivity; no intelligence. this stat determines how closely aligned to the bear the player has to be before it begins its movement towards the player (bears only move towards the player). a bear at sensitivity 9 will only move when the player is directly aligned, while a bear at sensitivity 1 will sense the player when the player is a fair number of rows/columns away. distance does not matter to bears, only alignment.
* sharks are just unkillable lions in water, but you knew that
* likewise, slimes are a 100% total no-brainer since they have one behaviour that they repeat over and over until they can't do it anymore. the only changeable stat they have is speed.
* rotons seem to work similarly to ruffians, but their direct movement time is shorter and their "waiting time" is spent on random movement instead of idling.
* spiders never rest and always move at #cycle 1. really, they behave similarly to lions, only the cannot leave their webs and are fast. as for the webs themselves, i wouldn't imagine the graphics programming for them being that different to line walls? (putting spiders and webs into tyger would be a GOOD IDEA, since it'll also give some new programming trick & graphics possibilities besides their default use)
* centipedes are a difficult one to crack. centipede heads move at the same speed as lions, and have the same intelligence stat besides, but are also followed by however many segments. when the head of a centipede is destroyed, the consecutive segment will adopt its attributes; if a centipede segment is shot, the centipede will split into two, both heads of the newly formed centipedes taking the same attributes as the original. as warlord's temple observes, you receive more points for shooting a centipede from the back end than the front or the middle. a centipede automatically reverses its movement when shot from the back, if i remember rightly (not checking). as a matter of fact, i'd speculate that the back end of a centipede, while sharing the same type as its fellow segments, is also a special object same as the head which can change into a head on the fly, extra score from killing it being a desirable side-effect. whenever a centipede is shot, it pauses for a second; this is when the adjustment to accomodate the new behaviours is made.
centipedes also have a unique stat, "deviance". near as i can tell this just decides how often they change direction. deviance 9 centipedes are squirmy little bastards regardless of intelligence while deviance 1 only change direction when they hit a wall, or, if high intelligence, when they sense the player nearby (high intel centipedes will always home in on the player when he's near)
the real kicker with centipedes comes when a hapless editor crosses the wires, ie. makes a centipede which loops over itself. tim sweeney programmed in a failsafe to automatically disintegrate the centipede by turning all the segments in that centipede into heads whenever this happens. this also happens when a head+segments is confined in a space and unable to move (there's an example in greg janson's "dungeons ][" in the arena level where centipedes are confined behind duplicators, and it doesn't work).
--
i hope this is helpful at all, anyone with any other observations feel free to back me up/correct me <:D
Posted: Sat Jun 05, 2010 5:31 pm
by Dr. Dos
As it stands now the way I have lions/sharks working is simply
Code: Select all
if rnd(1, 10) >= Intelligence + 1
then move randomly
else move seek
Since intelligence normally ranges from 0 through 9 this works out to having a 0-90% of moving seek. Creatures will always move every cycle if they can so the "random" movement is smart enough to be "directions not blocked". So I'm fairly confident I've figured out ZZT's brilliant AI.
I wouldn't be too surprised if firing rate worked the same way just with will shoot/won't shoot and from there using intelligence to determine chances of shooting seek since spinning guns have intelligence despite not moving.
Maybe it's the same with resting time as well. Deciding if this cycle will be a rest or a move, but I think that would make movement of ruffians pretty jittery if it was a 50/50 chance of moving or standing still every cycle. This is pretty unlikely as I'm seeing a ruffian make some long strides and I doubt it's winning a dozen coin flips in a row.
Slimes are slightly more complex than they look because of how Tyger does stats. I tried adding them last night and made the mistake of having slimes immediately add their new brethren to the end of the stat list which would make them get a turn to multiply that same cycle. This amounted to a slime on the fastest speed which reproduces every cycle instantly filling an empty board.
You love your rotons.
Posted: Sat Jun 05, 2010 10:07 pm
by Dr. Dos
Posted: Mon Jun 07, 2010 10:11 am
by Commodore
I'm pretty sure ruffians move the same amount that they rest, so if they rest for 3 cycles they then take three steps
Posted: Sat Jun 12, 2010 1:07 am
by Dr. Dos
So I found some old saved copy of the ZZT file format by Kev Vance from like 1999.
It mentions something that kev-edit doesn't have, blinking text!
Edit: It probably doesn't support it because touching it causes ZZT to crash!
The list of elements ends up going blue through white text, then blinking white text, blinking blue-yellow text, white text, blue-yellow text, gray text (as in white on light gray).
Any text after the first white text is crashy. And anything beyond gray text causes zzt to crash on loading the board.
Posted: Sat Jun 12, 2010 2:01 am
by Kjorteo
Clearly, as awesome as it would be to make games that look like the GeoCities pages they came from, blinking text is dabbling with the forbidden dark arts of ZZT.
Posted: Sat Jun 12, 2010 2:39 am
by Dr. Dos
I didn't make anything blink in Tyger because
1) It looks terrible
2) Bright colors are more useful
3) For the most part it's not even used other than for water
My absolutely frightening text handling code didn't react to it very well.
Code: Select all
else: #We are dealing with text
junk = str(int(thing)-46) + "0"
#print junk + " is color"
if junk == "70": #in case of white text
junk = "00"
element = Element(getElementName(thing), int(color, 16), white, getBg(junk), (1,1))
I mean what in god's name is that?
Posted: Sat Jun 12, 2010 6:31 am
by Aplsos
boycotting until blinking is both enabled and the default option
Posted: Sat Jun 12, 2010 11:03 am
by RobertP
You get the shoutout from my dad for using python. I'm too dumb to grasp anything but elemental java, so I'll just give the thumbs up commander keen!

Posted: Sun Jun 13, 2010 10:55 am
by Zenith Nadir
Dr. Dos wrote:I didn't make anything blink in Tyger because
1) It looks terrible
2) Bright colors are more useful
3) For the most part it's not even used other than for water
you could at least add a toggle
BE QUIET/BE NOISY
[F] BE BRIGHT/BE BLINKY
Posted: Tue Jun 15, 2010 12:11 pm
by Commodore
how am I supposed to punish people for -dark without flashing white on black?
Posted: Tue Jun 15, 2010 3:34 pm
by Dr. Dos
?light
:drussrox: