Nifflas' Support Forum

Released Games => Knytt Underground => Pre-release topics => Topic started by: Nifflas on November 11, 2010, 23:51:06

Title: Enemies?
Post by: Nifflas on November 11, 2010, 23:51:06
Almost every enemy is a robot built out of four components, two sensors, an engine, and a weapon. The main sensor tells the engine where it thinks the player is, and the sub sensor tells the weapons where it thinks the player is. If a robot for example have a "radius" main sensor, and an "unstoppable" engine, it will once it sees the player begin to move toward the player and move in the same direction until it collides with something. Another example is that If a robot have a "look ahead" sub sensor and a "plasma cannon" weapon, it will try to kill the player by shooting ahead of it. The reason I want to go for this system is that I only need to do a handful of each type, and just 10 sensors, 10 weapons, and 10 engines will result in 10000 possible enemy types, while yet being easy to understand in a level editor.

Anyway, my question is suggestions for sensors, engines, and weapons.
Title: Re: Enemies?
Post by: LPChip on November 11, 2010, 23:55:48
Nice to explain the enemy system, but why do I have the feeling you forgot to post a question? X)
Title: Re: Enemies?
Post by: Nifflas on November 11, 2010, 23:57:32
Oh, right. Editing original post.
Title: Re: Enemies?
Post by: Grookie on November 12, 2010, 06:59:09
There are my idea about weapons:
a) it will try to shot you only once and then it will stop
b) it will be shooting permanently (player can run between "bullets")
c) it will be shooting only if it detect the player
c) it will be shooting hunting missiles (or another hunting enemies)
d) it will be shooting through a wall (there can be a special bulletproof wall)
e) there can be a alley of this e) weapons, they will be dropping a deadly liquid, the place will be polluted "forever"
f) there can be a weapon, which is releasing deadly gas

That's all  X)
Title: Re: Enemies?
Post by: sergiocornaga on November 12, 2010, 11:55:28
How about an enemy that mindlessly throws projectiles, i.e. no sensor? Sort of like the cube-chucking Muffinman in Lyle in Cube Sector.
Title: Re: Enemies?
Post by: LPChip on November 12, 2010, 14:33:42
I wouldn't make mindless robots, but an enemy doesn't have to be a robot per se. An enemy can be an harmful object that has a timing mechanism in it. Like to rails that spark electricity on a given basis. A pipe that ignites flames every x seconds.
Title: Re: Enemies?
Post by: Pick Yer Poison on November 12, 2010, 17:37:15
I think that sensors should have options in them like "proximity" or "movement," where they might activate only if the given object was closer or farther than a certain distance or was moving.

Sensors:
-Aim at (aims directly at the object)
-Aim ahead (aims ahead of the object)
-Aim behind (aims where the object just was. For use with instant-hit weapons like lasers to prevent the player from running backwards)
-Aim away (aims away from the object; the opposite of "aim at")

Two options for engines could allow them to accelerate from a standstill and/or slow to a stop, with variable rates, so you could make a robot that slowly builds up speed the longer it chases the player, or one that rockets off but has trouble making turns. Note that these options are NOT the same as the "boost" engine, which is the only engine that does not seek to maintain a constant speed.

Engines:
-Slow
-Medium
-Fast
-Unstoppable (continues moving until it collides with an object)
-Boost (applies a large force when it starts to move, but does not apply another until it has reached a complete standstill. Perhaps it could propel the enemy into the air?)

You should be able to specify weapons as either "pulse" or "ray." "Pulse" weapons would act like any ol' gun, expending their clip and then waiting out the cooldown/reload time. "Ray" weapons would have an infinite clip and no reload time, and would fire a continuous line of ammunition. You might set a rocket launcher to "pulse" and a laser to "ray," for example. All weapons should have an optional "range" setting that determines how far away the weapon is able to hit.

Weapons:
-Machine gun (basic bullet-spitting gun)
-Laser (fires an instant-hit laser beam that appears as a colored line from the weapon nozzle to the contact point)
-Dumb rocket launcher (fires a missile that moves in a straight line)
-Guided rocket launcher (fires a missile that homes in on the object. Speed of rotation should be modifiable)
-Flamethrower (spits out fire)
-Mine cannon (shoots landmines. The delay after impact before arming the landmine should be modifiable)
Title: Re: Enemies?
Post by: Nifflas on November 12, 2010, 18:14:13
Quote
How about an enemy that mindlessly throws projectiles, i.e. no sensor? Sort of like the cube-chucking Muffinman in Lyle in Cube Sector.
There can't really be exceptions. However, there could be a sensor that detects random positions instead of the player position itself, if that's assigned to an engine, it will move around randomly, or if it's assigned to a weapon it will shoot randomly. Also, I'm not adding any more global customization parameters than I already have implemented now. If e.g. a specific weapon can only fire a limited distance, that's a property of that weapon, not a generic setting for all of them.

