PDA

View Full Version : Villain concept: Myriad



Thaumaturge
04-10-2007, 04:32 AM
A few games have been produced that feature enemies that are stated to be parts of a hive-being: that is, a creature that is made up of more than one separate creature, each capable of independent movement but led by a single, connected mind.

However, in how many games have the enemies truly been something approximating a hive-being?

One that comes to mind is, from what I've gathered, Alien vs. Predator. Based on an article that I read, the aliens came and went based on a single controlling impulse.

This is good, but I have been thinking about something more: what about a hive-being villain that actually reacts as if it were receiving information from the encounters that its parts have had with the player?

Perhaps the most obvious gameplay mechanic that might be derived from this is having sub-creatures of this hive-villain (which I currently call "Myriad") that do not directly perceive the player nevertheless become aware of the player when another sub-creatures perceives the player.

Far more interesting to me, however, is the possibility of having Myriad alter its sub-creatures in response to the player's actions.

In this idea, Myriad generates sub-creatures in some way (mutation of parasitised non-Myriad creatures and asexual generation being potential methods). Either during or after a battle with the player, Myriad might assess the sub-creatures that fought against the player, and determine which were the most effective. The traits of these would then be used in the generation of further sub-creatures, probably with some mutation factor, and the cycle would begin again.

Thus the foes might adapt to some degree to the player's play-style, and may even produce foes on on play-through that are not seen at all by the same player on the next play-through.

However, I see two problems with this:
1) Such adaptation, if not handled carefully, might damage the gameplay balance. Perhaps the degree of adaptation could be scaled according to the difficulty setting, but it nevertheless seems to me that this approach could backfire.

2) Of greater concern to me at the moment is the viability of the system. I'm not convinced that a reasonable number of battles for a game would provide enough iterations of the algorithm for anything of interest to develop.

And there is my idea as it stands thus far (presuming that I haven't forgotten anything).

What comments and suggestions do you have?

Evil_Toaster
04-10-2007, 09:13 AM
Sounds like a fun enemy to kill. What kind of game are you thinking of putting it in?

1) I find balance is always difficult. If you spend enough time tweaking you should be able to come up with something that works. ;) Plus, even if you don't get something workable, you're bound to learn a lot about genetic algorithms in the process.

2) I think this is connected to point 1. I would think you could tweak the alg to adapt very fast, or very slowly. It depends on how long you want the game to be, really.

As a start, I'd suggest you map out the different abilities the creatures could potentially have, and then work out the adaption algorithm, after which, get prototyping and see what happens.

Tr00jg
04-10-2007, 10:07 AM
Hey, this sound interesting!

While I was reading this, it got me thinking... The whole environment in which the game takes place could be the enemy itself. You walk around in this floating enemy being. The Myriad attacks, and the hive being learns. You could even take it further and let the hive-being adapt its environment to your play-style, not just the attacks. This COULD get complicated. Rather stick to simplicity. :)

Nandrew
04-10-2007, 02:37 PM
Very nice concept. The simple idea of "adaptive gameplay", whether embodied in the villain or not, is fantastic to work with.

Consider what Sin: Episodes did with its own gameplay -- scattering around more health pickups if the player was struggling, or bringing in more enemies if things were going too smoothly. It could work, though balance will indeed be something that needs to be very, very carefully thought out.

I'd suggest creating a game that is simple enough to allow you to concentrate on this aspect sufficiently.

Thaumaturge
05-10-2007, 05:26 AM
Thank you very much for your enthusiastic responses, everyone. ^_^


Sounds like a fun enemy to kill. What kind of game are you thinking of putting it in?

Well, I came up with Myriad while thinking over my current Four Elements contest idea. On the other hand, I think that it could be quite effective in a number of game types.

I think that it could be interesting in most games that include combat, from first-person shooters to RPGs and, perhaps, even strategy games.

Myriad could be a rather interesting opponent in a casual game, I believe - the player might dip in for a battle or two, and come back later to find that they are now facing upgraded enemies in reaction to their last play. Thus the game might keep greater replay value as the monsters change and the difficulty increases.

Might the concept work in an adventure game, I wonder? Somehow altering the puzzles in response to the player's ability, their approach to the puzzles and the order in which they choose to approach them...?


1) I find balance is always difficult. If you spend enough time tweaking you should be able to come up with something that works. Plus, even if you don't get something workable, you're bound to learn a lot about genetic algorithms in the process.

True, indeed - it probably is a worthy experiment, at the least. ^_^


As a start, I'd suggest you map out the different abilities the creatures could potentially have, and then work out the adaption algorithm, after which, get prototyping and see what happens.

