A very generic term referring to visual part of a game. Try to avoid unrelevant usage and instead tag for specific graphics type (2D, 3D), API, framework or a library you are using, if possible.

learn more… | top users | synonyms

2
votes
1answer
1k views

glsl shader to allow color change of skydome ogre3d

I'm still very new to all this but learning a lot. I'm putting together an application using Ogre3d as the rendering engine. So far I've got it running, with a simple scene, a day/night cycle system ...
-1
votes
1answer
69 views

How to fill a canvas with triangles that are seemingly random?

Given a canvas say, 1000 X 1000 unit. I would like to fill the canvas with triangles. The triangles can be of any type right angle, equilateral...etc. To avoid big chunks of triangles lets say all ...
2
votes
1answer
36 views

How to make a moving background with PyGame?

I'd like to create a moving background in my Python game, with an image, that moves up until it reaches the end, then it goes back to its first position. I'm still in my learning process and this is ...
1
vote
0answers
24 views

Advice on mapping tiles to a height map/3D world

I've been attempting to think of a way to map tiles to a height map. Where a grid can be either layered or integrated into the world data. However, since I am not using voxels I could use some advice ...
5
votes
1answer
78 views

How to select the most powerful vkDevice?

I've been messing around with Vulkan recently. In all of my experiments, when I select a gpu/vkDevice, I always just take the first one vulkan provides. I've looked at the documentation for vkDevice, ...
2
votes
1answer
65 views

How to dispose in Newest Java/LibGDX ApplicationListener?

Am I new? yes What I'm wondering: How do you dispose of textures / spritebatches and the things you normally need to dispose of now? Why I'm asking: Because theirs no automatic dispose() function ...
1
vote
1answer
43 views

Disney BRDF - where is metallic factor input into BRDF?

Burley states about metallic parameter: "This is a linear blend between two different models. ..." What are the two models? I can't see this described in the Frostbite or the Unreal papers either. ...
0
votes
1answer
82 views

Problem with transparent textures in SFML

I have been told that this is kind of a common problem with transparent textures, but didn't get any further information on how to solve it. In my code, I'm trying to render this texture (a square ...
3
votes
1answer
536 views

How to draw a polygon with picture in libgdx?

I'm working around a simple rectangle game, It just split the rectangle in to a lot of polygon debris. I use Pixmap and Texture to draw the edges of each polygon. ... for (GraphEdge e: _edges) { ...
1
vote
2answers
51 views

OpenGL: Properly attach Texture

Problem: Been trying for hours to set a simple png of a cross hair as a texture (so I could later stick in the middle of the view like a normal cross hair), without luck. I'm coding in Java with ...
1
vote
1answer
87 views

Vertexquads are not being drawn in 2D space

I started teaching myself DirectX a short time ago and have come across a problem which I can't figure out by myself unfortunately. I'm trying to build my own font system, so I can draw strings in 2D ...
3
votes
1answer
101 views

How should I structure VBOs for my 2d world data?

My game is played on a fixed-size hex based arena, where each hex can be of a different type, and possibly contain some creatures/items/anything on it. When I started out, I got the advice to have a ...
3
votes
1answer
341 views

Cocos2d Sprite 3D position

When I set a position3D for a Sprite in cocos2dx, it render two times the same sprite, i took a screenshot: I set the position3D because i want to use the Z position the give an effect of distance, ...
1
vote
1answer
33 views

DrawString and Render graphics after custom time

I want to draw String after some second like "Boss is incoming",and after the string is disappeared i want to draw the Boss.I have the graphics and the string so my question is how to add timer for ...
1
vote
2answers
55 views

Draw bug is creating a lot of Enemies

I'm working on 2d java game and I have little issues what I can't resolve. My problem is when I want to create 5 enemies with for loop, random post is creating lot of Enemies, not 5. How can I resolve ...
17
votes
3answers
3k views

Bezier curve arc length

See also: same question on Math.SE How can I find the arclength of a Bezier curve? For example, a linear Bezier curve has the length: length = sqrt(pow(x[1] - x[0], 2) + pow(y[1] - y[0], 2)); But ...
4
votes
1answer
142 views

Why are most windowed games not resizeable?

I find it incredibly rare to find a game where the window can be resized, even if permitting it is a single click away in their game engine. For what reason is this done? Thoughts that come to mind ...
3
votes
1answer
108 views

Fixing the size?

My app isn't compatible with all screen sizes. When testing on a small size, my textview overlaps with my button. So, as suggested on the Android Documentation, and many stack overflow pages, I ...
10
votes
1answer
184 views

Draw the middle half of a sphere programmatically

I'm trying to create the middle half of a sphere. Basically to create a sphere, stack numbers and slice numbers are given, and there are two variables phi (for slices) and theta (for stacks) ...
0
votes
0answers
26 views

Unity resolution problem on mobile devices

I made a 3D game in unity for android devices, but its resolution differs a lot when I tried to run it on different devices. There were two resolutions I found, I'm attaching their images here. ...
1
vote
0answers
47 views

What tools do professionals use to create pixel art with animations? [closed]

I've been looking for the right tool for creating my own pixel art, but I've been having a few difficulties finding the right one. What I've tried so far: ProMotion NG - seems to have lots of ...
0
votes
1answer
54 views

Setting resizable to false in LibGDX

I have a small working game prototype. I want to do something like LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); cfg.resizable = false; But I get "...
28
votes
5answers
50k views

