Tag Info

New answers tagged

3

I've been researching Sobel Filters for edge detection. I then use that information to identify bounding information so I can crop out borders programmatically. I also like OMGtechy's comment on converting to YCrCb or YUV and throwing out the Luma component. MSDN has an article on RGB to YUV Strangely enough, looks like it's HLSL (shader).


1

One possible approach is this: Convert to the YCrCb colour space and discard the Luma (Y) component. Compute a quality metric (see below), See if the quality metric is above a threshold (see below), Quality Metrics ASNR PSNR SSIM Threshold This will be largely trial and error; you'll just have to tweak it until you get the results you want. I'd ...


4

You could use polygons, or you could do a quick and dirty hack and just get a political map like this one: . Then, pick a unique color for each country and flood fill it in paint or photoshop. Then, you have a simple file that just has the mapping of countries/provinces to particular colors. Just something like this: # Country, #Unique RGB color ...


3

This seems to be a job for a procedural pixel shader. The advantages over using an image are: You don't need to provide huge bitmaps It is procedural, so it doesn't have to repeat a fixed image (it can vary infinitely) If you want a paralax effect, you can simulate thousands of planes, which would be impractical using images You can do very advance ...


5

Here is another idea which seems to be missing: In case of long distance backgrounds, like sky boxes, Parallax layers doesn't really feel good. Think of the stars for example, when walking on earth, or even better through out the night, all the stars move together, though we know they are hundreds or thoughts light year away from each other. The thing is ...


19

Use parallax scrolling. Have multiple background layers which scroll with different fractions of the speed of the main viewpoint. The lower the layer, the slower it scrolls. This isn't just a great way to provide an illusion of depth, it also makes the backgrounds look less repetitive because the objects on the different layers will appear in different ...


5

Layers work well. Here's some maths: Suppose you have a railway track that's been poorly made such that the like __ __ notice the gap between them. When the wheel rolls over them it makes a small notch (tiny notch). If the track length is l and the wheel has radius r then 2pi r is the circumfrence of the wheel, ration=l/(2pi r) if the ratio is say 10.25 ...


2

You can cut your big jpeg in a small segments and place them (visible part) , you don't even need store it in a memory all the time. And like a old games some 'tiles' can repeat. Thats was common solution for NES console, thats was even supported by hardware.


6

A way to build an infinite background for a 2D game is the following: Using a graphics editor software (like iDraw for Mac) create an image A that represents a portion of your background. This image should have a limited size. Duplicate A and mirror it on the Y axis, this is B Now paste (horizontally) togheter A and B, this is AB. Finally import the image ...



Top 50 recent answers are included