Fair enough... In fact, I have been thinking to some extent about what elements of a creature might be altered, and what inputs they might have with which to inform the process, although I am far from a full list as of yet.

I think that, given my current plans, my Four Elements game is probably the best game in which to attempt this...


I'd suggest creating a game that is simple enough to allow you to concentrate on this aspect sufficiently.

A good point - thankfully I has already planned on keeping my Four Elements game fairly simple (as such things go), and so I believe that it remains my best testing field at the moment.


While I was reading this, it got me thinking... The whole environment in which the game takes place could be the enemy itself. You walk around in this floating enemy being. The Myriad attacks, and the hive being learns. You could even take it further and let the hive-being adapt its environment to your play-style, not just the attacks.

Ooh, I love that idea! It reminds me of the Body of the Many stage in System Shock 2, in which the player character did indeed end up within such a hive-creature, although in that case, as I recall, the level was roughly as inert as any other.

It is, as you say, probably a little complex given that, if attempted soon, it will probably not be my only project, but it may well be interesting to try at some stage - unless someone else wants to give a shot, of course. ;)

~

It occurs to me that Myriad seems to essentially be a variation on another, rather older idea of mine, which was a villain that was, effectively, playing a strategy game against you as you played an RPG against him. Enemies that were allowed to escape (including spies that you may not have realised were spies...) could take information back to their master on where you were and what you were doing. As you played, the villain might react to you and your choices and play-style, and increasingly so as you become an increasing threat.

CiNiMoDZA
05-10-2007, 12:06 PM
Man, this sounds really cool! I agree with Nandrew, create a simple game to allow you to focus more on this system!

Gazza_N
05-10-2007, 05:48 PM
Incredibly cliched in terms of theme (hey, I'm a sci-fi nut and this thing pops up constantly), but in terms of gameplay: exceptional. Essentially you're talking about an RTS overseer-type AI applied to an action/RPG game. Very nice. As you mention, very few (if any) supposedly hive-minded enemies ever act accordingly.

May I request that you build a basic prototype first, as much for testing as to showcase your idea?

Thaumaturge
06-10-2007, 04:02 AM
Warning: Long post ahead. :P


May I request that you build a basic prototype first, as much for testing as to showcase your idea?

A good idea, thank you - I think that I will do just that. ^_^


Incredibly cliched in terms of theme

Heh, of course. Although, if I'm not much mistaken, oddly under-represented in fantasy. I would think that a hive-mind would be a wonderful fantasy concept... o_0

~

Introduction and primary questions

Well, I have given this some further thought today, and believe that I may be on to a potentially workable prototype concept. However, I am not there yet, and am hoping that further advice might help me in making progress. ^_^

Primarily, I am not at the moment sure of how to determine a creature's motions. It's movement would be directed by the overall Myriad "mind", but how should it determine how to swing a clawed "arm", for instance, or move a "leg"?

It's tempting to specify set body parts, such as arms and legs, and give them set animations, and then simply alter them in size and material, but while pleasingly simple, this seems to me to be a little bit of a let-down, especially as it will probably restrict the variation in the creatures too much for my liking. Has anyone any suggestions, and if so, what are they?

I'm also not sure of whether Myriad's control of its sub-creatures should also be genetically evolved. Thsi is an enticing possibility, and a logical one, I believe, but also one that introduces even greater complexity into the project...

~

Current Myriad Creature concept (The long bit. :P)

Note that when I speak of a creature as an individual, as in its design, I will tend to refer to it as a "Creature", while I will instead tend to refer to the same as "sub-creatures" when referring to them in the context of Myriad.

Firstly, a "Creature" is composed entirely of a number of "Body Parts".

Each "Body Part" has a physical size (i.e. a scaling factor). Dependant on this is the attribute of mass, which is proportional to it. "Body Parts" will probably have a hard minimum size, so that creatures do not end up producing extremely small eyes, for example, to prevent their being shot.

Of course, I could simply make the effectiveness of all "Body Parts" depend on their size - small eyes might not see as far, for example.

There are a number of types of "Body Part":

1)
The primary type is the "Limb", which, in this nomenclature, is a generic piece of creature. "Limbs" are roughly rod-shaped (albeit bulging slightly in the centre).

"Limbs" are unique in in that they can have child "Body Parts" of any type positioned at either of their two ends.

Furthermore, they have three additional attributes, strength, speed and material. Strength is proportional to the "Limb's" size.

Speed simply measures the speed at which the "Limb" moves when it does move, while material affects the damage received by that "Limb" in combat - some material types, for instance, might take less damage from physical attacks, energy, or acid.