Thanks for the suggestions though :D I think I can use many of them :)
Title: Re: Enemies?
Post by: Yoeri on November 12, 2010, 19:35:17
Heat sensor, only affecting knytts.
Motion sensor, move slowly, which is impossible for the ball character.
Trigger sensor, don't press that switch!

Flying engine, incoming!
Mirror engine, like in that room in #MAS OS with the ball that follows your moves exactly.
Bouncy engine, boink!
Swooping engine, bats!
Vertical engine, wall climbing.

Snowball weapon, slows you down.
Wave weapon, causing wide waves that are hard to dodge.
Fireball weapon, causing a deadly little fire where the projectile hits the ground.
Selfdestruct, uh-oh...
Title: Re: Enemies?
Post by: LPChip on November 12, 2010, 20:26:45
I'm not sure if you can make this, but if so, then it would be nice to have a self finding laser. The idea is, there will be a finder (crosshair) that moves slowly over the field. Once it collides with you, it will fire up a laser. With a delay of one second. It then fires a straight line towards you. If you haven't moved by then, pow! you're dead.
Title: Re: Enemies?
Post by: PONTO on November 12, 2010, 20:53:35
I'm not sure if you can make this, but if so, then it would be nice to have a self finding laser. The idea is, there will be a finder (crosshair) that moves slowly over the field. Once it collides with you, it will fire up a laser. With a delay of one second. It then fires a straight line towards you. If you haven't moved by then, pow! you're dead.
That's like the lasers in N. :)
Title: Re: Enemies?
Post by: LPChip on November 12, 2010, 22:24:04
I'm not sure if you can make this, but if so, then it would be nice to have a self finding laser. The idea is, there will be a finder (crosshair) that moves slowly over the field. Once it collides with you, it will fire up a laser. With a delay of one second. It then fires a straight line towards you. If you haven't moved by then, pow! you're dead.
That's like the lasers in N. :)

Its actually what I was thinking of when making the post. I even went to youtube to find an example from N. but most videos have many levels in them, making it hard to find one that solely demonstrates the enemy.
Title: Re: Enemies?
Post by: Nifflas on November 12, 2010, 23:35:30
I have played N though; I know those lasers well. It's definitely worth looking into, because it should be no problem making them! Definitely sounds like something I should do! The crosshair stuff would be a specific type of sensor, and the laser would be a specific type of weapon, combined they would have that behaviour.
Title: Re: Enemies?
Post by: jimj316 on November 13, 2010, 22:16:15
I wish I'd thought of that enemy system. :( I mebbe can has use in future projects?

Nao let's see...

Sensors
Line of sight: Active if the enemy can see the player. Causes severe damage to Nifflas's brain.
Trap:Invisible point (or line, circle or box) on the terrain that activates if the player touches it. Great for rigged items, especially if you make it so that enemies can be invisible if inactive.
Sound: Activates if the player makes or triggers a "sound" that is too loud (running instead of walking, landing too hard, Using a ball material that is too noisy, causing explosions) As a joke, you could make the program also check if the user is running a media player program in the background and activate then.  XD

Engines
Pounce Engine: Long jumps at player (maybe about 4 times across as upwards) Optionally, hops twice towards player if out of range. like the demented mimigas in Cave Story, but slowed down 4x or something. (My first playthrough of CS was really laggy, and they were terrifying like this.)
Rocket Engine: Flies at speed towards player, gaining speed through flight. Cannot navigate, but will aim at player before firing.

