A very generic term referring to visual part of a game. Thus try to avoid unrelevant usage and instead tag for specific grapics type (2D, 3D), API, framework or a library you are using if possible.
0
votes
0answers
17 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 ...
3
votes
1answer
87 views
How can I use a Texture2D larger than 2048 x 2048?
I'm having issues working with a large image. I've read other threads on using images larger than a Texture2D supports, but found nothing that addresses my problem specifically with implementation ...
0
votes
1answer
76 views
When entities don't draw themselves, who actually does?
There are countless questions here about whether entities should draw themselves or not. The answer is almost universally no, there should be a renderer. And I do see a point in having a single place ...
3
votes
2answers
177 views
Is there any reason why there isn't a cross-platform implementation of DirectX?
Similar to how Mono can compile C# to various platforms, why isn't there an API that conforms to DirectX's specifications but can produce binaries for all platforms?
I understand that there is OpenGL ...
0
votes
0answers
17 views
Bounding Box in Monogame for mouse picking - Ray perspective
My mouse ray is screwing up precision. I don't really know how to fix it, maybe you guys can help.
problem :
(5.6mg gif)
https://www.dropbox.com/s/v0z67afso88hsd1/perspective_ray.gif
how i create ...
2
votes
1answer
94 views
How can I play an RTSP video stream in Unity3D?
I want to play an RTSP video stream on a Texture2D. The stream is coming from an IP camera and is encoded with H.264, MJPEG or MPEG4.
I know about VLC's libraries, ffmpeg, direct show, media ...
0
votes
0answers
19 views
Calculate parameters for orthographic matrix for directional shadow mapping
I am struggling with how I can fit my scene in an orthographic projection, based on what is visible by the camera.
All tutorials so far explain almost everything in perfect detail, and then for the ...
0
votes
0answers
26 views
Shadow Mapping: How to calculate Axis Aligned Bounding Box?
I am trying to implement Shadow Mapping, which is actually working with an AABB that always covers my entire scene, but (obviously) it gives very blocky graphics.
So I figured I need to calculate a ...
0
votes
1answer
22 views
How can I load a picture with alpha channel in JME?
This code loads a picture into the game:
Picture mypic= new Picture("mypic");
Texture2D tex = (Texture2D) assetManager.loadTexture("Textures/mypic.png");
...
1
vote
1answer
125 views
How can I create animated card graphics like in Hearthstone?
In the game Hearthstone, there are cards with animated images on them. A few examples:
http://www.hearthhead.com/card=281/argent-commander
http://www.hearthhead.com/card=469/blood-imp
The ...
2
votes
0answers
51 views
Surface shader with VertexLit causes black object
I wrote the simplest possible surface shader:
Shader "SimpleSurf" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags {"RenderType"="Opaque" }
...
0
votes
1answer
53 views
What image format supports transparency in Android?
I want to show an apple on screen but the image has a white background and it doesn't blend with the background of a tree.
Is there any image format in which only the red apple is displayed?
-1
votes
1answer
60 views
How do I detect how much of an object has been “cleaned” by the player?
I want to let the player wipe some dust off of a book, then start a short animation.
Here's what it looks like:
I'm using a clipping region on the "dusty" book bitmap image to progressively hide ...
1
vote
1answer
35 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 ...
1
vote
1answer
190 views
What is the difference between “offline” and “real time” rendering?
I have a rough idea: real-time is approximated with little or no global illumination.
But how would you otherwise explain why offline rending takes so much longer? You hear things like "number of ...
0
votes
0answers
39 views
“Blinking” graphical bug when rotating shadow matrix
So, we have implemented Krypton shadows into our code for our 2D game, and it's working beautifully. Only issue is that we're running into a bizarre graphical bug when rotating the shadows with the ...
0
votes
1answer
46 views
Proper Order to Process Each Frame
I'm writing a rudimentary 2D engine and am wondering what the proper or generally accepted order is for handling graphics, user input, sounds, and then other systems like physics.
If you have written ...
3
votes
1answer
104 views
How are Volumetric Effects made within games? (e.g. Smoke/Fire)
For computer generated volumetric elements such as clouds, fire, and whitewater.
How are they made? Is it just a simple collection of particles [put to pixels] taken from Physics equations or are the ...
1
vote
2answers
126 views
XNA blurring moving images
Why does XNA blurs the images which moves less than 1px in between two draws? It is quite annoying, because everything looks really blurry. Is there a way to disable it?
I have tried to set the ...
0
votes
1answer
100 views
Creating a gradient for a texture - Why is the color becoming dark on one side?
Updated
While debugging I looked at the lerp and it was calculating into a negative number at the start. So I added in checks for to low or high a value, and that seems to have fixed it. I'll answer ...
0
votes
1answer
69 views
How do you calculate a gradient value within multiple colors (gradient stops)
In WPF/Silverlight XAML you can have a brush with multiple gradient stops at different points along the color line.
I was able to replicate this behavior with two colors, a single color lerp, from ...
4
votes
1answer
517 views
Multiple resolutions for Unity 2D Android game
I'm trying to target as many devices as possible by providing a consistent experience. So I'm trying to make sure the aspect ratio fits each device it's played on.
After reading some forums and ...
0
votes
0answers
30 views
Rotating an object towards a point in OpenGL C++ [duplicate]
I calculate the matrix like this:
modelMatrix = glm::translate<float>(position) *
glm::rotate<float>(orientation.x, glm::vec3(1, 0, 0)) *
glm::rotate<float>(orientation.y, ...
0
votes
0answers
40 views
Checking if two lines are crossing [duplicate]
How can I check if two lines (created with function love.graphics.line) are crossing themselves? I may use this ability to create procedural maps via graphs.
2
votes
1answer
148 views
Day and Night Cycles and Skybox Blending
I've been working on adding day/night cycles and random weather to my project using the Neoaxis engine. The day/night cycles itself is pretty simple, just rotating the "sun" light around the Y axis.
...
2
votes
2answers
106 views
Isometric objects are mapped incorrect angle, but the map is fine. What am I missing?
I laid out my iso map and it's fine, but when I add my sprite actors they get located in the correct location but they are laying down not standing up. I tried rotating them on the z by 45 but then ...
3
votes
1answer
141 views
Planet sized quadtree terrain precision
I've been working on a planet sized and shaped terrain lib for a while (In webgl and Unity) and have a couple of working implementations [Quadtree cubesphere and circular clipmaps].
But both of them ...
6
votes
1answer
133 views
Reducing Spherical Harmonic Ringing
I've generated some 2nd order SH light-probes from cube-maps in my scene and I was surprised how strong artifacts are around the back of the dominant lights. I switched to a Lambert source plus ...
0
votes
1answer
121 views
How can I draw a single line using JMonkeyEngine?
I need draw a line between two boxes using their respective positions. I've created the Line object but I don't know how to show it in the scene.
Line ray = new Line(box1.getLocalTranslation(), ...
8
votes
3answers
492 views
How can I draw outlines around 3D models?
How can I draw outlines around 3D models? I'm referring to something like the effects in a recent Pokemon game, which appear to have a single-pixel outline around them:
0
votes
1answer
45 views
Apply a texture on a Box - jMonkeyEngine
How can i wrap a texture (for ex a 4x4 pixels) on a box (1x1x1) in such a way that the texture is repeated and not enlarged to cover all the surface.
Geometry box = new Geometry("Box", new ...
1
vote
1answer
116 views
How to enable geometry shader in OpenGL 4.2?
I'm porting my Direct3D-based engine to OpenGL and I'm using geometry shaders for rendering text characters (basically, textured billboards).
D3D version works fine, but in OpenGL mode it gives only ...
0
votes
1answer
85 views
Ground contact point for animated character sprites in an isometric game?
I'm working on an isometric game. I have the 3D pre-rendered sprites for directions per state (walking/running, etc.) per frame. Now I need to know where a particular character stands on the ground to ...
1
vote
1answer
43 views
Art asset creation workflow question: are there any neat ways to save your work and automatically export it to desired format?
To be specific: I have used GraphicsGale for pixel art sprites. The program saves its files in its own format (.gal, I believe), but the images in my game have to be .png. Saving it to .png loses ...
0
votes
1answer
124 views
Scaling background without scaling foreground in platformer?
I'm currently developing a platform game and I've run into a problem with scaling resolutions.
I want a different resolution of the game to still display the foreground unscaled (characters, tiles, ...
1
vote
0answers
84 views
Xna GraphicsDevice.IsFullScreen causes strange resolution stretching artifacts
Sorry for the non-descriptive title.
So I've been trying to implement fullscreen mode into my xna-game, and I've hit a couple of roadblocks.
My basic code setup for this functionality is the ...
4
votes
1answer
183 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 ...
2
votes
2answers
64 views
Would seam carving/liquid rescale make changing aspect ratios easier?
Seam carving is an algorithm which allows for resizing images without major distortions. I think it might help to make games which would adapt to different aspect ratios/resolutions much easier. But ...
1
vote
3answers
167 views
How do I efficiently use 16 bit texture coordinates?
While loading a model I get a big array of 32 bit floating point texture coordinates. I just upload that to a single vertex buffer (along with other data, such as vertices, normals, etc.) and use it ...
7
votes
2answers
278 views
How many rendering passes is “normal”?
I've been implementing John Chapman's method for SSAO (an excellent tutorial by the way), and I've completed it all minus the final part: blurring it. I believe this is what the entire process should ...
0
votes
1answer
77 views
Effectively drawing dynamic primitives
Okay, so this is where I am now. My game largely consists of textures drawn through spritebatch. Now I have to draw a dynamic number of triangles. I cannot say in advance where or how many I have to ...
3
votes
1answer
174 views
Solving banding with additive blended particles
I needed to implement particles for my 2D game, written in C++ with OpenGL for graphics, so I went ahead and created a nice geometry container to batch particles together and then implemented the ...
0
votes
1answer
33 views
Versions of GL and its device that don't display or required powers of 2 for the sprites
From this question aside from identifying possibilities of displaying images that don't needed to require powers of 2, what are the versions of GL that can actually display images even if don't needed ...
1
vote
1answer
53 views
Maya: Mystery Grey Wireframe?
I am starting out with Maya and just moved my object up to reveal a mystery grey wireframe which I can't work out what it is at all. It appears I can't select or interact with it at all.
I have been ...
0
votes
1answer
95 views
HLSL postprocessing for day to night (DTN)
I am trying to implement a "day-to-night"-filter (as commonly used in cinema) for a 2D game (XNA) by using a full screen HLSL pixel shader. The aim is to transform any bright and colorful image into a ...
3
votes
2answers
199 views
When is the Z coordinate normalized in GLSL?
I thought that whenever you transform an object to world space, then view space and finally screen space, the last matrix you apply(the projection matrix) normalizes the z values between 0 and 1.
...
1
vote
2answers
219 views
What is the depth that a pixel shader may output? Is it necessary to write Depth?
In DirectX11, what does the depth that a Pixel Shader can output mean? Does a pixel shader need to output a depth so that we "write" the depth? If not, why would we output it?
For any doubts, I'm ...
2
votes
1answer
80 views
How do I quantize an image into an arbitrary bitdepth with dithering?
In the games I make, sometimes I need to balance the quality of the images I show with the amount of memory they consume. This is especially true for smartphones and other devices with very tight ...
2
votes
1answer
166 views
How does the fragment shader get data from the vertex shader?
How can any interactions between these two shaders work? I mean the vertex shader sends a vertex's color to the fragment shader, but that's only one fragment, what about all the other ones between the ...
1
vote
1answer
114 views
What is the difference between shader uniforms and attributes in OpenGL?
I don't fully understand the differences between uniforms and attributes. To be honest, I probably haven't even used attributes.
Can uniforms change for each vertex? I mean to calculate the vertex's ...