How can i push boxes in a tunnel in spritekit? [closed] - ios7

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am working on a sprite-kit game. I can not walk in the tunnel. There are 5 boxes beside the tunnel and they are reside in a same line. The water in the tunnel is moving. Man can push the boxes in any direction. If the man wanted to escape the tunnel then he has to use this boxes. So he has to push this boxes and put those into the tunnel and also move the boxes with the speed of water in the tunnel. And also if one box pushed into the tunnel then Man can walk on the box and also he can push another box over the before placed box in the river and only the box portion on the tunnel will be collision free.
Hope this image explain what I am trying to achieve.

You just need to give the collisionBitMask of the boxes' physicsBody to the player category and vice versa with the player's physicsBody. That way the player and the boxes will collide and the player's movement will affect that of the boxes.

Related

How to remove a grey shadow from a JPEG? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
So in Photoshop we all know it's relatively easy to remove a white background from a .jpg image if the contrast is quite visible.
The problem with this image though is it has a grey shadow at the bottom of the image that is reliant on the white background, and therefore once it becomes transparent the shadow looks nasty.
What would be the best approach to remove this once the white background had been removed?
Thanks
https://s15.postimg.org/k2itasu7v/i_Stock_104502239_LARGE.jpg
You can use the Polygonal Lasso Tool. Manual removing.
Zoom to the shadow, select it with the Polygonal Lasso Tool > Right click and : Refine the edge + give it a bit of Feather and paint using the background color of the image.

How can I create a gif with more than 256 colors like this one? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Bonjour ! this is my first question !
I'm trying some UI animation in Photoshop, and I want to export in GIF file. But, GIF can't support more than 256 colors right ? So my quality is really low...
I think I found a gif with 32697 colors on this website, so is it possible ?...
http://phil.ipal.org/tc.html
If someone can explain me how it's work... I'm pretty lost.
Thanks for your answer.
True-color GIFs are a hack that uses the animated GIF format, puts a 256 color square in each frame, offset from all previous frames, makes each frame not disappear when the next frame appears, and loops only once. Few programs other than web browsers display such images correctly. The files are very large as a result and not suitable for web use.
Try PNG instead.

suggested algorithms to prevent "image persistence" on an LCD screen [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a Windows application which is displayed on kiosk machines and often runs continuously for weeks. The application is full screen. For reference imagine a screen divided into 2 panels, the left one uses about 30% and the right fills the rest. The left panel is completely static and informational, the right panel has video, image and text slides rotate, animations, etc.
No surprise, the left panel can cause some "image persistence" (screen burn) issues. I am looking for suggested remedies on how to prevent the image persistence issue. I'm only concerned about LCD not CRT.
Check out this "wiper" style solution, give it a few seconds you'll see the line wipe across.
http://tinyurl.com/lprt6tr
I like this idea, simple and just overlay it on top, it will work anywhere.
But, my question is how much pixel color change is actually required to avoid the image persistence? Do you need to make sure the pixel changes color at least once every minute, 10 minutes, hour? Does it need to rotate through a range of colors? Does it need to hold a state for a period of time?
Any insight about how often and what kind of color change is needed to actually prevent the problem is what I'm looking for.
Thanks.
Though I agree to Ken White, I guess a double wiper, with a white trail on the left and a black one on the right, would be sufficient, since it would do a hard set on the pixels.
As for the update frequency, you don't need to set it as frequent as you have in your fiddle. See this fiddle: http://jsfiddle.net/4w2K3/83/
Notice I added a border to the sweeper element and changed the way your code works a bit.
var $burnGuard = $('<div>').attr('id','burnGuard').css({
'background-color':'#000',
'width':'1px',
'height':$(document).height()+'px',
'position':'absolute',
'top':'0px',
'left':'0px',
'border-left':'solid 1px',
'border-color':'#FFF',
'display':'none'
}).appendTo('body');
var delay = 10000, scrollDelay = 1000;
function burnGuardAnimate()
{
$burnGuard.css({
'left':'0px'
}).show().animate({
'left':$(window).width()+'px'
},scrollDelay,function(){
$(this).hide();
});
setTimeout(burnGuardAnimate,delay);
}
setTimeout(burnGuardAnimate,delay);
Since screens are basically a giant array of coloured lights (simplified) organised in sets of 3 (red, green and blue), according to colour composition, white would activate all three lights at once, while black is no light at all. So, sweeping this strong-contrast line across the screen would help. Though the timing is much more dependant on the hardware you're using and how often your screen changes naturally (ads, user interaction, etc) I don't know much about the hardware part, but I would suggest from personal experience with CRT monitors, running this every 15 minutes or so, it also depends how long you plan to maintain the same screen for the kiosk.

Prevent illustrator layer color over text being edited [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
When editing text in Illustrator, the text being edited receives a solid overlay of the colour of the layer it belongs.
This is sometimes annoying, as I would like to see the text with its own colour and effects.
How can I prevent this behaviour?
This question is probably better suited for http://graphicdesign.stackexchange.com. In the future, I'd recommend searching for answers and posting questions there. However, I understand that doesn't help you as quickly, so to answer your current question...
Under the View menu, you'll want to play with Hide Edges and Hide Bounding Box, depending on exactly what you're trying to accomplish, you may have to turn off both.
Bounding Box
The Bounding Box refers to a single perimeter around the furthest boundary of all currently selected objects. This also contains the transform controls/handles that can be seen at each corner, and in the middle of each side of the perimeter box. This does not affect the highlighting of individual object edges within the selection.
Edges
The Edges refers to the edges of each object within the current selection. If any of the objects are text objects, it also refers to the underlining within the text box.
It's worth noting that if you only have one object selected, you'll notice very little difference unless you choose to hide both Edges and Bounding Box.

Stream video from HDMI in to NSView [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
What I am trying to accomplish is to take a video stream in through HDMI port on my macbook pro and display the video inside a NSView or window.
My end goal is to do something like this:
dvd player -- HDMI in --> computer -> apply overlay to video -- HDMI out --> tv
I am not sure if I will be able to stream the video out the other side so if I can simply get it to:
dvd player -- HDMI in --> computer -> apply overlay to video --> display in NSView or window
I will be satisfied. I have download the apple example code for applying an overlay to a quicktime video which is trivial, it is the input streaming part I am lost on. I'm guessing a way to say it would be that I need my computer act as a "pass through device"? for video. Not sure if this is a correct way to say that I'm trying to do. Any help or point in the right direction would be much appreciated!
Use AVFoundation which works exactly like it does on iOS.
Apple documentation will walk you through connecting AVCaptureDevice to the AVCaptureOutput (your AVPlayer hooked up to a UI).
https://developer.apple.com/library/mac/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40010188-CH1-SW3