• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

jeff8j

Members
  • Content count

    285
  • Joined

  • Last visited

Community Reputation

787 Good

About jeff8j

  • Rank
    Member
  1. Thank you guys   I was having the hardest time figuring out why the newer shaders with in and outs wasnt working at all then I found a few lines I missed that I didnt think were important GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); Once I got that and set the uvcoordinates I got it working better but my coordinates are off shown in picture How do I get the correct coordinates?
  2. It seems like I need something like this glBegin(GL_QUADS); glTexCoord2f(0, 0);glVertex2f(0, 0); glTexCoord2f(1, 0);glVertex2f(100, 0); glTexCoord2f(1, 1);glVertex2f(100, 100); glTexCoord2f(0, 1);glVertex2f(0, 100); glEnd(); but not fixed pipeline
  3. I am having a problem understanding how  gl_TexCoord[0] gets set I think that tutorial uses a newer shader type than what I have been using gl_TexCoord[0] is in both the vertex and the frag shaders but no where am I setting it and that tutorial doesnt seem to set it I am sending uv coordinates now but I think I am just sending them blindly   I create the uv array then send it like this // 2nd attribute buffer : UVs glEnableVertexAttribArray(1); glBindBuffer(GL_ARRAY_BUFFER, uvbuffer); glVertexAttribPointer( 1, // attribute. No particular reason for 1, but must match the layout in the shader. 2, // size : U+V => 2 GL_FLOAT, // type GL_FALSE, // normalized? 0, // stride (void*)0 // array buffer offset ); but nowhere do I see how to set something useful like gl_TexCoord[0]
  4. @MarkS yea I didnt know where those things like gl_MultiTexCoord0, gl_TexCoord[0], gl_Position came from and that apparently the issue I need to send them somehow which I am trying to figure out how to do   @giordi Yea it looks like it works the same way as shader toy but for the desktop so its regular opengl not es/webgl My current "program" is just a splash screen then after that I will venture into showing a single texture that will update via webkit and go from there I am handling everything myself x11 opengl in c not glut no glew nothing else my buffer is just a rectangle static const GLfloat g_vertex_buffer_data[] = { -0.5f, -0.5f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.5f, 0.5f, 0.0f }; I am reading this tutorial and trying to figure out the uv coordinates now http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/
  5. Your assuming a bit too much lol This is my first shader program my only otheer opengl experience has been 1.5 fixed function and even that was limited experience   I was following this tutorial http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/   got it working got a shader working with colors and took my shader from shader maker and must have jumped some steps I figured since I am not using a texture I didnt need all that   I will look into the textured tutorial and learn some more and see about uv coordinates
  6. My vertex shader has gl_position gl_Position    = gl_ModelViewProjectionMatrix * gl_Vertex; Is that the same thing I am looking for can I use it instead of texture coordinates?
  7. I dont have a texture so I guess I'm not that must be what im missing what would I use to upload the coordinates?
  8. I set a position because its different on gles so I have a if gles do this else do what its doing now   I have changed it to not include that but it doesnt change the output :( // fragment shader void main(){ // Calculate distance to center float d = distance(gl_TexCoord[0].xy, vec2(0.5, 0.5)); vec3 color = vec3(0.0,0.0,0.0); color += d; gl_FragColor = vec4(color, 1.0); } Its still the same uniform grey
  9. I created this simpler frag shader to help visualize and narrow down the issue // fragment shader vec4 position = gl_TexCoord[0]; void main(){ // Calculate distance to center float d = distance(position.xy, vec2(0.5, 0.5)); vec3 color = vec3(0.0,0.0,0.0); color += d; gl_FragColor = vec4(color, 1.0); } Heres how shader maker looks versus my program the shader maker one is the circle  
  10. I created a shader in shader maker it works great when I go to add it into my program it wasnt working and I believe to have narrowed it down to the position is not being set I use this to set my position vec4 position = gl_TexCoord[0]; and I just copied shader makers vertex // simple vertex shader void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; gl_FrontColor = gl_Color; gl_TexCoord[0] = gl_MultiTexCoord0; } I can manually set the gl_FragColor and that works just fine the rectangles color will change I dont know if there is something that I have to enable or initialize for gl_Texcoord does someone know what I am missing or doing wrong? I am using c on linux glx window gl 3.3 Thanks
  11. Thats nice still doesnt make it useful does it?
  12. I do leave all my posts this one on the other hand was not post worthy I posted late at night without thinking clearly There is no solution other than me thinking clearly I only confused myself when writing it so im sure it will confuse others I was hoping it would die but got put back up
  13. Do not bring up old issues that I posted without enough thought its rude. I would gladly delete if there were an option but I cannot find it
  14. Can someone help me make lines pointing out from the center like this shader as a fragment shader https://www.shadertoy.com/view/lslGzr I would like to make them spin but getting them would be a great step   I am trying to think of a way to do this but I have just started and need some help I would think I can get the angle from the center for each fragment if its a certain angle make it a color how can I determine the angle from the center?
  15. bittorrent sync allows me to use my drive so im not limited to space anything less than 5gb is too small 10gb may do theres alot of different versions for testing that take alot of extra space the game sits at around 350mb though   bittorrent sync seems to be ideal perfect fit for what were doing