making camera follow enemy in versus mode

ABK

Well-known member
Is it possible to control? Currently camera follows only player but i would like it to pan when enemy walks and jumps around to follow him too.
I guess its hardcoded so camera doesnt follow enemies.
I have subject to screen in enemies but it doesnt really change anything besides enemy being dragged by screen which looks just wrong and he doesnt go offscreen by himself.
So how about "subject_to_camera" ? This could also solve the issue with splitscreen where 2nd player isnt followed by camera.
 
Why don't you just set scrollxspeed to 0 and use script to control camera's position yourself? :)

I don't understand this subject_to_camera idea. If it's similar to subject_to_screen then what's the difference with that one?
I think you actually meant camerafocus which define if entity will be the focus of camera.

We need to discuss this more if there are more than one entity defined as focus of camera (like players)
 
I don't understand this subject_to_camera idea. If it's similar to subject_to_screen then what's the difference with that one?
They work different. subject_to_camera would make the camera always follow that entity.

Take a look at how its done in Mugen and you will understand:
http://elecbyte.com/mugendocs-11b1/sctrls.html#screenbound

So you can set this on an enemy and the camera would follow him, no matter where the player is. In Mugen, we can set in on a helper (an entity) and the camera will start to follow it, not the players.

this is very usefull in throws (Wonderwoman uses it, for example), where she uses her lasso to throw the enemy from one side to another. The camera follows the enemy, not Wonderwoman.
 
Well, it's kinda inconsistent with other subject commands.
Pick subject_to_screen for example. With this set to 1, entity is forced to be onscreen no matter where screen is
Now subject_to_camera should have same logic like this: if set to 1, entity is forced to be within camera sight no matter where camera is. Am I wrong? :)

Alright, that's just name problem. I'll be using camerafocus term for this discussion though.
Now let's discuss the main focus. What if multiple entities have camerafocus 1 set?
It's not big deal if multiple entities have subject_to_screen 1 set since all of them will be forced to be onscreen. However if say 4 entities have camerafocus 1 set, where will camera go to if one goes left, one goes up, one goes right and the last goes down?
Who has priority over the other? (um, why should one has priority anyways?)
 
ok, change the name to camerafocus. Or, subject_to_camera_focus.

What if multiple entities have camerafocus 1 set?
The last one to active it is the focus.

why should one has priority anyways?
If not, this defeats the whole propose of "camerafocus"

And there is a big difference between "subject_to_screen" and "subject_to_camera". The first one bounds the entity on the screen area. The second one should pan the camera even OUTSIDE/BEYOND the screen area, to reach that entity. IOW, if the entity is 1000px to the left, the camera need to pan to show it, ignoring WAIT, subject_to_screen and such.

Think like a real camera and you will understand. You can't focus two different objects, you need to focus one object per time.
 
By default, camera is controlled by players. Yes, players, not just one of them, so if there were at least 2 of them, one can't move on and drag the others IOW if one player is on one edge while the other moves to opposite edge, camera won't move at all.

This feature shows that even though all players controls camera, nobody has priority over the other and camera won't leave nor drag players
Do we want to have this 'feature' or not?

Oh yes, in 1Vs1 game, isn't that how camera work?
 
I just want camera in versus mode to follow enemy like it follows player.Currently it follows only player and enemy is just enemy, i only gave him subject to screen 0 but camera doesnt have anything to do with it.
Also sometimes i want camera to not follow player at all when animating but subject to screen doesnt solve this problem so i have to spawn some fake entity with players sprites and palette to do the animation.
 
Do we want to have this 'feature' or not?
Yes, we want it :)

Oh yes, in 1Vs1 game, isn't that how camera work?
In 1vs1 games, the camera always follow the highest player (look at MVC games for example). OR, we have the ability to give this priority to a helper entity. Once we gave it, the camera will always follow that entity, no matter where the players are.

We don't want to change the default behaviour, it works fine. We want to be able to change it if needed.
 
Ah glad we have something in common :)

I wasn't asking to change default behaviour, I was worried that after camerafocus is set via script (hopefully it's available via script too ;) ), there would be no way to return it to default state IF camerafocus only focuses on certain entity.

Anyways, to ensure we are in same frequency, this is what I have in mind about camerafocus command:

