mighty_archemedes Report post Posted December 12, 2010 Hi. My name's Michael, I've been developing for over fifteen years now and have enough experience with OpenGL to know my way around it. I love this MMORPG, but there are a few small things I would like to correct. The first issue is the need to constantly be rotating the camera around the player, along with controlling zoom and inclination. Back in the day (as far back as Zelda 64), there were routines that would cause the camera to follow the player's actor, constantly providing the perfect perspective for combat and other interactions. It took a little getting used to at first, but it was priceless as the game went on. Eternal Lands could most definitely use such a thing. This presumes only that every actor has a stored angle that they are oriented toward, as their "front"; and that the camera can be treated as an invisible sprite, which is usually (perhaps imperatively) the case for OpenGL. It involves two steps. The first is to rig the camera so that it, by default, faces the same direction as the player actor (cheesecake...), and the second is to add a management routine for sudden turns, to keep it from jaggedly swinging over large angles in a single frame, and preserve the fluidity. I have not had time to look over the architecture of the game yet. However, there are two possibilities that I can think of off of the top of my head for option two. The first is to leave a trail behind the actor characteristic of that which guided the AI in Half Life, back around '97, and follow it. That might be unfeasible. The second is to provide a tension algorithm that would move the camera back toward the head-on "neutral" alignment at a rate that is parabolically related to its distance from neutral. The further away it is, the faster it moves, until it's at neutral, where it moves at zero (remains still). Combine that with the middle-button mouse movement, and you have one heck of an intuitive camera. Give me your thoughts. --Michael Share this post Link to post Share on other sites
korrode Report post Posted December 12, 2010 Options -> Sky&Cam You might wanna have a look at options like "Follow Camera" and "Keep the camera behind the char", etc. Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 12, 2010 Options -> Sky&Cam You might wanna have a look at options like "Follow Camera" and "Keep the camera behind the char", etc. I just found it, it makes life a lot easier. Nonetheless, it moves jaggedly, and adding a springiness would significantly increase playability. Not to mention, some kind of collision detection or transparency for wooded areas. Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 12, 2010 One suggestion might be to sort on-screen objects by interpolating their distance between the player actor and the camera, making those at the distance of the player opaque and those at the camera transparent. This would provide for a nice fade without warping the environment. If the player used middle-mouse or the arrow keys to look behind, everything behind would slowly become visible while objects approaching the camera would be semitransparent. This would get around potential jagged movement in the forests. However, it assumes that the terrain does not qualify as any-old-sprite. (I don't want the GROUND to be transparent!) It also assumes that the trees do not qualify as terrain, and they jut might. --Michael Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 12, 2010 I just had another idea. A lot of the difficulty comes from the numerous turns that the actors take in trying to get from point A to point B. However, there's just one line between the two. If the camera were to be oriented in the general direction of point B (the destination), rather than the direction of the player, most of that jumpy camera spinning would be gone. The only issue would be long trips across a map, where the player might need to cut around a mountain range. It all depends on the path finding algorithm. One potential solution might be a second, line-of-sight path finding algorithm that would create a course for the camera until movement is interrupted. The constraints would be that the player actor could not leave the view, and that the next way point would always be in sight. It might be even nicer if, as an afterthought, a little bit of a radius of curvature was added at the way points, to smooth out its motions. This would almost completely remove the jaggedness. Share this post Link to post Share on other sites
Roja Report post Posted December 12, 2010 There are a few settings at the bottom of the sky&cam window to adjust the "springiness". I don't know how much else it can be improved upon. The transparent object thing might be nice though. Share this post Link to post Share on other sites
wuffzel Report post Posted December 12, 2010 (edited) The transparent object thing might be nice though. yes it would be real nice if objects between my char and camera are not visible and not blocking my view like this : maybe a check, camera ->object-> char if the object has a specific distance to the char make it full or 1/3 alpha Edited December 12, 2010 by wuffzel Share this post Link to post Share on other sites
korrode Report post Posted December 12, 2010 The transparent object thing might be nice though. yes Indeed. Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 13, 2010 The transparent object thing might be nice though. yes it would be real nice if objects between my char and camera are not visible and not blocking my view like this : maybe a check, camera ->object-> char if the object has a specific distance to the char make it full or 1/3 alpha Well, the real question is, is the object in the way of the character? If so, it's easy to make a smooth interpolation of its distance. We don't have to have a set amount of alpha. I've also thought about having just a ring of alpha around the character, like a ball. This might look good, it might look confusing. There's only one way to know for sure and that's to try it. Another thing that drives me nuts is when I'm chasing a small animal (with a huge weapon) and it keeps ducking behind trees. I can't keep up with it just because I'll end up clicking on an object behind me, and the mouse pick will drop to the ground below what I clicked. Then my character does a 180 and the animal is lost forever, free to fight another day. If we add transparency, then the picks should hit the furthest visible item. Rabbits beware. Share this post Link to post Share on other sites
Roja Report post Posted December 13, 2010 Alpha around the character-no, because you need to see the objects on all sides(especially small objects)-unless I'm not getting what you're trying to say. Plus only big objects that obscure the view of your character would need to be alpha's-trees, huge rocks, buildings. And you wouldn't want objects on the other side of your char. obscured. There's an option in the config settings so you don't click on the objects and move towards them. I forget which..mouse bug maybe? Share this post Link to post Share on other sites
Raz Report post Posted December 13, 2010 There's an option in the config settings so you don't click on the objects and move towards them. I forget which..mouse bug maybe? Yes Roja that's the one, very useful! Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 17, 2010 Okay, I've got the source on my machine. There aren't any developers here that, off hand, know where camera control is in this, are there? (As a general rule I mess with these things as little as possible.) --Mick Share this post Link to post Share on other sites
Entropy Report post Posted December 19, 2010 Just search for the relevant strings, should be easy to find. In draw_scene.c there is quite a bit of camera code, look there first. Share this post Link to post Share on other sites
Roja Report post Posted December 19, 2010 One other little detail, if you do manage to get this working and all, it should be an option to turn on/off. Share this post Link to post Share on other sites
mighty_archemedes Report post Posted December 21, 2010 Just search for the relevant strings, should be easy to find. In draw_scene.c there is quite a bit of camera code, look there first. Thanks, that's exactly the file that I'm looking for. I have so little time to search through these things, I'd rather spend it outlining and adjusting. One other little detail, if you do manage to get this working and all, it should be an option to turn on/off. Agreed. An additional thought I had was to set this camera up so that there could be an over-the-shoulder Ghostbusters/Max Payne style camera. It would assist the player in that the objects immediately in front of them would not be blocked from mouse picking. This leaves me with a few modules. #1: interpolated transparency between the player and the camera. This may also include a minimum transparency and a maximum transparency; maybe also a near and far cut-off point option. #2: shoulder-camera mode. This would also, somewhat automatically, suggest "right-handed" and "left-handed" shoulder mode, changing the side that the player avatar is on. #3: any last-second idea implementations on camera movement That's three projects, which will be approached in that order. We'll see what makes it in--you can be relatively certain about #1 and fairly certain of #2. I have a few free evenings in front of me, and I'm starting by opening up that file and putting together a satisfactory UML of everything I read in it (like any good systems engineer) until I have a solid understanding--like I said, I have neither the desire nor the right to change a perfectly functional program any more than I need to. If you happen to have any diagrams of that sitting around that you might be willing to throw me, Roja, I would appreciate it very much--it would save a lot of time! Wish me luck, people! (As an aside, if you don't have any such thing and want me to try UML-diagramming the whole thing, I will happily do that for you, Roja--it would increase the stability of, and speed up, any contributions people make in the future.) (Yeah, I've been doodling all of this out on a cocktail napkin for a while. Trust me, cocktail napkins know all.) --Mick Share this post Link to post Share on other sites
Roja Report post Posted December 21, 2010 Sorry, I don't even know what a UML is(i'm not a programmer), but I'll be here to help test when you get things implemented. Good luck and thanks! Share this post Link to post Share on other sites