Programming related to the visual representation of information on computer screens.

learn more… | top users | synonyms

3
votes
2answers
99 views

How can I make a “paint” effect?

I am wondering how one could implement "paint" in games. As a reference, I have two games I am specifically thinking about which are Super Mario Sunshine with its "goo" and Splatoon. I'm wondering ...
0
votes
0answers
40 views

Correction for chromatic aberration

Chromatic aberration distorts the colour of the image in a VR headset. How do I render a virtual scene using C++ that uses inverse distortion to correct the distortion when viewed in VR?
0
votes
0answers
31 views

(Unity) Recalculating Normals on MeshRenderer disable light effect

So, I'm trying to change the Vertices, Triangles, UV's and colors from a Mesh on Unity, so I just calculate these properties and I set it to the mesh like this: mesh.Clear(); mesh.vertices = ...
0
votes
0answers
35 views

Vertices not colored when using custom vertexDeclaration monogame

I am trying to color the vertices of a Mesh Part object which has been loaded from a .obj model. But since the obj model's vertex declaration does not have color info defined and only normal and ...
0
votes
1answer
14 views

how are the vertex properties of meshpart decided based on model format in xna

Exactly how the question says , how does the vertex properties like vertex stride and the data stored in the mesh part decided based on the format of a model and how would i determine that and then ...
6
votes
1answer
215 views

What are screen space derivatives and when would I use them?

I see the ddx and ddy glsl functions and the hlsl equivalents come up in shader code every now and then. I'm currently using them to do bump mapping without a tangent or bitangent but I basically copy-...
29
votes
3answers
14k views

Why don't most major game engines use gifs for animated textures?

What is better to use Animation Sheets or Gifs? One advantage Gifs have over Animation Sheets is that you don't have to think about frames going too fast or too slow because of your code and updating ...
1
vote
1answer
61 views

How do I perform an Iris Wipe transition, using C++ in SDL 2.0?

How do I perform image masking/clipping using an arbitrary shape like a circle? I want to do an Iris Wipe transition, similar to in the movies. By Iris transition, I mean the circle transition ...
0
votes
2answers
132 views

What's the difference between Gameplay Programming and Graphic Programming?

I know the answers are obvious, someone told me this: Graphics Programming: DirextX, OpenGL, etc. Gameplay Programming: Bringing everything together. From design, music, levels, etc. But may you ...
0
votes
0answers
20 views

Drawing a 2D polygon filled with a rotated texture

As I have seen, System.Drawing.Graphics in C# has proven to be really bad at handling larger images. So, if I want to draw a both tiled and rotated image, I will have to draw each tile directly to the ...
1
vote
3answers
248 views

What is the lowest-level way of making graphics from scratch?

I am currently trying to get into game development and trying to understand 3D games. I would like to learn to code from scratch without any 3D engines. Some of the things I found was libraries like ...
1
vote
2answers
233 views

Can my game be 8-bit even though it has hi-res text? [closed]

My game has 8-bit sounds, 8-bit graphics, 8-bit everything. Except one thing: the level selection screen. It has small text and therefore must be hi-res to be readable. What should I do? Edit: The ...
0
votes
1answer
93 views

How does code translate to graphics? [closed]

I know this is kind of a basic question, but I'm trying to create my own game from scratch and really don't understand this. How does the code of a videogame program certain pixels to be certain ...
0
votes
2answers
65 views

DX11 Clear Issue, Irregular pattern

So far I've put together a bare minimum of a DirectX 11 application. All it does is clear the window to a random shade of red. const FLOAT clearColor[4] = { rand() / (float) RAND_MAX, 0.0F, 0.0F, 1....
0
votes
0answers
94 views

LibGDX - scaling for different devices

i have a question about scaling. I have two ideas how to solve problem with different screen sizes, aspect ratio etc. Make viewport that depends on device screen size and scale textures in draw ...
4
votes
2answers
280 views

Separating game logic and rendering

I know this has been asked before but I would like some things cleared up. I understand that game logic and rendering should be separated but my problem is more or less how? For instance, should the ...
1
vote
0answers
37 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 ...
20
votes
7answers
6k views

