• 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.


  • Content count

  • Joined

  • Last visited

Community Reputation

103 Neutral

About qrcrist

  • Rank
  1. [quote name='mv348' timestamp='1346534504' post='4975549'] I only had time for a quick glance, but it looks like you're assuming floats are 4 bytes, and unsigned chars are 1 byte. Seems reasonable but are you sure? [/quote] Yes, I checked. [quote name='mv348' timestamp='1346534504' post='4975549'] Also, the order in which you're calling bindBuffer and bufferData makes me uncomfortable. Maybe try: bindBuffer( ... buffer 1 parameters) bufferData( ... buffer 1 parameters) bindBuffer( ... buffer 2 parameters) bufferData( ... buffer 2 parameters) because I think you are supposed to bind a given buffer immediately before calling bufferData. I don't know for sure since they're element, and vertex_array buffers, but it might be worht a shot. [/quote] didnt' work :[ [quote name='mv348' timestamp='1346534504' post='4975549'] I also think its weird that you are creating the buffers, filling them, rendering them, and then deleting the buffers all in one function. I assume this is some sort of test code to get things working but that kind defeats the point of having VBOs. You should have one function initVBOs() that puts the data in the bufffers and then leaves them there. And your draw() function should just bind the buffers, setup the attribute pointers, and then call glDrawElements. I think it would make debugging a bit easier. [/quote] Yeah, i'm doing that in the project code. But the error seems heap corruption somewhere in the code above. The problem also goes away if I use shorts instead of chars for indices...? [quote name='Sponji' timestamp='1346535542' post='4975554'] Tested the code here on Linux and seems to run just fine. [/quote] Cool thanks
  2. I am working on an opengl project and I have been running into access violation errors. I managed to isolate the error into the code below, but I do not understand why it errors. Any help would be appreciated. BTW: I know that the genbuffers and deletebuffers are used in a dumb way. The code below just replicates the error. [CODE] #include <gl/glew.h> #include <gl/glut.h> void draw() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glEnableClientState(GL_VERTEX_ARRAY); float v[]={ 0,0,0, 1,1,1, 2,2,2, }; unsigned char i[]={ 0,1,2 }; unsigned int a; unsigned int b; glGenBuffers(1,&a); glGenBuffers(1,&b); glBindBuffer(GL_ARRAY_BUFFER,a); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,b); glBufferData(GL_ARRAY_BUFFER,36,v,GL_STATIC_DRAW); glBufferData(GL_ELEMENT_ARRAY_BUFFER,3,i,GL_STATIC_DRAW); glVertexPointer(3,GL_FLOAT,0,0); glDrawElements(GL_TRIANGLES,3,GL_UNSIGNED_BYTE,0); glDeleteBuffers(1,&a); glDeleteBuffers(1,&b); glBegin(GL_LINES); glVertex3f(0,0,0); glVertex3f(0,0,0); glEnd(); glutSwapBuffers(); } int window; int width,height; void changeSize(int w, int h) { if(h == 0) h = 1; double ratio = 1.0* w / h; glMatrixMode(GL_PROJECTION); glLoadIdentity(); glViewport(0, 0, w, h); gluPerspective(45,ratio,.01f,1000); glMatrixMode(GL_MODELVIEW); width = w; height = h; } void initWindow() { glEnable(GL_CULL_FACE); glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); glClearColor(0.1f,0.1f,0.1f,1); glEnableClientState(GL_VERTEX_ARRAY); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(800,600); window = glutCreateWindow("OpenGl"); glewInit(); initWindow(); glutIdleFunc(draw); glutDisplayFunc(draw); glutReshapeFunc(changeSize); glutMainLoop(); return 0; } [/CODE] Thanks, Qcrist