// initialize jwplayer var playerInstance = jwplayer('player');// player dom elements var playerContainerEl = document.querySelector('.player-container');// returns video player position from top of document function getElementOffsetTop(el) { var boundingClientRect = el.getBoundingClientRect(); var bodyEl = document.body; var docEl = document.documentElement; var scrollTop = window.pageYOffset || docEl.scrollTop || bodyEl.scrollTop; var clientTop = docEl.clientTop || bodyEl.clientTop || 0; return Math.round(boundingClientRect.top + scrollTop - clientTop); }// returns the current y scroll position function getScrollTop() { var docEl = document.documentElement; return (window.pageYOffset || docEl.scrollTop) - (docEl.clientTop || 0); }// configure jwplayer instance playerInstance.setup({ autostart: true, playlist: 'https://cdn.jwplayer.com/v2/playlists/mYdavspX', primary: 'html5', setFullscreen: true, width: '100%' });// when jwplayer instance is ready playerInstance.on('ready', function() { var config = playerInstance.getConfig(); var utils = playerInstance.utils; // get height of player element var playerHeight = config.containerHeight; // flag determining whether close has been clicked var closed = true; // CHANGED // flag determing whether player is playing var playing = false; // ADDED // eventhandler for when close button is being pressed document.getElementsByClassName('icon-close')[0].addEventListener('click', () => { closed = true; onScrollViewHandler(); }); playerInstance.on('play', function() { closed = false; playing = true; // ADDED }).on('pause', function () { playing = false; // ADDED }).on('adPlay', function() { closed = false; // ADDED playing = true; // ADDED }).on('adPause', function() { playing = false; // ADDED });// get player element position from top of document var playerOffsetTop = getElementOffsetTop(playerContainerEl);// set player container to match height of actual video element playerContainerEl.style.height = playerHeight + 'px';// below we handle window scroll event without killing performance function onScrollViewHandler() { var minimized = getScrollTop() >= playerOffsetTop;if (closed && minimized) { minimized = false; jwplayer().pause(); playing = false; // ADDED } else if (!minimized && !playing) { closed = true; // ADDED } utils.toggleClass(playerContainerEl, 'player-minimize', minimized); // update the player's size so the controls are adjusted playerInstance.resize(); }// namespace for whether or not we are waiting for setTimeout() to finish var isScrollTimeout = false;// window onscroll event handler window.onscroll = function() { // skip if we're waiting on a scroll update timeout to finish if (isScrollTimeout) return; // flag that a new timeout will begin isScrollTimeout = true; // otherwise, call scroll event view handler onScrollViewHandler(); // set new timeout setTimeout(function() { // reset timeout flag to false (no longer waiting) isScrollTimeout = false; }, 80); };});

In an interview posted by PCGamesN, some new details on how some aspects of Call of Duty: Modern Warfare’s campaign will work has been discussed.

One of the big ideas behind this year’s game is its realism and how it takes the world we live in and puts you into reality in many situations ‘ripped from the headlines.’ One of the aspects of this is in regards to collateral damage in the campaign. In previous games, if you killed too many civilians, the mission was failed.

In Modern Warfare, that does not happen as easily. This campaign will not stop the mission if civilians are killed. The characters around you will react to what you have done and change the overall mood of what’s happening, but the mission will not fail. Instead, at the end of the mission, it gives you a collateral damage rank, ranked from A through F for what you did in the mission.

Yeah, there are. Call of Duty has always had ‘friendly fire will not be tolerated’ warnings when you kill too many civilians. Obviously, we’re trying to make things much more realistic, much more visceral this time, so that if you kill a single civilian you feel bad, because you might see a woman go for a gun but instead she’s going to grab her baby. We want you to feel bad, and the characters around you will respond and react to what you did, too.

On top of this, we also have a collateral damage score that we give you after each mission, a rank A through to F score. We talk about ‘unknowns’ – an NPC is an unknown until they prove whether they’re a threat or not. If you kill no innocents and you evaluate all unknowns correctly then you’ll end up with a rank A, and if you kill more than three you will get a rank F. There are rewards associated with being as accurate with your threat assessment as possible.

Beyond this, a big thing about Call of Duty: Modern Warfare’s campaign is how real and emotional it is and can be at some parts. We described some of our feelings about it in our impression posts here, but Infinity Ward — in this interview — stated that some playtesters who have played the game have actually ‘cried’ at some aspects of it.

Joel Emslie, Studio Art Director: It’s because of the weight and gravity we have now, I’ve never seen narrative in a Modern Warfare game like this narrative. The stories [of the original trilogy] were great for that time period, but I think the gaming community expects more now, it has to be more sophisticated, and from what I’ve seen it’s incredible, there’s a really great story driving this thing.

Jacob Minkoff, Campaign Director: We’ve had multiple playtesters cry.

JE: I thought it was a joke when they told me, and then I watched a video of it. It was a real human moment, and now I’m like, ‘I worked on a game that made someone cry.’

JM: To be making people feel emotions that deeply – we’re doing it.

SOURCE: PCGamesN


comments below