What is ambient occlusion?

I've heard about ambient occlusion and it looks nice, but what exactly is it?
1
vote
1answer
72 views

SDL2 linux fullscreen issue at lower-than-desktop resolution

Having a problem trying to get proper fullscreen in linux. I'm using 1440x900 on desktop. When i set SDL to use 1280x720 as fullscreen, it does change screen resolution. But if i drag the mouse ...
3
votes
1answer
247 views

Do SpriteBuilder's Smart Sprite Sheet need to be loaded to memory?

When I create an Smart Sprite Sheet Folder using SpriteBuilder and publish it, must I load that SpriteSheet into memory "FrameCache" with code or does SpriteBuilder do this automatically (so I just ...
1
vote
2answers
133 views

Java 2D Game - Screen Images Flashing

I'm currently working on a 2D Java Game. When I start the game everything works fine. A constant Update- and Framerate. When I'm using normal graphics methods to draw shapes nothing happens. But as ...
0
votes
1answer
29 views

How to draw Alpha Masked fragments' depth to depth buffer?

I feel like an absolute idiot for asking this. But how exactly do safely draw the depth of a fragment featuring a Masked ( Alpha 1) texture on it's surface? So far I've literally been doing a depth ...
1
vote
0answers
41 views

Having problems drawing entities the right way in my isometric game

I am making an isometric game where I have moving Entities's not bound to tiles, and a 3d ArrayList map which is populated by Block's which forms a tower-like structure in the middle of the map. My ...
15
votes
3answers
15k views

Moving an object in a circular path

I want to move one object (dot) in a circular path. How should I change the X and Y coordinates to accomplish this?
1
vote
1answer
40 views

PBR How to correcly use standard lighting and IBL

I'm creating a physically based renderer but I am a bit confused on how to put together standard lighting with IBL, since like I'm doing now I think it's wrong. Right now, for each light, I evaluate ...
1
vote
0answers
18 views

Multi Sampling in Rendering Pipeline?

I am trying to understand : How does multi-sampling rasterization effects pixel shader output? In a nutshell (i am skipping some steps to stay on point of question): Vertex data is fetched. Vertex ...
1
vote
1answer
125 views

Integrating specular, diffuse reflection and refraction

I am implementing an MLT bidirectional path tracer. I have a problem integrating diffuse, specular reflection and refraction. 1) The first problem is diffuse and specular reflection. Diffuse ...
-1
votes
0answers
11 views

Rectangle Flash fix and draw string

Now I have a code which works :) But now I have 2 bugs and I don't know how to fix it. I am drawing a rectangle (that works) but it's flashing and I dont know why. The second bug is i did a score int ...
4
votes
1answer
112 views

How to buffer an image in winbgim?