In order to move, a "Limb" is required to have sufficient strength to move the summed mass of all parts that depend on it - more specifically, its speed is inversely proportional to that summed mass, and proportional to its strength.

2)
"Eyes" are used to provide Myriad with visual information (naturally). Each "Eye" sees a wedge (I think that a 2D approximation should make life a little easier for me) in the direction in which it faces. The higher an Eye is above a point, the less close it is required to be in order to see an object at that point.

Note that if any sub-creature of Myriad can see an object (such as the player), all of Myriad is aware of that object. Effectively, Myriad operates in a Fog of War, which is pushed back by the visual information imparted by "Eyes".

Note too that sub-creatures of Myriad are each aware of the position of each other sub-creature of Myriad.

3)
"Crystals" are involved in magic. The basic type of "Crystal" allows the "Creature" to perceive nearby magic, in a circle around it, the range of which is absolute. This might convey such information as incoming spells (that any "Eyes" do not see, for instance) and which magical weapon the player has selected. They also have a spell type attribute, which determines the spell that can be cast from the crystal - and which will most probably have a highest probability of being "none".

4)
"Melee Weapons" are involved in, well, melee combat. As with "Limbs", they have a material attribute, but in this case the attribute affects the damage type and degree dealt, as well as influencing the "Melee Weapon's" mass.

5)
"Ranged Weapons" are, of course, involved in ranged attacks. They have a projectile material (such as acid or bone), which determines the type of damage done in impact, and a range - a shorter range might inflict more damage at the cost of that range.

~

Concluding question

So what do you think? Am I over-complicating this, and should perhaps use a simpler system, or am I on the right track, do you think?

Tr00jg
06-10-2007, 12:35 PM
I'd like to comment, but I am battling to comprehend the whole system... I need to read it again. I guess this says that perhaps you are over-complicating things.

I guess having a prototype of this would do wonders...

Thaumaturge
07-10-2007, 06:59 AM
Heh, oh dear. ^_^;

My apologies if I made it overly abstruse.

Perhaps these will help.

I have put together a UML-like diagram to represent the relationships and relevant members of the object types that I described above, albeit omitting certain additional information given there, such as how certain variables affect certain others (such as size affecting mass). Note that I have subsequently added a little to the design of the Ranged Weapon.

I have also created a simple mock-up of a possible Creature (although the shapes and colours are intended to be illustrative rather than representative of the final product).

As to a prototype, I feel that I should decide certain things - such as whether to go with this design, or whether to use pre-defined legs and arms, for example, to simplify the processes of moving and attacking.

The diagram:
http://img523.imageshack.us/img523/6616/creaturediagramwe0.th.png (http://img523.imageshack.us/my.php?image=creaturediagramwe0.png)

A Creature mock-up.

The green parts are Limbs, the light green being the base Limb mentioned in the Creature specification above, and thus the root of the Creature, the sphere being an Eye, and the pointy thing being a MeleeWeapon.
http://img444.imageshack.us/img444/8818/creaturelv5.th.png (http://img444.imageshack.us/my.php?image=creaturelv5.png)

Tr00jg
07-10-2007, 10:54 AM
Ah okay, now it makes more sense... Still, I think the best would be to make a prototype of this model. That is what prototypes are for: to see if it rocks. :)

Thaumaturge
07-10-2007, 06:53 PM
I'm glad that it helps. ^_^

The reason that I'm not yet starting in on a prototype is that I don't yet have a concept for defining animations for the Creatures - how, for instance, do they know how to walk, or swing a Melee Weapon? Since the Creatures can have a variety of shapes, pre-defined animations are unlikely to work very well.

Perhaps if I had a way to procedurally define, for example, a workable walking animation for a creature of N legs, where each leg has Xn parts (I'm using the lower case character in those symbols to serve as a subscript, since I haven't found a way to produce that here)...

Without that, I could have the Creatures slide along automatically, but then why would they develop legs of any sort? I think that either procedural or learned movement (probably using some simple "physics" along the lines of "if a part of a Limb is below the bround plane, and is moving, move the Creature in the opposite direction") would allow for more interesting variation in the Creatures...

Hmm... however, the overall gameplay effect should be similar, so I could prototype the development of weapon and "armour" types, and perhaps some behaviour, at least... I shall think on that, I believe.

Gazza_N
07-10-2007, 07:38 PM
Why not create "compound" creatures? Define a reasonably large library of separate creature parts, each with their own animations and properties, then have the AI amalgamate them into a single creature based on current requirements (and limited by balancing laws, naturally). This would have an effect like vehicle construction in Alpha Centauri (the Sid Meier game). Procedural generation is good and fine if you want to try it, but this strikes me as more easily implementable.

