Jump to content
  • Advertisement

Butabah

Member
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Butabah

  • Rank
    Member
  1. I have made a 2D OpenGL engine. It does 2D stuff. Renders 2D objects of any size (albeit square), collision detection, rendering text, texture using, UI capabilities (click events, key events, a UI bar with buttons) I've made this, and it looks like I've done nothing. It's 2000~ lines of C++ code, and it feels like nothing. What could I do to snazz it up? Any suggestions? These objects are fully movable, rotatable, scalable. I have a manager managing all the updating, rendering, and input. I wrote a math library too of vectors and matrix math. The design of the code is pure OO, making it easy to implement new objects, UI buttons, and etc. Like I said, I don't want to give up on it and move to XNA or something else, because I've worked on this since July... I just look at it and my mind goes blank P.S. I'm a programmer, not a Graphic Artist, so my textures are very laughable, but I'm trying!
  2. Cool! This really helped, thanks!
  3. What would be the best way to go about handling dynamic lights within GLSL? By dynamic I mean lights that can fade away and come in at any time, the user creates them as they wish. I was thinking about dynamically making shaders, but that sounds waaay too over the top for something like this.
  4. How are you drawing your stuff anyway? Blitting, OpenGL, DirectX, some existing engine? The obvious question would be: what makes you think that everything needs to be drawn using the same "camera"? [/quote] Using OpenGL with my own Camera (float[16]) class. I guess I never thought of it that way. I have a uniform buffer object that I update to do most of the matrix work such as camera to clip and camera to world matrices. I guess the obvious choice would be to not have the UI on the same camera system as the other objects. Thanks!
  5. So, let's pretend I have a UI with a health bar in the top left corner in a 2D game. If I were to move the camera, the UI itself stays in the same position it was earlier. Should I tell the UI to move with the camera or is there a way I can keep it statically in the same spot?
  6. Butabah

    Starting a custom physics engine.

    Thanks for all your feedback! It's been really useful!
  7. Thanks for your input! I'll be doing some research and see which methods suit my needs the best, right now the iteration works, but I'm afraid of memory drops once there's alot of items on screen.
  8. Hi there, I've been taking my time Game Programming, jumping here and there. A topic I haven't dealt with is physics. What's a good starting point for physics? Any good reference material? Examples with OpenGL would be awesome, but I'm already asking a lot. I know I could google this all, but you guys are always so insightful.
  9. I have squares just littered around my screen, and would like to be able to use my mouse to click on a certain one. My plan was to iterate through a list of all currently visible objects (done in C++) and match the X and Y coordinates (can't click on one behind another) Does anyone have a better way that they do this, or point me in the direction of some reading that I may do?
  10. Butabah

    Best openGL resource

    Avoid deprecated functionality. One thing that will make everything easier is if you try and create a framework as you move along, i.e. I created an object with hard code, Then I created code to make the object for me, Now I can have hundreds of objects on screen. I created a shader\program object with hard code, Then I created code to do all the compiling, linking, for me. Now it's much easier for me to make shaders. Just START SLOW, Don't move on until you understand something.
  11. Hmm, you're right, let me try that out. Hey man, you were right! that fixed it!
  12. Hey guys, I have an issue with my shader, where I am able to translate in the X, Y axis, but not in the Z. Here is my shader: #version 330 layout(location = 0) in vec3 vVerts; layout(location = 2) in vec2 vTex; uniform mat4 modelviewMatrix; uniform mat4 projectionMatrix; uniform vec3 worldCoords; smooth out vec2 vTexCoords; void main() { mat4 modelviewProjectionMatrix = projectionMatrix * modelviewMatrix; vec4 posVector = vec4(vVerts, 1.0); posVector += vec4(worldCoords, 1.0); vec4 pos = modelviewProjectionMatrix * posVector; vTexCoords = vTex; gl_Position = pos; } Obviously with worldCoords it should be able to update the Z axis, but it simply doesn't move at all. Any ideas?
  13. Butabah

    Unusual FreeGlut error

    What is the purpose of main_window = glutCreateWindow("Hello"); I ran your code in VS2010 with no errors. Here is my code: #include <gl\freeglut.h> #pragma comment(lib, "freeglut.lib") void Reshape(int w, int h) { } void Display() { } int main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitWindowSize(1024, 768); glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_STENCIL|GLUT_DEPTH); glutCreateWindow("Hello"); glutDisplayFunc( Display ); glutReshapeFunc( Reshape ); glutMainLoop(); return EXIT_SUCCESS; } The pragma directive simply links the library.
  14. Okay cool, thank you very much!
  15. Hi there, I'm working on some rotations and translations, and would like to know, is the OpenGL matrix structure m[0] m[1] m[2] m[3] or m[0] m[2] m[1] m[3]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!