So ive always had problems with buffers and never used them before. I read up on the topic online but since winbgim is so old i couldnt find any definite answers to the topic. So im gonna ask them ...
1
vote
0answers
22 views

Concerns about using a 3D tileset grid

I'm thinking of implementing a 3D tile system for my engine, and tie it to it's world streaming system as well. As in, using it for it's terrain for an open world in an engine that theoretically can ...
3
votes
1answer
59 views

OpenGL cube map is always black

When creating and rendering a skybox with a cube map texture, the skybox is black. Here is how I create the cube map texture: GLuint loadCubemap(std::vector<std::string> faces) { GLuint ...
0
votes
0answers
39 views

Is it possible to create a third party program that simplifies game graphics?

As someone familiar with the lifestyle of low-end gaming, I am interested in finding some sort of third-party solution that could enable individuals with lower-end hardware to play more graphics ...
-1
votes
2answers
124 views

What is the most efficient way to render water?

Would I create the water surface mesh in C++, and control the movement/animation in the CPU, and afterward apply any shaders (reflect/refraction/caustics/etc..). Or should I only create the mesh in C++...
7
votes
3answers
1k views

Generate levels in real-time with the Procedural CityEngine

Has anyone used the Procedural CityEngine to generate levels in real-time? It seems to get used in production or pre-production due to its sizable overhead, but has anyone tweaked it to run in real-...
0
votes
0answers
41 views

How do I make an object not appear grey regardless of distance?

My moon texture is on a plane 500m away and I would like to know if there is a way to keep displaying the texture: As opposed to it turning grey as pictured here: regardless of the distance it is ...
1
vote
1answer
317 views

Sprites are rendered as black rectangles in android 4.0.x only

I have some problems rendering sprites correctly on a LG optimus vu (android version 4.0) with libgdx. Basically sprites are black rectangles, while other images that i declare as Texture are correct. ...
1
vote
1answer
97 views

Android OpenGL Sprite Component Pattern

Ok so I have a 2D OpenGL project that was originally a class assignment, and now I am using it to experiment with and to broaden my knowledge. Originally, I had been using the Normalized Devices ...
5
votes
1answer
322 views

Are there multiple valid definitions for what translate, rotate and scale do?

Are there multiple valid definitions for what translate, rotate and scale do to the 4x4 matrix? I bring up this question, because I have a simple webgl program that draws a square and does a few ...
7
votes
2answers
173 views

What are these odd distortions on far away textures?

I'm currently writing a simple voxel engine just to get some practice in, and I'm coming across some odd issues. In order to generate terrain, I create a mesh and then assign UV coordinates on a ...
0
votes
1answer
43 views

LIBGDX: Translate grid drawn with ShapeRenderer with an OrthographicCamera

I am trying to draw a grid for my "world" that may or may not extend beyond the screen. What I would like to do right now is draw the entire world (which is relatively small) and then use the ...
0
votes
0answers
40 views

How to create words as objects in Unity?

I am working on a game that has words as obstacles, i.e. the player needs to climb over and around them. There will be hundreds of words in the game therefore I need a way to automate the placement. I ...
1
vote
1answer
27 views

DirectX 11 Vertex Shader Fragmentation

I was wondering how my vertex shader is causing my cube to be render weirdly? I am using the Visual Studio graphics tool and see that my input assembler is correctly receiving the cube and I can only ...
28
votes
4answers
22k views

How can a programmer learn to draw 2D assets? [closed]

Are there any good tutorials for someone who wants to create 2D graphical game assets? Drawing classes for absolute beginners, preferably teaching skills that can be as relevant as possible to games - ...
-3
votes
3answers
6k views

Starting to make 2D games in C++ [closed]

I'm fairly experienced with C and C#, but I've only ever created console/windows applications. I'm also experienced with AS3 and I've made some flash games. I want to make proper 2D games in C++, but ...
15
votes
5answers
5k views

Where do I start if I want to independently learn game graphic design? [closed]

I want to learn how to create custom graphics, not use freely available resources. But I have been looking around for articles or tutorials on how to start with 2D game design in general, and I can't ...