Thaumaturge
07-10-2007, 07:50 PM
True...

On the other hand, it introduces its own overhead: the creation and animation of such a library.

Hmm... I think, given all of this, that I will first conduct a search on GameDev.Net's AI section for procedural or AI-based techniques of pleasing simplicity, and, if I find none, go with the idea of pre-defined creature parts, using a fairly small library for the purposes of the prototype.

Gazza_N
07-10-2007, 09:37 PM
Yes, it would take time to build a parts library, hence "reasonably large". ;) I still feel that this is a more realistically achievable system, but I won't dissuade you from procedural generation. If nothing else, it is an excellent coding exercise, and you are after all a much better coder than I. ;)

Thaumaturge
07-10-2007, 10:20 PM
Hmm... I have discovered with interest that Spore seems to use some sort of procedural animation to allow it to animate the varied creatures constructed in the game.

I should do more research into that, but in the meantime, and for prototyping purposes, I think that I will go with something along the lines of your suggestion. I might come up with a way to vary the body parts generated - the number of joints in a leg, for example - and thus build in some means of varying the animations based on those variables.

Another question, if you will: is Game Maker up to this? Since this is only a prototype, it would be convenient to build it in something as simple as Game Maker has been presented as...

If not, I think that I have most of what I would want for the prototype in the code of previous project, most particularly my Competition 15 entry.

dislekcia
08-10-2007, 12:19 AM
I would completely ignore any and all creature animation or graphics. Seriously. Your prototype should be around the core AI and how it communicates/reacts to individual creature info and "experiences", that's the important part of what you're doing.

Your creatures could behave as though they're made up of 15 million legs and 73 mouths, but that only matters in terms of the information they can pass back and how they do that. You've got to get away from the fluff and start thinking of ways to track player experiences.

-D

Thaumaturge
08-10-2007, 04:21 AM
Hmm... You make a good point, I believe.

I'll admit that I don't often produce prototypes, so I daresay that I have much to learn! ^_^;;

I will try to work on this with your advice in mind - I'm not sure of how to handle that as an interactive prototype, but then perhaps a non-interactive prototype would work better...

Thank you for your advice. ^_^

Thaumaturge
30-10-2007, 06:39 AM
Well, after much thought on the Myriad concept, I eventually felt that I had enough to begin on a prototype. Work on that prototype was sporadic, but, at last, I have completed it!

