Hot answers tagged

3

SurvivalMachine nailed one of your problems (you can see that the texture is repeated twice). Your other problem (the texture is a big blob instead of a crosshair) is because you don't use transparency : some of the completely transparent pixels of your texture have a green color value (that's a common sight with optimized PNGs). Just enable blending with ...


3

There are two factors that I've found to be the simplest and easiest way to decide which of the available GPUs will be the most powerful for a game: Device Type (Discrete vs. Integrated vs. Other) Graphics Memory Now of course for gaming more VRAM doesn't always mean better performance (a 980 Ti [6GB] usually outperforms a Titan X [12GB] in games) but in ...


2

Think of your question in terms of tessellation with your sphere formed by rings. If you have a tessellation factor of 5, you will have a top cap, 2 middle sections, and a bottom cap. The bottom two tessellation ring being the 25% bottom cap and the top tessellation two rings the 25% top cap. The center is therefore one ring at the equator with a set of ...


2

When you have a 2d game with pixel-art graphics, having a fixed resolution makes many things far easier. You know exactly how much fits on the screen without having to stretch your graphics (and automatic resizing by non-integer factors really hurts the image quality on pixel art). There are games where the camera-space doesn't have much effect on the ...


2

Maybe there's more problems, but at least this looks incorrect: gl.glTexCoord2f(2f, 1.0f); Your texture is repeated horizontally 2 times because its wrap mode is repeat and the coordinates you set are over 1 (in this case 2f). To fix this, replace 2f with 1f: gl.glTexCoord2f(1f, 1.0f);


2

If I'm reading this right, the answer seems to be right there in the continuation of that line: metallic - the metallic-ness (0 = dielectric, 1 = metallic). This is a linear blend between two different models. The metallic model has no diffuse component and also has a tinted incident specular, equal to the base color. (With the implication that ...


1

A background really isn't anything but an image that you draw before anything else. The easiest way to do that is to import the image using image.load() and save it to the variable background. After doing that create a new variable background_y that saves the position of where the background is. After that, go to your update function and decrement ...


1

OK, assuming that render() gets called once per frame you are telling your game to create 5 new enemies every frame in the tile class. This would lead to creating hundreds of enemies per second. I think you only want to use that for loop once when initialising the game. That way you will only make 5 (until you decide to make more). look in the ...


1

In the case of a masked texture, only fully opaque pixels should update the depth buffer. Any pixel that is partially or completely transparent should not update the depth buffer. Updating the depth buffer will prevent pixels of greater depth from being drawn/calculated, and pixels with alpha need to blend with pixels in the background. If no blending occurs,...


1

The cubemaps used in Image Based Lighting should only contribute to the scene once because they don't represent light coming from a single light source like your point lights for example, but from every direction from the environment. This means that they should be added to the light buffer only once, which you could do in either of these passes: In the ...



Only top voted, non community-wiki answers of a minimum length are eligible