• 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

570 Good

About leagal4ever

  • Rank
  1. Hello, im having problem with drawing 2D very basic shapes. Questions: 1. How draw Quad just with lines, corner should be sharp. 2. Quad with border and filled color, each with different color. 3. Triangle is again not sharp also bottom line seems to be thiner. 4. Position in code is set to 100, 100 (quad) in window position does not match(y only?) its more like on half so on 300px. Edit: just saw problem there are many width and height to set, forgot one I have added code since its very small and have many mistakes inside. Thanks for help. #include "sdl.h" #include "sdl_opengl.h" #include <iostream> #include <SDL_image.h> #include <string> #include <vector> using std::vector; using std::cout; using std::endl; vector < vector <int> >  points_vec; int WIDTH = 800; int HEIGHT = 600; int main(int argc, char* argv[]) {     //initialize SDL     SDL_Init(SDL_INIT_EVERYTHING);     //Set OpenGL memory usage     SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8);     SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8);     SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8);     SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8);     SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, 32);     SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);     SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);     //Caption of the window     SDL_WM_SetCaption("Our first game", NULL);     //Size of the window     SDL_SetVideoMode(WIDTH, HEIGHT, 32, SDL_OPENGL);     //Specific the clear color     glClearColor(1, 1, 1, 1);// RED, GREEN, BLUE, ALPHA     //What portion of the screen we will display     glViewport(0, 0, WIDTH, HEIGHT);     //Shader model - use this     glShadeModel(GL_SMOOTH);     //2D rendering     glMatrixMode(GL_PROJECTION | GL_MODELVIEW);     //"Save it"     glLoadIdentity();     // Disable depth test     glDisable(GL_DEPTH_TEST);     glEnable(GL_BLEND);     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);     //Handle the main loop     bool isRunning = true;     //For handling with event     SDL_Event event;     // Main game loop     while(isRunning)     {         // events         while( SDL_PollEvent(&event) )         {             if( event.type == SDL_QUIT )             {                 isRunning = false;             }         }         //RENDERING to the screen         glClear(GL_COLOR_BUFFER_BIT);         glPushMatrix();             glOrtho(0, WIDTH, HEIGHT, 0, -1, 1);//Set the matrix             glColor4ub(0, 0, 0, 255);                  glLineWidth(10);             // quad with lines             glBegin(GL_LINES);                 glVertex2d(100, 100);                 glVertex2d(200, 100);                 glVertex2d(200, 100);                 glVertex2d(200, 200);                 glVertex2d(200, 200);                 glVertex2d(100, 200);                 glVertex2d(100, 200);                 glVertex2d(100, 100);                        glEnd();                // triangle with lines             glBegin(GL_LINES);                 glVertex2d(300, 300);                 glVertex2d(400, 400);                 glVertex2d(400, 400);                 glVertex2d(200, 400);                 glVertex2d(200, 400);                 glVertex2d(300, 300);                      glEnd();         glPopMatrix();         SDL_GL_SwapBuffers();     }     SDL_Quit();     return 0; }.h>
  2. Hello, im changing handling how keys are pressed, basicly im having number keys 1-9 and for each key same function is run. case SDLK_1: KeyPress(1); break; case SDLK_2: KeyPress(2); break;   it should look like this std::vector < SDLKey > numberEnum_vec; numberEnum_vec.push_back( SDLK_1 ); numberEnum_vec.push_back( SDLK_2 ); for(int i=0; i<numberEnum_vec.size(); i++) { case numberEnum_vec[i+1]: break; } Thanks for answer!
  3. No, Init(); is in constructor it run only once, Render(); , Update(); and Fps(); run every frame
  4. Yeah its tearning. // init SDL_Init(SDL_INIT_EVERYTHING); screen = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE | SDL_DOUBLEBUF); // render SDL_FillRect(screen, NULL, 0); for(int i=0; i<box_vec.size(); i++) { SDL_FillRect(screen, &box_vec[i]->rect, box_vec[i]->color); // problem rect } SDL_Flip(screen); // update box_vec[i]->rect.x += box_vec[i]->xvel; box_vec[i]->rect.y += box_vec[i]->yvel;
  5. Hello i have problem with distorted rectangle, this problem also happen with images. [URL=http://imageshack.us/photo/my-images/580/examplejy.png/][IMG]http://img580.imageshack.us/img580/1310/examplejy.png[/IMG][/URL] Distorted rectangle looks like this. Its happen only for moment every few seconds, it become obvious while moving ,any idea how to fix it?
  6. Oh souch silly error as told: [quote name='Lauris Kaplinski' timestamp='1349294053' post='4986513']Just create the proper directory structure, add all relevant .dll and data files and pack it into zip archive.[/quote] I had no idea proper foler is Release folder there were no images i just copy SDL files. SDL_Surface* tmp; tmp = IMG_Load©; SDL_DisplayFormatAlpha(tmp);// problem Problem is there was no image loaded. if (tmp != NULL) SDL_DisplayFormatAlpha(tmp); Now i avoid problem just in case something is not loaded Thans for all help
  7. [url="http://imageshack.us/photo/my-images/337/error2ep.png/"][img]http://imageshack.us/a/img337/6391/error2ep.png[/img][/url] I dont have any warnings have also minimize notices, when click on any Call Stack line only Dissembly lines are changed i dont see my code. [url="http://imageshack.us/photo/my-images/88/error4l.png/"][img]http://imageshack.us/a/img88/3126/error4l.png[/img][/url] When run from Release folder i get window as normal with error message =( I have made copy of project folder take most out and i have build it in Release so must be problem in my code.
  8. Continue is just throwing same window with same message, break give me disassembly tab. [URL=http://imageshack.us/photo/my-images/829/error1ii.png/][IMG]http://imageshack.us/a/img829/4109/error1ii.png[/IMG][/URL] So somewhere in my code is mistake to somehow use NULL pointer, why there is no problem with debug mode?
  9. So to use on another computer it only need to be build as release, insert used files and thats it? I have error when building, any idea how to solve it? Error is only when release, debug is working fine. [URL=http://imageshack.us/photo/my-images/222/errorpo.png/][IMG]http://imageshack.us/a/img222/9387/errorpo.png[/IMG][/URL] @Lauris Kaplinski - didnt know that, sure at start would be better and easier to make simple zip, however for future im interested in installer @JustABeginner - no not polish
  10. Hello i have make part of my game which i want show to other people. I would like to make installer to make game available on every computer with all files included. I am using c++, sdl, sdl_ttf and build game in visual studio 2010 with debug option. Thanks fo help.
  11. Hello im making my first game editor and have some questions. 1 I have some const and functions like message which is simple cout, collision, openimage, xypos.. which should be accesable in every class and main, how? 2 I make twodimensional vector for storing grid, also im making option for increasing grid if needed. Increasing at botom and right was easy, however up is making problems (its changing camera going up). Im not sure if this code is ok, code should add add vector at first place at 0. [CODE] if(map[0][0]){// insert UP vector<int> tmpvec; tmpvec.assign(map[0].size(), 0); map.insert(map.begin(), tmpvec); } [/CODE] 3 I have two class menu and map, menu have options like new game, save, load . Map class is saving, loading game. Where is better to put onclick logic? Thanks for answers