Programming related to the visual representation of information on computer screens.
0
votes
0answers
4 views
Second glBindBuffer() call crashes program on Draw call
Background/Issue: I'm pretty new to openGL and I'm trying to create a game engine (for learning purposes) and my program keeps crashing on my glDrawElements() call but only after trying to set ...
0
votes
2answers
112 views
Mining procedural caves in Unity
I am using cellular automata to randomly generate caves in Unity. Attached is a screenshot:
The black area represents walls. Walls can contain resources that can be mined.
Walls are made of blocks. ...
1
vote
1answer
33 views
What does the alpha channel on a back buffer do?
I see that e.g. in OpenGL it is possible to create a back buffer with an alpha channel (RGBA8888). What's the effect/advantage over having an RGB888 back buffer?
0
votes
1answer
39 views
Trying to subdivide an ISO tile
I have code that calculates where the user clicked inside an iso tile in an isometric map. The tile has a width of 1 unit and a height of 0.5 units. My code calculates where they touched inside the ...
2
votes
2answers
87 views
How to create your own GPU accelerated graphics API in C#?
I am creating 2D game engine in C# and I need some graphic API, so that user can draw sprites or convex vector shapes. I tried to use GDI+ for it. But I discovered that GDI+ is not GPU accelerated and ...
-1
votes
0answers
26 views
Is my quaternion-based free camera correct?
I'm going to be learning skeletal animation soon and thought it'd be easier to learn quaternions by modifying my camera class as the results can be seen quickly. There is a ton of information out ...
0
votes
1answer
35 views
Artifacts when trying to implement Cook-Torrance BRDF
I am trying to implement the Cook-Torrance BRDF within OpenGL, but I keep running into issues. The most obvious one are black patches and a bright spot at (0, 0). I checked my shader multiple times, ...
0
votes
0answers
27 views
How can I calculate a corrected oblique clipping matrix?
This problem has been eating at me for a little while now, and it's extremely frustrating.
Unity calculates culling matrices incorrectly. From the matrix, it seems to generate the actual occlusion ...
4
votes
1answer
187 views
How could I render a star like those in Elite Dangerous - coronas and some sort of 3D “plasma” effect on the surface?
Lets assume I wish to render a large, 3D, star object in a game engine using OpenGL. I can use a few different meshing methods: this includes mapping a cube to a sphere (with better subdivision to ...
0
votes
0answers
68 views
How to use Graphics.DrawProcedural to render a quad over a scene?
I want to learn this so I could do some screen space particles in Unity. This is meant as a sort of "hello world" shader.
my current script is:
using System.Collections;
using System.Collections....
4
votes
2answers
168 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
53 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
38 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
46 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
273 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
73 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
142 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
23 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
256 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
242 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
102 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
117 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
303 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
38 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 ...
21
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
121 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
121 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
112 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
224 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
44 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
85 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
256 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
133 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 ...
1
vote
1answer
79 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
104 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
146 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
481 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
152 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
328 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
201 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. ...
3
votes
1answer
203 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
421 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
468 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
72 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 ...