What advantage do OpenGL, SFML and SDL have over software rendering?

I started watching the Handmade Hero stream, where Casey Muratori creates a game engine without using frameworks or such. Yesterday I got to the part where he showed how an image is drawn onto the ...
2
votes
1answer
106 views

Anti-Aliasing Problem

So, I was annoyed by how the HUD for my GameState was very pixel-ated and I wanted to change that through the use of anti-aliasing. However, it works with a small exception: It adds all these lines ...
0
votes
1answer
115 views

How does one structure a Player GUI

I am using Java and the Slick2D library. I've been testing around with ways to develop a Player Graphical User Interface (GUI) (to show armour, items picked up, weapons equipped, etc). The one ...
0
votes
1answer
87 views

In game engine, how to get the vertices buffers of different vertex formats for render from the mesh file properly?

I'm a fresher on engine programming. I have a question of how we can get the vertices buffers of vertex formats from the mesh file. For example, in OBJ file or FBX file, we save the positions, ...
1
vote
0answers
202 views

How can I create a wind visual effect like Ori?

I'm working on a mobile game in Cocos2D. The game mechanic is very similar to Ori and the Blind Forest's parachute (Kuro's feather) mechanic. I want to be able to render a visual effect for wind ...
0
votes
0answers
42 views

Tilemap not rendering properly

I'm making a single-screen scrolling platformer (OpenGL/SDL) and I've made a tilemap out of a 2D array, pre-sized with variables of the LEVEL_HEIGHT and LEVEL_WIDTH. Each element in this 2D array ...
0
votes
1answer
84 views

What technique should I use to implement the following type of “diggable” terrain?

I'm trying to replicate a certain game mechanic from the game Diggles. This game takes place in a vertical cross-section of the earth and allows the player to dig tunnels and caves into the ...
1
vote
1answer
222 views

Is it possible (and practical) to dynamically create normal maps from graphics in Pixi.js?

I am building a tile game using Pixi.js. The game features dynamically-generated terrain and a day/night cycle. I'd like to use a normal map to give the sense of sloping hills or mountains. Luckily ...
1
vote
0answers
131 views

Which programming language should I start with in game dev? [closed]

I am a front end web developer and I've always been interested in building games. I work primarily with HTML, CSS, PHP, and JavaScript on a daily basis, so I'm not new to coding. I would like to ...
0
votes
0answers
29 views

How to assemble a skinned character model from component meshes?

I need to enable visible item swapping on 3d characters for my game, but for the life of me I can't work out how to do this in Three.js. Any information about how bones and skinning work in general or ...
1
vote
1answer
66 views

Skeletal Animation - Caching global bone transforms

Very often I see skeletal animation implemented like this: On Init - store bone's local transforms and inverse bind pose On Update - traverse the skeleton tree, multiplying local transforms on the ...
0
votes
1answer
97 views

Enlarge screen space Texture by set pixel amount

I have a texture shown over the screen using screen space UV's. The Texture is 495x,596x, Screen size is 888,500, but can change. The Texture has a Tile of (3.469775f,1.392644f) to correct for ...
1
vote
2answers
141 views

How to make a “Camera” in Java

I need some help with getting my camera to work in java for a game that I am making. The problem is is that I've never made a camera in a game before and this is my first time trying to make one in a ...
1
vote
0answers
421 views

Dual Contouring - what is it and how to use it?

I'm having trouble understanding Dual Contouring yet and I need some explanations from someone who has first hand experience. I searched all I could before writing this question. I've already read: ...
0
votes
0answers
25 views

Timed Line Drawing

I'm trying to program a remake of the classic Missile Command Atari game from scratch, but I've run into a problem. So I have a function that can draw a line from one point to another. I figured I ...
4
votes
1answer
149 views

How do I use openGL shader to reproduce this Photoshop implementation?

Here are my Photoshop actions: step1 - convert the current image into gray step2 - use the default parameters, as showed in the screenshot step3 - use the 『Hue/Saturation』 to convert the grey image ...
2
votes
2answers
293 views

Why did 320x240 become the famous Mode X, and not 400x300? [closed]

Mode X was hack invented during the good old days of DOS gaming, offering 320x240 resolution, 256 colors, square pixels, and page flipping. VGA adapters had 256 KB of memory. 320 * 240 = 76800 bytes ...
0
votes
2answers
163 views

Progress bar for EXP in javascript [closed]

So I am making an incremental game with Javascript, HTML5, and CSS, I need to have this bar that is esentialy a div with a p element in it "fill up" as the player earns more points through sacrifice. ...
1
vote
1answer
179 views

Java Slick2d lighting using Raycasting

I am trying to make a top down view game in java using the Slick2d library, for lighting I wanted to do something like this : http://www.redblobgames.com/articles/visibility/. I was wondering if there ...
2
votes
1answer
121 views

How can I recover polygons and normal maps from compiled games through emulation of D3D or OpenGL?

I am trying to generate labeled training data for an artificial visual cortex to learn on. I'm looking for a tool that will, instead of rendering the scene at each pixel just give me the pre-rendered ...
1
vote
1answer
33 views

What happenes if you leave out buffers for the inputassembler that the vertex shader expects?

I'm working through my first attempt at a "graphics engine" (I use the term loosely as I'm not aiming for much more than something that will display a few meshes). I want to leave my classes as ...
2
votes
1answer
382 views

