Zoom kludge

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Zoom kludge

Post by Ganelon »

A zoom view has been suggested before, but for various reasons it isn't likely so far as I understand.

This isn't what I'd call an actual zoom, but it may work well enough for the occasions where a closer look would be nice without actually getting closer.

If you add these lines to the "custom views" section of the shipdata.plist for your ship:

Code: Select all

							{
								view_description = "10 KM Zoom View";
								view_orientation = "1.0 0.0 0.0 0.0";
								view_position = "0.0 30.0 10000.0";
								weapon_facing = "FORWARD";
							},
							{
								view_description = "20 KM Zoom View";
								view_orientation = "1.0 0.0 0.0 0.0";
								view_position = "0.0 30.0 20000.0";
								weapon_facing = "FORWARD";
							}


Now, here's the regular forward view:
Image

Note from the scanner that we're a bit over 20 km out from the station. So I use the "v" key to switch to custom views and scroll through to the "10 KM Zoom View"
Image

Then the "20 KM Zoom View"
Image

Ok, so far, so good.. (and the code mavens here might add "so what?", but it took me a bit to figure out and at least other mostly non-coders might have some use for it).. But there are some odd problems you can run into using it, which is why I referred to it as a kludge.

The "camera" won't collide with obstacles, but if it goes inside things that we'd normally think of as objects, it can look pretty weird..
Image

That'd be the "inside" of the station in the other pics, except of course there really isn't anything interior to see, much. Kind of an "illusion breaker" in my opinion, so if you decide to try this, you might want to avoid doing that.

Using this kludge will not make anyone into a long-distance uber-sharpshooter, since the targeting reticle doesn't work in camera views. For that reason, also any ID-ing of ships using it to look out to the edge of scanner range would be visual ID only. That stands to reason in game logic, though, since if scanner range could be extended with the technology in the game universe, it stands to reason that would already have been done.

It might be some fun for long range sharpshooters who'd like to get a pic of the results of their shot though, if they lined up the shot before switching to the "zoom view".

It could maybe be useful at times when you can see something going on up ahead but aren't in scanner range yet, or to get some nice close-up shots of big things like stations without risking colliding with them. Might be handy for a player who's still early enough in the game to have to be very cautious about pirates and etc (though I doubt many of them go pasting code snippets).

Anyway, it's crude and inelegant, but it *sorta* simulates a zoom capability, so I figured I may as well post it.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Zoom kludge

Post by Thargoid »

It also goes kinda wrong when you have ships where part of them actually appears on-screen (for when the HUD is designed specifically around them, and you get an odd gap).

Oh and also it goes trumbles-up when you press the fire key for your lasers. And unfortunately whilst you can set which laser fires when you are in a given view, one option that is missing is "none".

