playerpush, prevent overlapping of characters

marco75

New member
I'm learning the very basics of OpenBOR engine.

I do this mostly by reading the .txt files in paks that I like best and the Getting Started manual included in some distros of the engine.

I find that I like certains paks a lot, but then think I wonder if the game were more fun (for me) if certain aspects were changed.

I noticed that enemies can bunch up in a big pack and multiple enemies occupy the same X Y coordinates -- apparently the collision detection is only used to detect hits between bbox (hittable targets) and attack boxes. This results in this big mass that gets knocked out of the screen by the player's knockdown attack or super move.

The ultimate 2D engine has no collision detection between non-attacking bodies. Enemies and enemies, and players and enemies, they just pass through each other.

I was a bit shocked by this, it seems like a very basic functionality for a game engine to have. So I played some arcade brawlers in MAME to see how they behaved.

Playerpush?
Bad Dudes VS DragonNinja : No
Double Dragon : No
Final Fight* : No, Grabs enemy -- Hagger actually has a playerpush of sorts - while he is grabbing a mook, he can carry them around
Vendetta : No

*Final Fight became the template for Streets Of Rage, and Senile Team created BOR engine to reproduce the feature set of these two engines.

Well, now that makes sense. OpenBOR doesn't have playerpush because no game of the genre does. (citation needed) Perhaps it was tried during development of various titles and the devs always found it made the game less fun.

Could it be done with a workaround? I can imagine several:

1 - simply have fewer enemies on screen. Enemy spawns are adjustable for number of players, so for a single player, they can start with fewer and ramp up with stage progression.

2 -editing of groups/attack waves. Combine enemies with low aggression, slow walking speed and stationary attacks with enemies with higher aggression, fast walking speed and leaping/rushdown attacks. The two kinds would seperate out?

3 - enemy AI scripting. The engine can tell how close two objects are to each other, right? Certain enemies can be coded to back off and wait until the player knocks someone to the ground, then rush in with an attack. Enemies can be coded to keep a certain distance from each other.

I think 3 is the most interesting programming challenge. Enemies move quite differently in Double Dragon then they do in Final Fight; It would be cool to study how they 'think'.








 
Sadly cheap AI is usually the fault of the mod creator not the engine.  There is many options for creating enemies to prevent all the issues you mentioned.  Check the updated manuals and wiki, that document you mentioned is extremely old! 

OpenBor Manual
OpenBor Wiki (wiki is broken atm)

You can also check Helpful Links and Scripts Index threads for commonly used AI tricks.  It will give you a few good ideas/examples.

#1 - Can be controlled with basic grouping that has been in BOR since day 1.  this is definitely an issue of bad grouping.  Bunching up is the 'clone saga' problem, the modder has just copied the same enemy template a dozen times so they behave all the same.

#2 - Yep spot on this is how you start to have more interesting AI, combined with scripts there is a lot you can do, like random walk speeds etc.  For best examples look at mods by people like, Bloodbane, maggas, O Ilusionista and whitedragon to see what you can really do with AI in openbor. 

#3 - Yeah another good idea, for example you can use the various animations which are controlled by range (how far away opponent is).  You can give enemies random animation changes.  For example blocks could random switch to dodges, certain attacks could be random.  This way the player has a harder time finding the patterns and makes fights more interesting.  With script enemies can detect what animation the player is in or what attack they just hit them with and act accordingly.  Or they could detect how many other enemies are on screen and summon more if they're alone.  Boss fights can use grouping so waves of enemies continue to appear until he is defeated.  Just a few examples. 

Enemies can also use 'weapon models' like players.  In openbor a 'weapon' model is just another version of the same character, normally used to make versions of them holding weapons.  But it can also be used for anything, like to make enemies have different fighting modes and/or transitions.

There are lots of little flags that can be set too like this example
Code:
offscreen_noatk_factor {bi}

    ~This command determines the ability of an entity to be able to attack while off screen. Useful to prevent entities that use ranged attacks like shots for example, they can attack without being in the visible area.
        0 Means that the entity can attack outside the visible area (default)
        1 Means that the entity CAN NOT attack outside the visible area.


About your observations thou, you should note OpenBOR has changed a lot over the years.  There has been numerous updates/changes to things in the AI like aggression.  The default AI settings can be very cheap now on the older mods that were made a long time ago.  Especially mods that were made with the original BOR.  Old mods with enemies that use the built in jumpattacks will be the cheapest. 

Newer games should be fine if coded well.  Modders don't use these older methods anymore because the engine has much more powerful options now, thou they remain for backwards compatibility so old mods 'work'....  Frankly backwards compatibility in openbor just means it can still run "insert name of popular mod from 2003 here" yet fails to run mods in active development.  ::)

 
I noticed that enemies can bunch up in a big pack and multiple enemies occupy the same X Y coordinates -- apparently the collision detection is only used to detect hits between bbox (hittable targets) and attack boxes. This results in this big mass that gets knocked out of the screen by the player's knockdown attack or super move.

because, as you guessed, this is not mandatory in Beat em up games. In fact, its the opposite.

The ultimate 2D engine has no collision detection between non-attacking bodies. Enemies and enemies, and players and enemies, they just pass through each other.

This kind of irony won't help. At all.
 
Back
Top Bottom