• 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

100 Neutral

About Darir

  • Rank
  1. Though the game I have in mind is turn-based, it isn't exactly what I would call asynchronous. I think what I need to know above all else is whether there is a way for two phones to communicate over wifi or 3g that I could take advantage of in my game. I've been looking at Game Kit, but it seems to be emphasizing "close proximity." Could this leverage 3g or would the players actually have to be near each other?
  2. Thanks for the feedback, but I was looking at something less like matchmaking and more like Words with Friends, wherein you play only with people that you already know. I was thinking of using facebook integration for that. What I really need to know is just how to send information directly from one phone to another, if that's possible. Sorry if I was unclear in my original post.
  3. I'm just starting into iOS development and was thinking of starting my first game. The first question that came to mind was whether or not I'd need a server for multiplayer. If I do, that might make things more difficult. Instead, I was hoping to find a way to use one device as a host and have the devices communicate directly. Is there a way to do this or do I [b]have[/b] to use a server for multiplayer?
  4. [color=#282828][font=helvetica, arial, sans-serif]I'm writing a program that needs to display a textured 32x32 square from a 32x32 section of a tilemap. I'm using sdl to divide up the tilesheet and then register each individual tile as a separate texture.The problem is that nothing renders at all. I've checked the code out a good number of times, so I was hoping someone else would spot the problem. Thanks.[/font][/color] [color=#282828][font=helvetica, arial, sans-serif][CODE] struct Texture { SDL_Surface* tex; GLuint texHandle; GLint colorNum; GLenum format; }; //class render holds a tilesheet and manages it class renderer { private: short width, height; SDL_Surface* tilesheet; std::vector<Texture*> tile;]//null will render to the screen SDL_Surface* destination; SDL_Surface* loadOptimized(std::string filename); bool divideTilesheet(); public: //regular loaded constructor renderer(std::string filename, SDL_Surface* udestination); //for creating a renderer with a procedurally generated tilesheet renderer(SDL_Surface* utilesheet, SDL_Surface* udestination); //tilex and tiley are both zero-based, so the upper-left tile would be (0, 0) void render(int tilex, int tiley, int locx, int locy); [color=#282828][font=helvetica, arial, sans-serif]SDL_Surface* getResult() {return destination;} }; renderer::renderer(std::string filename, SDL_Surface* udestination) { tilesheet = loadOptimized(filename); destination = udestination; width = tilesheet->w/tileSize; height = tilesheet->h/tileSize; divideTilesheet(); } renderer::renderer(SDL_Surface* utilesheet, SDL_Surface* udestination) { tilesheet = utilesheet; destination = udestination; width = tilesheet->w/tileSize; height = tilesheet->h/tileSize; divideTilesheet(); } bool renderer::divideTilesheet() { //make sure we don't leave any previous tiles tile.clear(); for(int y = 0; y < height; y++) { for(int x = 0; x < width; x++) { SDL_Surface* newTile = NULL; newTile = SDL_CreateRGBSurface(0, tileSize, tileSize, 32, 0, 0, 0, 0); SDL_Rect clip; clip.x = x*tileSize; clip.y = y*tileSize; clip.w = tileSize; clip.h = tileSize; SDL_Rect dest; dest.x = 0; dest.y = 0; SDL_BlitSurface(tilesheet, &clip, newTile, &dest); //the texture is created, so now we have to register it Texture* newTex = new Texture(); newTex->tex = newTile; newTex->colorNum = newTex->tex->format->BytesPerPixel; if(newTex->colorNum == 4) { if(newTex->tex->format->Rmask == 0x000000ff) newTex->format = GL_RGBA; else newTex->format = GL_BGRA; } else if(newTex->colorNum == 3) { if(newTex->tex->format->Rmask == 0x000000ff) newTex->format = GL_RGB; else newTex->format = GL_BGR; } glGenTextures(1, &(newTex->texHandle)); glBindTexture(GL_TEXTURE_2D, newTex->texHandle); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); SDL_LockSurface(newTex->tex); glTexImage2D(GL_TEXTURE_2D, 0, newTex->colorNum, newTex->tex->w, newTex->tex->h, 0, newTex->format, GL_UNSIGNED_BYTE, newTex->tex->pixels); SDL_UnlockSurface(newTex->tex); tile.push_back(newTex); } } return true; } SDL_Surface* renderer::loadOptimized(std::string filename) { SDL_Surface* loaded = NULL; SDL_Surface* optimized = NULL; loaded = SDL_LoadBMP(filename.c_str()); if(loaded != NULL) { optimized = SDL_DisplayFormat(loaded); SDL_FreeSurface(loaded); } else return NULL; return optimized; } void renderer::render(int tilex, int tiley, int locx, int locy) { if(destination) { SDL_Rect dest; dest.x = locx; dest.y = locy; SDL_BlitSurface(tile[tiley*width + tilex]->tex, NULL, destination, &dest); } else { //render to the screen with opengl glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, tile[tiley*width + tilex]->texHandle); glBegin(GL_QUADS);[/font][/color] glColor4f(1.0, 1.0, 1.0, 1.0); glTexCoord2f(0, 0); glVertex2f(float(locx), float(locy)); glTexCoord2f(1, 0); glVertex2f(float(locx + tileSize), float(locy)); glTexCoord2f(1, 1); glVertex2f(float(locx + tileSize), float(locy + tileSize)); glTexCoord2f(0, 1); glVertex2f(float(locx), float(locy + tileSize)); glEnd(); glDisable(GL_TEXTURE_2D); } } [/CODE][/font][/color] [color=#282828][font=helvetica, arial, sans-serif]I've tried using method, but that wasn't working, either; I removed it before I originally posted here. I even tried rendering a regular square without texturing just below the textured one in the code to make sure that it hadn't somehow been transformed out of the view of the screen. It rendered, but I still can't get the textured square to render at all. It won't render black, white, or any other color; I've changed the background color several times to make sure of that. I've also checked to make sure that every tile gets a texture handle and they do, which is making me think that the mistake is either with generating the tiles with SDL or with the rendering code.[/font][/color]