I did look at this kind of thing with the Vortex, but abandoned them for these reasons (including your "flying through things" - it looks even more weird when you're doing a planetfall landing ;) ).
Last edited by Thargoid on Mon May 30, 2011 4:20 pm, edited 1 time in total.
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Zoom kludge

Post by Ganelon »

I'll have to try that planetary landing with it on! :lol:

I didn't actually try firing lasers with it on, but that could be one more reason it'd be of rather limited actual usefulness. I know you can fire lasers with the regular external views though, I've done it to get pics on occasion.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Zoom kludge

Post by Thargoid »

Yup, but it looks rather odd when the beam comes from exactly the same place when you're viewing at 20km out as it does when you're viewing from your front cockpit view. It would be nice if the "none" option of which laser fires in the view could be coded into the trunk (after 1.76) then it would be better.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Zoom kludge

Post by CommonSenseOTB »

:?: Is there any way to determine which of the external Custom Views the ship is currently in. :?: Is there any information given off that a developer could pick up on and use? Please and thankyou if anyone knows definitively.

Ganelon, I bet a lot of people that tinker with things in oolite have done something similar to this. I'm with you brother! :wink: It sure would be nice to have a real zoom capability within a zone about 150x150 in the normal forward view and autostick sensitivity set somehow to 1/2 the pitch/roll/yaw of the current selected sensitive level all automatically when you're zooming.

Bounty hunters might find it interesting to sit for a minute panning around looking for something 2 or 3 scanners away. Find your target, hit the torus drive, hit the fuel injectors, and its payday! He would never know what hit him! :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: Zoom kludge

Post by maik »

CommonSenseOTB wrote:
Bounty hunters might find it interesting to sit for a minute panning around looking for something 2 or 3 scanners away. Find your target, hit the torus drive, hit the fuel injectors, and its payday! He would never know what hit him! :D
He will even know less if you approach to a distance between 20 and 30km and use your military laser. Combined with the zoom you describe it makes perfect sniping. Could get boring though...
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Zoom kludge

Post by Commander McLane »

CommonSenseOTB wrote:
:?: Is there any way to determine which of the external Custom Views the ship is currently in. :?: Is there any information given off that a developer could pick up on and use? Please and thankyou if anyone knows definitively.
I don't think that this information is exposed to JS. The viewDirectionChanged event handler and the viewDirection property return VIEW_CUSTOM for any custom view.

The underlying issue is that the custom_views array is completely arbitrary. You can include any view definition you want. So how would the engine even know which views exist? Therefore it can't distinguish them.

A possible request would be to add an optional parameter to the custom_views array. It would contain a string that would be returned by the viewDirectionChanged handler and the viewDirection property instead of VIEW_CUSTOM.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Zoom kludge

Post by CommonSenseOTB »

I don't think I would push my luck. 2 days ago a feature request was put in to fix what is viewed a bug in the hud.plist in that legends can't use equipment required. Was a result of a conversation over a hud test I did and this will revolutionise hud design(no exageration). If one could get a string from CUSTOM_VIEW one could make external changes to sights, huds etc. Might make some of what Ganelon wants reality(and then some). Oh well, maybe down the road then. :) I have lots of other tricks up my sleeve until then... 8)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Zoom kludge

Post by Ganelon »

Thargoid: I was not able to replicate the laser problem you mentioned. They seem to work fine. I'm only using forward facing and views, but it seems to work as usual. The main difference that I see is that the laser beam range "runs out" between 29 and 30 KM (for a mil laser). At 30 km, you don't see it anymore, because it just doesn't go that far. I didn't go "trumbles up" on me. Maybe something was fixed since you were working on the Vortex, I don't know.

But having tested it, I found it is possible to hit a target outside of scanner range using this kludge. That's rather to be expected. One doesn't have the advantage of the usual targeting aids or computer identification at that range, but the beam will still hit, up to it's maximum range, from what I can see. Hits still happen, and affect the shooter's legal status as usual, so I assume that kills/bounties would also be credited as usual. So it might actually be of more use to players that rely a bit on long-range precision sniping than I'd originally thought. Targeting has to be done by eye, and of course it's touchy because the camera views don't change how the ship's controls actually respond.. But for an experienced and patient sniper, it could be useful.

I wasn't looking at those potentials, since I don't do long range sniping. In fights, I prefer to close in and engage at ranges where I can sometimes count the rivets and scratches on the opponent. :lol:

I also noted that while the legal status updates as soon as the shot is made, repercussion/reaction to it doesn't occur until the player moves into scanner range. That somewhat makes sense, since any official parties would likely require a positive ID before opening fire.

As a bit of "handwavium" to explain how the shot can be identified beyond scanner ranges, I'd propose that all laser weapons are apparently "tagged" with some sort of modulation that can be decoded to determine the identity of the shooter. This would be for legal liability reasons, since scanners are not currently effective at the range some laser weapons can reach. There's probably a warning somewhere in the fine print of the laser's manual, that tells the Jameson that their brand new military laser can cause damage further than their scanner will show and advising them to not fire when a station or vessel may be behind the target, but only when they have a definite clear shot.