- Players by default have camerafocus 1 set
- Other entities by default have camefocus 0 set
- If enemy or NPC has camerafocus 1 set on its text, camera will follow he/she/it too
- As I posted before, camera won't leave offscreen nor drag any entities with camerafocus 1

Hmmm this makes me think that we need priority for this command maybe in certain levels, boss will be camera focus and player lose control of camera when that boss is spawned

Also sometimes i want camera to not follow player at all when animating but subject to screen doesnt solve this problem so i have to spawn some fake entity with players sprites and palette to do the animation.

Well, you could use script to make your own camera control
 
Almost there...

there would be no way to return it to default state IF camerafocus only focuses on certain entity.
Just turn it off, no?

Anyways, to ensure we are in same frequency, this is what I have in mind about camerafocus command:

- Players by default have camerafocus 1 set
- Other entities by default have camefocus 0 set
- If enemy or NPC has camerafocus 1 set on its text, camera will follow he/she/it too

I think the opposite. "camerafocus" should be 0 for players - ie 0 means the common camera in action, or the coders would need to change many things at OpenBOR core code. "camerafocus 1" should "turn on" the focus, taking the focus to only that entity, ignoring all the rest.

- As I posted before, camera won't leave offscreen nor drag any entities with camerafocus 1

Camerafocus SHOULD be able to leave offscreen if the entity is free to walk offscreen. We need the ability to set focus on that entity no matter what happens, like in 1vs1 games. subject_to_screen controls if the eneity can go outside or not.

boss will be camera focus and player lose control of camera when that boss is spawned
THIS. This add more dramatic feeling to the fight.

 
I was trying out with subject_to_camera and camerafocus, but I don't see the effects for them. However, I'm confused which type of entity I could use the camera options via eader for the characters. I'm trying to make something similar to the way bWWd wanted. What we don't want is the camera panning away from enemy to only focus on the player. We need camera to focus on enemies.

EDIT: I have subject_to_camera and camerafocus in both player and enemy. subject_to_screen 1 only works for entities, but what if you as a player walk away from a fallen enemy? The fallen enemy is off screen unless he gets up.
 
Eh maxman, those commands are still in discussion and none of them are implemented yet

So for now your best bet is to disable default camera and use script to replace it. Now, the real questions are these:
1. who will be the focus of camera? or where will the camera would be if there are 2 or more entities controlling the camera?
2. If 2 or more entities control camera, what will happen to camera if they move in opposite directions?
 
bWWd said:
Is it possible to control? Currently camera follows only player but i would like it to pan when enemy walks and jumps around to follow him too.
I guess its hardcoded so camera doesnt follow enemies.
I have subject to screen in enemies but it doesnt really change anything besides enemy being dragged by screen which looks just wrong and he doesnt go offscreen by himself.
So how about "subject_to_camera" ? This could also solve the issue with splitscreen where 2nd player isnt followed by camera.

Yes it's possibile! I can posto here if you want my custom camera script!
It works only for players but if you qant you can extend it to all enity types changing ONLY the main for ^__^
 
Bloodbane said:
Eh maxman, those commands are still in discussion and none of them are implemented yet

So for now your best bet is to disable default camera and use script to replace it. Now, the real questions are these:
1. who will be the focus of camera? or where will the camera would be if there are 2 or more entities controlling the camera?
2. If 2 or more entities control camera, what will happen to camera if they move in opposite directions?

Specifically tough questions to answer. OK, the camera shouldn't pan away from the lain entity especially the enemy. Also, it needs to surround the player and enemy types when they face each other. I have enemies that are in subject_to_screen and every time I move away after I do knock down to them, like I said, the camera pans only to focus on players instead of staying or waiting for the enemies to get up. But the players are fine since camera only focuses on players for 1vs1 so there's no problem with it unless I find something strange for them. I tried the scripted subject_to_camera in animation but there's no effect for it.

I noticed subject_to_camera and camerafocus don't have any effect at all.
 
D'oh! Sorry about that. Didn't read carefully. You guys are right. They're not implemented yet. I wish they were at this time. Now we have to wait for it to be implemented.
 
maxman said:
But the players are fine since camera only focuses on players for 1vs1 so there's no problem with it unless I find something strange for them

Ah, so you want camera movement for 1vs1 game. If you do as I told you before abut registering fighters in global variables, the scripted camera would acquired both then move camera based on their position
 
Back
Top Bottom