Weapons
Laser Beam: Fires a continuous beam of pwnage for a set time. Hits target instantly (speed of light). Maybe needs to charge first, with a visible glow or something.
Missile: Starts slowly, but builds speed through flight. Can navigate and chase players. No speed limit, eventually will be going too fast to avoid the terrain. (like the missiles fired by the spellbook in #MAS:OS. I liked those)
Knife: Causes collision damage. Maybe the enemy has to rotate the knife towards the player before "Stabbing", meaning fighting the enemy by hand is still possible (by attacking from the other side)
Title: Re: Enemies?
Post by: Nifflas on November 15, 2010, 16:25:50
Nice ideas, I really like the sound sensor. I think all sensors will have an optional "line of sight" setting, since it's probably really common to want that, but that will also be the only setting global to all sensors.
Title: Re: Enemies?
Post by: minmay on November 16, 2010, 17:59:15
A "rotating camera" sensor would be nice; it would rotate at a constant (somewhat slow) speed, seeing whatever's in front of it at the time.  It would be cool to put more than one on a single enemy for the same weapon, if that's possible.

In a similar vein, a laser that turns on, sweeps 45 degrees in one direction, and turns off would be a neat weapon - perhaps it could be fired instantly when it sees the player, but would always start 22.5 degrees off in one direction, meaning you'd have to run the other way fast.  (0.5/0.25 second delay before it starts sweeping?)
Title: Re: Enemies?
Post by: NESgamer190 on November 16, 2010, 19:55:30
I suppose I can give some suggestions on sensors and whatnot...
sensors
Radiation sensor:  Any radiation will be detected.
Silicon sensor:  Identifies all metallic substances as friendly, and will NOT harm others.
Radius sensor:  Any threat within X tiles of the machine will trigger it.  Don't get too close.
Contact sensor:  Touch the machine, and you're detected.
Engines
Terminator:  Once the machine has found its target, it will pursue the other target until it gets destroyed, or it evades the machine.
Eluder:  If the machine detects a hostile, it will fly AWAY from the intruder, so as to avoid getting nailed horribly.

Weaponry
Grenade launcher:  Launches grenades that will explode after a set time.
Alarm:  It will alert other robots on the location of the protagonist, easily making life harder for the player
Ice spray:  A basic melee attack that will chill the victims caught in it.
Tractor beam:  Picks up anything caught by the beam, and grabbed object can be used as a projectile or melee.
Rapid construction device:  More of an utility weapon than anything, this will quickly construct (Derp!) blocks to hinder progress.  Just don't get crushed.
Teleportation weapon:  Getting hit by this gun's projectile won't kill, but it will warp you about into some location, usually a jail or death pit.
Trap platform:  If some unsuspecting object should be on this when a sensor is triggered, it will suddenly become outright lethal with an electrical current.
Hope these ideas will help, and I sincerely apologize about the wall o' text.
Title: Re: Enemies?
Post by: LPChip on November 17, 2010, 11:41:31
Engine:
It would be cool to have movement engines that are based on the surrounding.

Like: always move into one direction until it hits a wall, then always turn left/always turn right/turn 180 degrees/randomly turn left or right and repeat cycle. (remember the spikey blocks from KS?)

Weapon:
Not sure if this is a weapon or engine. It would be cool if you have an enemy that moves. If it collides with you, it will push you away. If you get between a wall and this object, it will crush you. So you get a chance to get away from it. Speed could be a variable here, or more options so each option has a speed assigned to it. (not sure how that works in the game)

I suppose it could even be like this: weapon: push_and_crush or instant kill, combined with the engine above.
Title: Re: Enemies?
Post by: PONTO on November 17, 2010, 11:42:27
Engine:
It would be cool to have movement engines that are based on the surrounding.

Like: always move into one direction until it hits a wall, then always turn left/always turn right/randomly turn left or right and repeat cycle.
That's like the drones in N. xD
Title: Re: Enemies?
Post by: LPChip on November 17, 2010, 11:43:33
Engine:
It would be cool to have movement engines that are based on the surrounding.

Like: always move into one direction until it hits a wall, then always turn left/always turn right/randomly turn left or right and repeat cycle.
That's like the drones in N. xD

Yeah, although I was actually thinking of the spike blocks from KS :D
Title: Re: Enemies?
Post by: Nifflas on November 17, 2010, 12:05:21
Quote
It would be cool to have movement engines that are based on the surrounding.

Like: always move into one direction until it hits a wall, then always turn left/always turn right/randomly turn left or right and repeat cycle.
Technically, that would be a sensor that percieves the player at a location that changes once it touches a wall, an engine can not decide on its own where to go. Still, should be fully possible to add that, so thanks for the suggestion!

Quote
Radius sensor:  Any threat within X tiles of the machine will trigger it.  Don't get too close.
That one exists already, actually even under the same name :)

Quote
Eluder:  If the machine detects a hostile, it will fly AWAY from the intruder, so as to avoid getting nailed horribly.
Ooh, that's a clever one! I guess the best implementation would be a radius sensor that percieves the player on the opposite direction of the sensor that the player is actually located.

Quote
Alarm:  It will alert other robots on the location of the protagonist, easily making life harder for the player
That's also a really clever one. The best way to do that would be a "sender" weapon, that sends out the player position detected by the sub-sensor of the same robot. Then, other robots should be able to have a "receiver" sensor, so they'll begin to approach or shoot the player.
Title: Re: Enemies?
Post by: AClockworkLemon on November 17, 2010, 14:12:27
This system is freaking brilliant. i might have to borrow it at some point in the future!
Title: Re: Enemies?
Post by: jetio4 on November 17, 2010, 19:52:51
How about a sensor that only senses certain things, or senses everything BUT a certain thing? Like that one cat in WaDF1.
As in, if your Knytt you won't get hit. Or only Knytt WOULD be hit.
Also, how about an enemy that makes you change? As in if your Knytt you would be turned into basic ball, and can't turn back for x seconds. THAT would be annoying! ;)
Title: Re: Enemies?
Post by: Pick Yer Poison on November 18, 2010, 17:12:58
Quote
Radius sensor:  Any threat within X tiles of the machine will trigger it.  Don't get too close.
That one exists already, actually even under the same name :)

