Tagged Questions
-1
votes
1answer
50 views
Problem in animating polygon [closed]
Hi I am trying to move my black colored polygon downward. But As soon as I run my application my polygon gets invisible! I think My logic of move function is wrong. Can anyone help me out in figuring ...
4
votes
1answer
283 views
How to use modern OpenGL for 2D games?
I've found a plethora of "modern" OpenGL (3.0+) tutorials for 3D, but I have found next to nothing when looking for information on how to use it for 2D game development. How can I get started using ...
2
votes
2answers
227 views
OpenGL - drawElements 2D imposible z-sorting (textured)
I am creating a 2D program in OpenGL 3.2 Now to render what I do is have a VBO for each texture and add the elements of the objects that use that texture to this vbo. Now as you know the order you ...
2
votes
1answer
70 views
OpenGL - Z- Buffer translucency
So lately I wanted to use the Z buffer in opengl to order my 2D sprites in my program. Now I didn;t relaize that if you use the Z buffer then you cant blend these sprites. And some of these sprites ...
0
votes
0answers
99 views
How do I use Opengl in conjunction with SDL?
I've been using SDL for a while in simple 2D games but have been limited as to what I can do graphics wise. I would like to start using Opengl. Does anyone know of any web tutorials for using Opengl ...
3
votes
1answer
135 views
what's the best way of panning in a 2D scene
Up to know I have used this functions to create a 2D scene (for showing images) and to pan on it ( in fact it's a customization of the class COpenGLControl here in codeguru) :
void ...
1
vote
1answer
61 views
How to render models using a personalized projection matrix?
I'm creating a game with a great sprite demand. Out team is considering automatizing the sprite generation using 3D models. The problem is we have a very particular ortographic projection:
We have ...
2
votes
2answers
232 views
Split up a screen into regions
My task: I want to split up a screen into 3 regions for buffs-bar (with picked items), score-info and a game-map. It doesn't matter are regions intersect with each other or not.
For example: I have ...
19
votes
5answers
2k views
Is OpenGL appropriate for 2D games?
I have been teaching myself the OpenGL library for a while now, and want to start making a game. However, for an easier introduction, I want to start with something 2D, such as a top down ...
3
votes
1answer
239 views
The most efficent ways for drawing lines all day long with OpenGL
I'd like to put a computer screen that is running an OpenGL programs in a room. It has to run all day long (not in the night).
I'd like to draw lines that are slowly fading in the background. The ...
3
votes
2answers
545 views
How to ray cast 2D light in a block-based game
I want to use 2D lighting that can be blocked by in-game objects. My game is block-based and has a view from the top of the flat world. Now lets say I have a 10x10 world and I place a light at 1x1 and ...
1
vote
1answer
79 views
2D Platform character getting “unaligned” with the map
I'm trying to make a 2D Platform game and so far I can have my character moving around in a tiled map and collisions are working too. So far so good.
The problem I'm having is that the character can ...
0
votes
1answer
187 views
How can I implement infinite scrolling by scrolling the background's texture, not the quad? [duplicate]
I'm writing a 2D platformer game on Java with LWJGL. I'm doing this just for the sake of learning and not the result itself, so when I decided to implement scrolling I did it two ways I could invent ...
3
votes
2answers
230 views
OpenGL: Filtering/antialising textures in a 2D game
I'm working on a 2D game using OpenGL 1.5 that uses rather large textures. I'm seeing aliasing effects and am wondering how to tackle those.
I'm finding lots of material about antialiasing in 3D ...
3
votes
2answers
1k views
2D water shader similar to Limbo's effect
I'm wondering how I would go about creating a 2D water shader that is seen in this video http://www.youtube.com/watch?v=phChFfi4GOs
The water effect that limbo uses is pretty awesome. I'm not so ...
0
votes
0answers
248 views
Optimal OpenGL 2D Sprite Batching (Best Practice)
I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
2
votes
1answer
178 views
Proper way to maintain Vertex Buffer Objects
I've started learning WebGL, currently I'm building a 2D lighting system, but there is some confusion going on inside my head.
How the lighting works is based on this tutorial ...
3
votes
0answers
183 views
How do you display non-cutout transparent 2D textures with a depth buffer? (OpenGL)
I've been able to get my 2D renderer to display transparent cutout textures by testing the alpha of a fragment and discarding if it is less than 1 (or any fraction really). The problem is I want to ...
2
votes
2answers
449 views
Does my 2D OpenGL renderer need optimized?
I've started a game engine for learning purposes. I have successfully gotten an opengl renderer working and I can draw textures of varying sizes to the screen. The way I have done this is by creating ...
0
votes
2answers
511 views
Drawing Sprites in Android OpenGL efficiently?
I want to basically give myself some sprite drawing functions (making use of openGL) such as;
draw(Texture,x,y)
I want to do this using OpenGL-ES 2.0 on Android. Since the textures can be varying ...
0
votes
1answer
140 views
How to scale a texture in OpenGL/LWJGL?
How would I take a texture and render it to a specific size? The texture I'm rendering has a 1:1 ratio so I want to be able to render the whole image like if the window is wide then put black outlines ...
3
votes
1answer
218 views
How to do perspective projection “parallax” but without changing the scale or offset of objects?
Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
3
votes
1answer
331 views
Batching dynamic sprites in OpenGL
I'm trying to wrap my head around how batching is done in a 2D sprite-based game. My understanding is I'd get the vertices that represent each sprite I want to draw and stuff them all into a single ...
8
votes
1answer
538 views
Rendering 8 bit graphics
I have a strong programming background just not from game development. I only made some pong and snake in high school and I did some OpenGL in college.
I want to make my own game engine. Nothing ...
0
votes
1answer
101 views
enemy behavior with boundary to change direction
I'm doing space shooter kind of game, the logic is to reflect the enemy if it hits the boundary. With my logic, sometimes enemy behaves like flickering instead of changing the velocity. It's like ...
1
vote
2answers
679 views
Rotating 2D Object
Well I am trying to learn openGL and want to make a triangle move one unit (0.1) everytime I press one of the keyboard arrows. However i want the triangle to turn first pointing the direction where i ...
2
votes
1answer
353 views
Rendering multiple squares fast?
so I'm doing my first steps with openGL development on android and I'm kinda stuck at some serious performance issues...
What I'm trying to do is render a whole grid of single colored squares on to ...
10
votes
2answers
943 views
What should I worry about when changing OpenGL origin to upper left of screen?
For self education, I'm writing a 2D platformer engine in C++ using SDL / OpenGL. I initially began with pure SDL using the tutorials on sdltutorials.com and lazyfoo.net, but I'm now using SDL to ...
4
votes
2answers
1k views
OpenGL Lighting [duplicate]
I have a simple day and night cycle by at day disabling OpenGL lighting and at night enabling openGL Lighting. When I enable everything appears darker. My question is How would I make it that at a ...
2
votes
1answer
470 views
OpenGL: Move camera regardless of rotation
For a 2D board game I'd like to move and rotate an orthogonal camera in coordinates given in a reference system (window space), but simply can't get it to work.
The idea is that the user can drag the ...