Programming related to the visual representation of information on computer screens.
50
votes
8answers
5k 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 ...
41
votes
6answers
4k 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?
21
votes
3answers
4k 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 ...
18
votes
2answers
2k 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 ...
17
votes
4answers
9k 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 ...
15
votes
5answers
1k 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
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
918 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
3answers
527 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 ...
13
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 ...
13
votes
5answers
2k 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 ...
13
votes
1answer
2k 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 ...
13
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
1answer
539 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
2answers
11k 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 ...
11
votes
5answers
5k views
Complete Math Library for use in OpenGL ES 2.0 Game?
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
...
11
votes
7answers
2k 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 ...
10
votes
3answers
883 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
3answers
639 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 ...
9
votes
6answers
4k views
LOD in modern games
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 ...
9
votes
1answer
178 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 ...
8
votes
4answers
1k 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: ...
8
votes
1answer
431 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?
8
votes
1answer
564 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
375 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 ...
8
votes
4answers
2k 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 ...
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
2answers
252 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 ...
6
votes
6answers
620 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
2answers
2k 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
483 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
582 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
1k 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
658 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 ...
6
votes
1answer
907 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
459 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
447 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
1k 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
4answers
775 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
3answers
1k 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 ...
5
votes
4answers
1k views
The recommended road map to be a good graphics/game engine programmer
I am a computer science student and I am developing with C/C++ and Python and I want to begin learning graphics tools to start developing with game engines, especially the Blender Game Engine. So what ...
5
votes
2answers
672 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.
...
5
votes
2answers
2k 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 ...
5
votes
1answer
392 views
Difference between the terms Material & Effect
I'm making an effect system right now (I think, because it may be a material system... or both!). The effects system follows the common (e.g. COLLADA, DirectX) effect framework abstraction of Effects ...
5
votes
2answers
715 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 ...
4
votes
3answers
3k views
Should I use Game Engines to learn to make 3D games?
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 ...
4
votes
2answers
627 views
Question about separating game core engine from game graphics engine
Suppose I have a SquareObject class, which implements IDrawable, an interface which contains the method void Draw(). I want to separate drawing logic itself from the game core engine.
My main idea ...
4
votes
4answers
697 views
How would I go about implementing a globe-like “ballish” map?
I am new to 3D development and I have this idea of having the game world like our globe is - a ball. So, there would be no corners in the map and the game is top-down RTS game. I would like the camera ...
4
votes
1answer
760 views
What is instancing, and how can I update my graphics code to do it?
This question directly follows on from this one:
How can I implement a renderer that can draw many kinds of primitives?
I have a small amount of drawing code structured in the following way:
A mesh ...
