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

learn more… | top users | synonyms

52
votes
8answers
6k views

2D graphics - why use spritesheets?

I have seen many examples of how to render sprites from a spritesheet but I havent grasped why it is the most common way of dealing with sprites in 2d games. I have started out with 2d sprite ...
48
votes
5answers
8k views

Which image format is more memory-efficient: PNG, JPEG, or GIF?

Which image format is more efficient to save memory? PNG, JPEG, or GIF?
23
votes
4answers
13k views

Vertex Array Object (OpenGL)

I've just started out with OpenGL I still haven't really understood what Vertex Array Objects are and how they can be employed. If Vertex Buffer Object are used to store vertex data (such as their ...
21
votes
3answers
6k views

How can I make this style of 2D “glowing” graphics?

I'm comfortable with the basics of building a 2d sprite based game in XNA, where all my objects are simply .png images that I move around. What things do I need to learn next to be able to develop a ...
20
votes
2answers
4k views

How do I create a wide-angle / fisheye lens with HLSL?

What are the concepts that need to be implemented in order to achieve the effect of a wide angle lens of varying extremities? Pseudocode and specific explanation referring to the various stages of ...
16
votes
5answers
3k views

Given a RGB color x, how to find the most contrasting color y? [duplicate]

Possible Duplicate: Making a symbol appear on any colour I have to mark a certain item in a way that will make it stick-out in the background. I need it to be surrounded with the color that ...
15
votes
4answers
1k views

Effects for Programmers [closed]

Does anyone have any good resources for creating special effects, aimed at programmers. I'm not specifically interested in particle effects, but broader things like: Fullscreen effects, blur, depth ...
14
votes
4answers
1k views

What should every graphics programmer write

I've seen this question on SO, but here i want it to focus on GFX. So in your opinion what applications/features should every aspiring GFX programmer write/change to get better? Community wiki since ...
14
votes
2answers
3k views

Creating an electricity/lighting/tesla coil effect in a 2D XNA game?

I'd like to create beams of electricity between two points very similar to this video: http://www.youtube.com/watch?v=eMJ8-56L3Lc. The effect is so dynamic, with varying lengths and pseudo-random ...
14
votes
5answers
3k views

boolean operations on meshes

given a set of vertices and triangles for each mesh. Does anyone know of an algorithm, or a place to start looking( I tried google first but haven't found a good place to get started) to perform ...
14
votes
3answers
564 views

Solids as high viscocity Liquids

A friend of mine and I were discussing different idea for allow materials in a world to be destroyed in a very piecemeal fashion and he proposed the idea of representing solids as very viscious ...
14
votes
1answer
3k views

How do I render a mirror or other reflective surfaces?

I just wondered how to create a mirror within a 3D game? My suggestion is/was to trace rays, hitting the "mirror" object then drawing a picture of a second cam onto the "mirror" object which is ...
14
votes
4answers
3k views

Real time shadow casting in a 2D isometric game

I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on this page and here is the result (light is located at the ...
13
votes
2answers
15k views

OpenGL ES 2.0: Setting up 2D Projection

This article describes in general, how to draw sharp OpenGL 2D graphics, using fixed function pipeline. http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL Because OpenGL ES 2.0 has some ES 1.x ...
13
votes
1answer
642 views

Is there any performance benefit to sharing shaders between programs?

OpenGL allows you to share the same shader between multiple programs. Aside from saving small amounts of memory and a shader handle, are there any GPU-side performance benefits to doing this?
12
votes
5answers
7k views

Complete Math Library for use in OpenGL ES 2.0 Game? [closed]

Are you aware of a complete (or almost complete) cross platform math library for use in OpenGL ES 2.0 games? The library should contain: Matrix2x2, Matrix 3x3, Matrix4x4 classes Quaternions ...
12
votes
3answers
679 views

Recreating this flat-shaded look

I'll keep it short. How does one achieve the effect depicted in the image below? Is it feasible to do in realtime? It looks deceptively simple, but it probably isn't. Are there any keywords I can ...
11
votes
4answers
2k views

Fixed-Function vs Shaders: Which for beginner?

I'm currently going to college for computer science. Although I do plan on utilizing an existing engine at some point to create a small game, my aim right now is towards learning the fundamentals: ...
11
votes
7answers
3k views

Fastest way to create a simple particle effect

I am looking to the fastest way to create really simple particle effect that will be spammed like hell on the game... Basically, my game looks like a vectrex game, made mostly of lines... I want to ...
11
votes
3answers
2k views

How do I scale down pixel art?

There are plenty of algorithms to scale up pixel art. (I prefer hqx, personally.) But are there any notable algorithms to scale it down? My game is designed to run at a resolution of 1280x720, but if ...
10
votes
1answer
987 views

What are the advantages of tangent space normals over object space normals?

What are the advantages of normals in tangent space to normals in object space for calculation of bump mapping?
10
votes
6answers
6k views

LOD in modern games [closed]

I'm currently working on my master's thesis about LOD and mesh simplification, and I've been reading many academic papers and articles about the subject. However, I can't find enough information about ...
10
votes
3answers
767 views

Drawing particles as a smooth blob

I'm new to game/graphics development and I'm playing around with particles (in 2D). I want to draw particles close to each other as a blob, just as liquid/water. I do not want to draw big circles ...
10
votes
1answer
208 views

Good resources for learning about graphics hardware

I'm looking for some good learning resources for graphics hardware (and associated low level software). Basically I want to learn more about what goes on underneath the opengl/direcx API layers in ...
9
votes
4answers
3k views

Debugging Shader Code?

I'm writing a game engine, and when I use a perspective camera I get a black screen. I am not going to ask exactly why this is because there would be a lot of code to share and, frankly, I think ...
8
votes
1answer
663 views

How can I implement a renderer that can draw many kinds of primitives?

This is somewhat linked to a question I previously asked concerning the drawing of indexed primitives. My problem was that I was only drawing one cube when I wanted to draw many. I was told that the ...
8
votes
3answers
1k views

What's a good data structure solution for a scene manager in XNA?

I'm playing with XNA for a game project of myself, I had previous exposure to OpenGL and worked a bit with Ogre, so I'm trying to get the same concepts working on XNA. Specifically I'm trying to add ...
8
votes
1answer
801 views

Any good books on graphics programming?

I've been looking for a book that takes a bottom-up approach for graphics programming. So something that starts with 2d filtering, maybe moving into normal mapping, then ambient occlusion, etc. I ask ...
8
votes
3answers
643 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:
8
votes
1answer
610 views

How to represent cliff faces in terrain?

I'm trying to figure out the best way to programmatically represent terrain in my game. I've been considering using a heightmap (or grid of evenly spaced vertices) to represent the surface of the ...
7
votes
4answers
2k views

How are 3D models created in video games?

As the title says, how are 3D models in games designed and displayed? Is it all-code? Drawn on paper, then on a 3D graphics software, then... what? Of course, game programmers won't define every ...
7
votes
5answers
1k views

Drawing very large slowly rotating planets

I'd like to draw very large (~500 px) graphics of planets slowly rotating. These graphics are meant to impress. What's the best way of doing this? I don't have experience with any particular 3D ...
7
votes
1answer
1k views

Most efficient way to draw vertex with OpenGL

I am writing an OpenGL 3D game. There will be tons of triangles for terrain and objects in use. I am studying from the OpenGL official guide and the first presented method is to call a function ...
7
votes
2answers
291 views

What techniques could I use to give players the ability to control certain features, e.g. fatness?

I'm working on a tool for character customization (e.g. starting from a base model, a player can control his fatness), so I'm looking for ideas, techniques or other regarding this topic. After some ...
7
votes
2answers
1k views

Sorting objects before rendering

I'm trying to implement a scene graph and in all the articles i've come across there is talk about object sorting. So you'd sort your objects by "material" for example. Now untill i sat down and ...
6
votes
6answers
663 views

Are there important cases when one needs to know how to program sort algorithms in game programming?

Well I already read a little about sorting algorithms on wikipedia, the subject seems vast, especially when dealing with some cases where some algos are faster than others. That might need some quick ...
6
votes
3answers
2k views

Draw contour around object in Opengl

I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
6
votes
2answers
521 views

What will AMD Fusion or likewise hybrid CPU/GPU will change for the 3D programmer ? Are they potentially faster?

Since the early days of accelerated graphics, programmers were obligated to use hardware-supported libraries like directX or OpenGL. If we wanted to explain someone what happened by introducing a ...
6
votes
2answers
3k views

OpenGL ES 2.0: Using VBOs?

OpenGL VBOs (vertex buffer objects) have been developed to improve performance of OpenGL (OpenGL ES 2.0 in my case). The logic is that with the help of VBOs, the data does not need to be copied from ...
6
votes
2answers
613 views

OpenGL or OpenGL ES

What should I learn? OpenGL 4.1 or OpenGL ES 2.0? I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about ...
6
votes
2answers
3k views

How to Export Flash Animation Data

I'd love for my partner, the artist, to be able to animate using flash movieclips and timelines. Then I, the programmer, would like to read the raw Flash info and re-program it into my engine of ...
6
votes
2answers
918 views

OpenGL 2 and back vs 3 and forward: What are the key differences for 2D graphics?

OpenGL contexts before and after OpenGL 3.0 are rather different. So far I've really only worked with buffers on either side anyway, I do know the most notable difference is lack of Immediate Mode. ...
6
votes
3answers
2k views

How to do this sprite motion blur?

Some of you may know fraxy... Basically, I was watching this video: http://www.youtube.com/watch?v=uL7zWdDCtOE And there are some times where some sprites spin really fast (4:00 mark for example), ...
6
votes
1answer
1k views

Rendering 2D grass

My current project, using Java and OpenGL, has a fairly standard overhead tilemap in the style of the Zelda games. I'd really like to add "real" grass to the grass tiles so that there are actually ...
6
votes
1answer
495 views

Achieving certain rendering styles

I'm trying to assess the difficulty of creating a rendering style that is more like the game Okami and the Quake mods (as shown on this page...search for 'okami','quake npr'). Here's a better page ...
6
votes
1answer
671 views

Decal implementation

I had issues finding information about decals, so maybe this question will help others. The implementation is for a forward renderer. Could somebody confirm if i got decal implementation right? You ...
5
votes
6answers
2k views

Algorithm for drawing asteroids from, er… Asteroids game?

What would the algorithm be for generating/drawing the asteroid shapes from the original Asteroids game? Is it even an algorithm? Or would they be hard coded shapes? Here is a screenshot to jog your ...
5
votes
3answers
4k views

Should I use Game Engines to learn to make 3D games? [closed]

HI i am a software engineering student in his second-last year. I am proficient with C,C++,C# and java programming languages, and being a student of engineering I have studied calculus, vectors etc ...
5
votes
4answers
813 views

How to make game appear to run faster?

I believe I read somewhere that there is a technique which will make games appear more smooth than they are. I believe it is some visual trick, but I don't remember which one. (It is be something like ...
5
votes
2answers
5k views

How many textures can usually I bind at once?

I'm developing a game engine, and it's only going to work on modern (Shader model 4+) hardware. I figure that, by the time I'm done with it, that won't be such an unreasonable requirement. My ...