Myriad prototype (http://gamedev.openhazel.co.za/filecloset/download.php?id=257)

It is very basic, however, and the code is rather hack-y, but it more or less works, it seems.

This done, I intend on moving on to Thaumatomech, as well as the design phase of a rather large adventure game project that I intend on creating. ^_^

~

Description of the prototype:

You control the little grey fellow who starts in the centre. You can move him using the w, a, s and d keys, and fire a short-ranged magical bolt with the space bar. Your score is shown in the top left corner of the view.

The larger grey creatures are not active - you can shoot them, but won't gain in score for doing so.

At the start of the game you should have a small green creature in the top right of the play-area; this is a "controller" creature. It does not attack you directly, but wanders around randomly until it spots a grey creature, and then heads for it. When it gets close enough to such a creature, that creature is "assimilated" into the hive-mind, and turns green. (The main function call for doing so is actually called "assimilate(...)". :P)

You get 1 point for shooting a green (i.e. hive) creature.

A grey creature that the hive knows about is shown with four red points at the corners of its tile.

These larger creatures come in two types: Long-"nosed" ranged creatures, and a single short-range creature. Both will attack when they know where the player is.

Tiles that the hive remembers for the player have green points at each corner. If the hive has more than one of these, it should send a creature to investigate.

Each type of creature has its own field of vision - the brightly-lit tiles are the ones that the hive can see - and note that it does not discriminate between input from one creature and input from another. (The fading of the tiles has little real effect; the underlying effect could, for example, be used to simulate short-term memory for certain features, causing the hive to "forget" things. In this case it largely serves to keep the cones of vision visible, instead of most of the play-field ending up bright)

The lighter circles on the map denote "high points" - note that these actually have no effect on range or combat effectiveness in and of themselves. Tiles that the hive has seen as being "high points" are marked with a cyan point.

Once the hive has a location for the player, it sends creatures to attack. If they are out of range at the start, ranged creatures should attempt to move to high points near to the player, and shoot from there.

Tr00jg
01-11-2007, 01:00 PM
Hmmm... The first I loaded up the game, the controller creature did spawn, but for some reason he won't spawn again.

So yeah, I couldn't actually properly test it. It looks good so far. Now you need some sort of "environment" to put them in. :)

Thaumaturge
02-11-2007, 05:15 AM
Spawn again? Do you mean that he appeared when you first ran the game, but not on subsequent executions? If so, then that's very strange indeed...

If you mean that you only ever had one controller creature, then that is the expected behaviour - as I said, the prototype is very basic. ^^;

I should probably mention that there is a bug in the system that causes entities to end up seeming to "disappear" when the game lags - it shouldn't be difficult to fix, but should hopefully not be happening too often. If it is, then it would probably be a little tricky to test the prototype in any case. ^^;

As to taking this further, I do have an idea that might work with this system. The player would control a being capable of "possessing" other entities (a-la-Messiah), attempting to destroy an evil hive organism. The game would involve possessing creatures and attempting to hold on to them (as long as they're useful, I suppose), while the hive entity attempts to either kill or assimilate the creature (forcing you out either way, and gaining a new unit in the latter case).

Unfortunately, it is currently number four in my list of games that I'd like to start in on, and I don't think that actually starting work on more than two would be a terribly good idea. (In fact, even two might well be rather challenging.) ^^;;

(For those who might be interested, one and two, in no particular order, are Thaumatomech and the aforementioned adventure game, while three is a multi-path, optionally surreal adventure game that was inspired by a dream.)

Tr00jg
02-11-2007, 11:48 AM
In subsequent executions of the game the controller creature did not spawn... Weird. The Hive has assimilated your program!! :P

The surreal adventure game looks intriguing.

Gazza_N
02-11-2007, 06:12 PM
It looks good, Thaum! I likes the particle effects. ;) As for the control creature not spawning, I had no such problem.

I'm eager to see a more developed version of this concept, especially if you put the possession mechanism in place! :)

Thaumaturge
03-11-2007, 07:00 AM
The Hive has assimilated your program!! :P

*laughs* Well then, perhaps I should make that possession game, and have the protagonist re-acquire the program for me!


In subsequent executions of the game the controller creature did not spawn...

Aah... I think that I may know what is happening. As I said previously, the code for this prototype is very hack-y. One of the flaws that it has is that it doesn't handle large timesteps particularly well, tending to cause large jumps. It may be that, for some reason, you have been getting some lag on startign up the program, and the controller creature has been "jumping" far out of the play-area.

The player character and inactive creatures should, as I recall, have zero velocity until you provide input or the controller creature assimilates them, respectively, and thus are probably not affected.

I can be pretty confident that it's not a spawning problem because I hard-coded the creation of those particular monsters. ^^;;


The surreal adventure game looks intriguing.

Heh, it's an idea that I quite like. It's a game in which the player's choice of paths affects what sort of story they take part in. More specifically, it would be a game of multiple short stories that are experienced depending on the path chosen. If the player chooses to pursue mundane events (a person that they saw firing a gun at another, for example), then they experience a mundane story (a Mafia story, for example). If they instead examine a nearby strange painting closely enough, they might end up inside the painting, and whatever worlds it might lead to. Noting that peering at a starry sky yields a "forward" cursor might allow them to move into a perspective in which they move between the stars, which might be hung about them like lights on strings.

All in all, very strange - if the player so chooses. ;)


It looks good, Thaum! I likes the particle effects.

Thank you very much! ^_^

Heh, the particle effects are largely, I would say, the results of five things:
1) Simple particle effects like this are easy, especially when, as I do, one has a fair bit of the code already written.
2) I was dissatisfied with the previous version, which involved only one particle per projectile, as I recall.
3) Boredom.
4) I felt at times too tired to want to work on something more important to the project.
5) I like particle effects. ^_^
:P


I'm eager to see a more developed version of this concept, especially if you put the possession mechanism in place!

Heh, maybe I will at some point. Perhaps once Thaumatomech is done I'll sit down and decide between the surreal adventure game and the possession game (presuming that I remember both and that something more interesting hasn't come along in the meanwhile, of course :P).

Thaumaturge
03-11-2007, 07:05 AM
This post is the result of an accidental double post. For some reason (perhaps lack of sleep) I'm not finding the delete button - my apologies for this. >_<

Tr00jg
03-11-2007, 12:07 PM
Hey that surreal game sounds like a dream. You never know when some arbitrary occurrence might send you off to some odd new world.

Sounds cool!

Thaumaturge
04-11-2007, 05:51 AM
Hey that surreal game sounds like a dream. You never know when some arbitrary occurrence might send you off to some odd new world.

Yup - that's pretty much the idea. ^_^


Sounds cool!

Thank you! ^_^