Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 months ago.
Improve this question
Whenever I make 2D games, I always attach the sprites under a canvas so that I can set the canvas scaling to be "Scale With Screen Size" so that the sprites scale with the users aspect ratio. Is this bad practice and is there a better way of doing this?
Unity shouldn't render objects off-screen, so in realtime there shouldn't be any problems with graphics performance.
From personal experience, making a game responsive for different resolutions is complicated and many techniques can be used to get good results.
I also use the "Scale with screen size" setting, and over the years I haven't found anything that works better.
The only detail I can give you for general performance: if you have many elements, perhaps animated, and they are not seen at all by the camera, I recommend that you disable them from scripts, because graphically they should not give problems, but they are always things that the engine calculates frame by frame and therefore if they are not essential it is better to disable them.
Related
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 1 year ago.
Improve this question
So the problem is the following:
I have been trying to make this flying simulator little phone game, the problem is i cant make the shadow change with a smooth transition...
That White squared is a cloud, and the objective is to have the shadow change size while in the cloud...
I don´t really know were to start, i tried shaders, but i´m not that good with that...
Thx :))
If you are not into shaders, I would look into Masks. Masks basically limit a sprite to only draw within it's boundaries.
In this example, you could have a mask on the cloud. To make it work, have the "nearer" shadow be always drawn, but only in the mask's boundaries (In this case - the cloud) Relevant Youtube Tutorial
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 5 years ago.
Improve this question
I am new to SceneKit, currently playing around with it.
I use 4 boxes as walls to create a sort of skybox.
Each box/wall has its own starfield texture. Currently this causes the borders of the walls to be visible. I want to remove these line borders, any idea?
That is a result of the texture you use, which is not seamless. Look into "seamless tileable" textures. A much better approach to do what you are trying to do however, is to use the scene’s background property as explained in the answer of this question: How to set contents of scenekit background to cube map
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
I have an app idea so mocked it up in C# because that's my most fluent language. I now want to port this over to Swift if possible, how hard will it be to generate a grid of 6x6 blocks, each block needs to be separate from each other as I need to change they're properties and detect touches on them. This is the grid I've currently got running on Windows.
Thanks for any help.
There are a lot of different ways to approach this problem, so you need to provide more details. You could do it with a single custom UIView, drawing the current representation of your model in the drawRect method and it would also be able to handle all of the touch events since you can just calculate where the user did the touch in the same way that you calculated drawing the grid and coloring the squares.
But if you want to use SpriteKit, then this tutorial will show you all the details of doing a 2D array, using sprites, tiles, etc.
http://www.raywenderlich.com/75270/make-game-like-candy-crush-with-swift-tutorial-part-1
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
I'm implementing some piece of code in MATLAB to track left ventricle wall position in echocardiography images using a contour-based method. Unfortunately in some frames the contour evolves more than it is expected and in some regions the wall does not have good contrast.
Does anyone know a way to restrict contours from unexpected evolution from frame to frame saving both old frame's position and new one's shape?
Thank you all for helping.
Image segmentation is a hard problem. There is no general approach that works well in every situation. How are your contours being defined? Are you doing threshold-based segmentation, or using another approach? Have you tried transforming into a polar coordinate system in the centre of the LV? Have you tried quantifying some sort of 'least-squares' cost associated with moving the contour?
All I can suggest is look at how people solve similar problems. In my field (namely MRI), the best we have a) isn't really all that good, and b) is probably this open-source Matlab 'program' designed for cardiac segmentation called segment (see http://medviso.com/products/segment/features/cmr/). I suggest you look at how they do it, and see if you can adapt the method to work with the (much noisier, much harder to interpret) echo images.
Sorry I can't be more helpful!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am writing an app on iOS platform, I want a shadow effect behind my toolbar like this,
Currently I am using UIImageView for a start up, However I would like to know which one would be better choice? Using UIImageView or drawing a rectangle with gradient in it?
Thanks for any inout!
Is there going to be animated content overlapping your shadow? Because unless there is, I doubt it makes enough of a difference to matter. In which case, go with UIImageView, because it's easiest.
If there is going to be animated content, I would suspect you'll be able to wring slightly better performance out of drawing it yourself, but you're going to have to do some Core Graphics optimization (cache the drawn gradient, cache the CGGradient for redraws, etc.).
Beware premature optimization. BEWARE!