It might explain, though, why on some rare occasions players have said they get a fugitive status when they are not aware of any wrong-doing on their part. A shot taken at a pirate or whatever may have continued on to hit the station or a patrol vessel just outside of scanner range.

Anyway, it's still a kludge and not an actual zoom. An actual zoom wouldn't allow one to see beyond an object, since that's just not practical/simple optics. I don't see it as "uber", either (at least not for the distances I posted code for), since it doesn't extend the range or power of the weapon or mitigate the consequences of using it. Used within reasonable limits, it doesn't really allow doing anything that couldn't be done before in the default game. It can be pushed to the point of absurdity of course, but that's always possible with almost any game feature.

So far as what I "want", CommonSenseOTB.. Well, in my desk drawer, I have two digital cameras. Both can do zoom. The cheaper/older one can do "digital zoom" which makes the image appear bigger/closer by basically changing the resolution. The other one can do that, but also has "optical zoom" which involves it actually moving lenses to change the focus. As a player, I find it odd that my ship that is over a thousand years in the future can't do that on it's vewscreen, when fairly cheap cameras from this time can.

Now the "why" of my wanting it.. I don't have the smallest monitor here, some people use laptops and smaller monitors, I'm sure. What's more, I use a fresnel magnifier, so my 17 inch monitor looks more like 20-something inches. But still I sometimes have trouble spotting ships at distance in the dark of space. They've shot at me, I can see them on the scanner, but I have to look close and try and spot a pixel or few moving in the dark to figure out where they are to find out what I'm up against or target them to return fire. Now, if a player had a very large display, they probably would have no interest in a zoom function. People play Oolite on a wide variety of gear though, and so a large display can't be assumed. So far as weapons functions, I don't have any particular interest since I'm not a precision sniper sort of player.

So far as Thargoid's idea of disabling weapons in the camera views.. Unless it was possible to do it just for certain views, I wouldn't be keen on it. I mostly use the camera views for getting external pics of my ships and game action. I sometimes spend hours picking fights just to get one good picture of a nice weapons "hit" on an enemy craft at a good angle and the lighting where it sets off the detail of the hulls and etc. If weapons couldn't be fired when in camera views, it would reduce the potential for dramatic screenshots or video clips.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Zoom kludge

Post by Commander McLane »

Ganelon wrote:
So far as Thargoid's idea of disabling weapons in the camera views.. Unless it was possible to do it just for certain views, I wouldn't be keen on it.
Well yes, of course.

Code: Select all

                        {
                "view_description" = "Rear View";
                "view_orientation" = "1.0 0.0 0.0 0.0";
                "view_position" = "0.0 30.0 -200.0";
                "weapon_facing" = FORWARD;
            },
                        {
                "view_description" = "Rear Right View";
                "view_orientation" = "0.9239 0.0 0.3827 0.0";
                "view_position" = "141.42 30.0 -141.42";
                "weapon_facing" = FORWARD;
            },
You notice that there is a key weapon_facing for each individual view. So of course you can choose a different weapon (or none) for each individual view.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Zoom kludge

Post by Thargoid »

Commander McLane wrote:
You notice that there is a key weapon_facing for each individual view. So of course you can choose a different weapon (or none) for each individual view.
Except that it doesn't actually work (or at least it didn't when I tried it) presuming that you actually have a weapon installed on the facing in question. All that key does is tell you which of your laser mounts is the appropriate one to fire for the view in question (for laser heat purposes mainly). And the none facing doesn't work at all, or didn't for me.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Zoom kludge

Post by CommonSenseOTB »

Ganelon, for getting pictures or video during combat(duels) wouldn't it be nice if in external views one of them was auto and would track your target having the camera face your ship with the target behind your ship and always keeping the 3 things lined up(with camera position still definable so you can set how far away from your ship the camera is(z) and and a relative offset(x,y) from the straight line of the 3 positions. These are pretty big wants but the coolness factor is through the roof and this would allow one on one cinematic type dogfighting in the third person. Changing your target changes the camera view all automatically and while your fighting. I'm all for that! 8)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Post Reply