Unity + Oculus Rift - Setting field of view or rendering part of display

I need to render a small portion of the display to a texture. I found a script to simulate a scissor rect by modifying the projection matrix - Unity 5 doesn't seem to provide any out-of-the-box ...
3
votes
2answers
418 views

How to achieve a dynamic soft see-through hole effect in a wall with shaders?

I'm looking for a way to create a dynamic soft see-through hole effect for room walls. I know a few ways how to do it (for example multitexturing with second layer being the hole mask in screenspace), ...
2
votes
0answers
69 views

uv tiling and offset for uvs not min-max 0-1

For the purpose of the question, a unit = 1 meter. So, I have a triangle strip that is 4x8 meters (for argument's sake; it is procedurally generated by player). I also have a texture which is ...
31
votes
1answer
4k views

Why is shadow mapping the standard?

Though I am a programmer by trade, I have barely touched game development at all. I've had this question for some time, and now that I'm looking into game development I thought it would be a good time ...
-1
votes
2answers
116 views

What's the difference between the representation of a line and that of a line segment?

What is the difference between a line and a line segment from the implementation point of view? To me, line segment means: class LineSegment2d { Point2d start, end; public: ...... } This ...
1
vote
0answers
152 views

OpenGL textureGather and DirectX gather

These functions sample multiple RGBA pixels but return only a single component. OpenGL: https://www.opengl.org/sdk/docs/man/html/textureGather.xhtml DirectX: https://msdn.microsoft.com/en-us/library/...
1
vote
0answers
73 views

Texture artifacts depending on texture size

I get some strange artifacting with textures depending on their size. I run OpenGL 3.3 with an GTX 580 so it should definitely support non power of two textures. I've narrowed down the problem ...
7
votes
1answer
266 views

What is a lobe, in reference to lighting and graphics

I sometimes see references to lobes when talking about lighting, especially with specular lighting, but also with spherical harmonics which doesn't do specular. Can anyone explain what exactly a lobe ...
0
votes
1answer
284 views

How to calculate spherical harmonic coefficients for indirect diffuse?

After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
3
votes
0answers
135 views

Animations in games

I wonder how skeletal animations in games work. I am Writing my own Graphics Engine for "fun", and I have come across several problems with animations. Here is how I do it right now: 1: Load the ...
1
vote
1answer
1k views

Rescale pixel art scenery before rendering in SDL2

I looked at this page that mentions the SDL2_gfx library for rescaling SDL_Surfaces without the image getting blurry: SDL zooming/upscaling without images becoming blurry? I wanted to know if it was ...
1
vote
0answers
23 views

Creating VR Headset Video

So I have a video stream of known resolution and I have a VR headset via HDMI at a known resolution. Is there an existing library to create the slight fisheye and side-by-side layout for these ...