Quote
Eluder:  If the machine detects a hostile, it will fly AWAY from the intruder, so as to avoid getting nailed horribly.
Ooh, that's a clever one! I guess the best implementation would be a radius sensor that percieves the player on the opposite direction of the sensor that the player is actually located.

No fair, I suggested those first. :<
Title: Re: Enemies?
Post by: jetio4 on November 19, 2010, 01:47:46
This is less of an enemy and more of a projectile: A shot that shoots out BLOCKS, which keep going straight, or otherwise intended. These blocks can push you off platforms, knock into you in mid-air, or even BE platforms. In fact, a skilled player could even Wall Jump off of them!!! C)
Title: Re: Enemies?
Post by: Yonowaaru on November 19, 2010, 16:32:04
Maybe a thing that goes down quickly when under it?
Like, an eagle or something?
Title: Re: Enemies?
Post by: GrayFace on November 19, 2010, 20:18:27
Main sensor:
All may have a cooldown value and initial cooldown counter.
1) Never active. Used by a standing monster or monster that doesn't shoot.
2) Always active. Used by those creatures that come out of water and shoot (bank 18, object 6).
3) Activate when Juni is in specified radius.
4) Activate when Juni is in specified rect.
5) Activate when Juni is in specified region, set up as a picture.
6) Activate when Juni faces in the direction to or from the monster.
7) Activate when Juni jumps.

However, I'm thinking in another direction:
Make a list of actions sequences, like in MMF2:
1) Sensor - if the sensor is not active, stop the sequence.
2) Is (not) projectile - continue sequence only if it's (not) a projectile.
3) Engine - do the movement (like straight line "unstoppable" movement or "look ahead" fly movement).
4) Shoot - create the projectile.
5) Destroy - destroy the object/projectile.

Example: bank 18, object 6.
2 sequences:
1)


2)


Example: bank 14, object 13.
2 sequences:
1)


2)


Example: crosshair laser from N.
1)


2)
Title: Re: Enemies?
Post by: StraightFlame on November 23, 2010, 19:37:31
Who said anything about Juni being the main character?

Anyways, how about a tile that explodes or something when a certain character steps on it? I unno if that is possible, but...

Lemme guess. This idea has already been mentioned, amirite?
Title: Re: Enemies?
Post by: TheDarkOne on January 03, 2011, 05:35:42
I have an idea, a flying bug-like thing. It has an eye and a feeler, wings, and a big, nasty stinger.
Title: Re: Enemies?
Post by: jetio4 on February 02, 2011, 20:12:29
I have an idea, a flying bug-like thing. It has an eye and a feeler, wings, and a big, nasty stinger.
Uhhh, a bee?

How about creature that looks innocent the first time you see it, but randomly does something to kill you.
Title: Re: Enemies?
Post by: Josh on March 07, 2011, 23:03:46
Probably horribly hard to implement, but a robot type that moves by scuttling around the walls? If it spotted the player using any of the camera types, if would run along the walls, never across open gaps, and try to come into contact with the player or just get closer to them. A bit like the sparky enemies in Knytt Stories that run along the floor, but happy to go up walls and ceilings. This could be really difficult with more interesting tilesets though... and by this point I assume Nifflas has done most of the enemy design, so may not even need another idea! Ho hum.
Title: Re: Enemies?
Post by: PONTO on March 08, 2011, 10:00:25
There are some spiders in Knytt that move like that. They are not enemies, though, if I remember correctly, but this means they are probably easy to implement.
Title: Re: Enemies?
Post by: Juni on March 09, 2011, 11:22:02
Howza bout a ball that's like the blue ball (WADF) but evil? it jumps at you,hides in bushes(if possible) and can appear in sequences like when your just simply walking around the one jumps at you and leading to a another area. if possible: followers anyone?
Title: Re: Enemies?
Post by: Saml on May 23, 2012, 06:06:44
There are some spiders in Knytt that move like that. They are not enemies, though, if I remember correctly, but this means they are probably easy to implement.

Now remember: the whole of Knytt was hard-coded, and there was only a minimal amount of intelligent behavior - as I recall (having looked extensively at the Knytt source), those spiders were on a fixed path, defined in the source. If Nifflas wanted to make a movement like that work in an engine which supported level-editing, and thus arbitrary surface shapes, he'd need to do a lot more work.
It would be far from impossible, though, but still a lot of work.