• 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

141 Neutral

About captacha

  • Rank
  1. I am working with two classes right now which are called Block and TPiece. In the TPiece class there is an array of Blocks. The Block class only has one constructor Block(int x, int y). The constructor for my TPiece class is TPiece::TPiece() { block[0] = Block(4, -1); //Left Block block[1] = Block(5, -1); //Middle Block block[2] = Block(6, -1); //Right Block block[3] = Block(5, -2); //Top Block rotation = 0; } When I attempt to compile that code, I get an error: "no matching function for call to 'Block::Block()'. It identifies that error as being at on the line: "TPiece::TPiece()". I don't know why it thinks I'm calling a the Block constructor there, but when I do add a constructor without parameters to the Block class, the program runs. Any idea why this is happening?
  2. I'm currently taking a AP programming course, and since I know most of the material already, I sometimes assist my teacher. The class is studying Object Oriented Progamming and Design in Java. My teacher and I were reviewing questions from the textbook which the class was working on, when we spotted answer that looked suspicious. I don't have the question with me right now, but it was something like this:   "What relationship tends to indicate a dependency? a) IS_A b) HAS_A c) KNOWS_ABOUT answer: c"   I was a bit confused about this answer beacuse I have never heard of a KNOWS_ABOUT relationship before this. I am aware of the IS_A and HAS_A relationships from the programming book I read when I first started programming. Have you ever heard about the KNOWS_ABOUT relationship, and are we wrong?
  3. So I fixed my operator=, which fixed the rest. Here's my new function:   Node Node::operator=(Node copy) {     this->pos.x = copy.pos.x;     this->pos.y = copy.pos.y;     this->parent = copy.parent;     this->g = copy.g;     return *this; }   Thanks for all the help
  4. It seems like that operator= isn't working, so I'll fix it and try to get it to work.
  5. This is the first time I've actually ever used operator overloading before. I didn't really kow what I was doing. Here's the function:   Node Node::operator=(Node copy) {     return copy; }
  6. Have you tried setting a custom name and title in glut? http://www.opengl.org/resources/libraries/glut/spec3/node27.html
  7. Yes, it does. openList is passed as vector<Node>& openList. Here's the general algorithm for it. The functions in the if statement's body don't affect either list.     Node* tmp; if(!hasWall(parentNode.pos.x, parentNode.pos.y-1, wallCords) && !onClosedList(Position(parentNode.pos.x, parentNode.pos.y-1), closedList)) {     tmp = new Node(Position(parentNode.pos.x, parentNode.pos.y-1), &parentNode);     openList.push_back(*tmp); }  
  8.  int lowF = 0;  Node tmp;  Node currentNode(Position(currentPos.x, currentPos.y), 0);  vector<Node> openList;  vector<Node> closedList;  closedList.push_back(currentNode);    while(closedList[closedList.size()-1].pos.x != pathDest.x && closedList[closedList.size()-1].pos.y != pathDest.y)  {   getChildNodes(closedList[closedList.size()-1], closedList, openList, wallCords);   for(int i=0;i<openList.size();i++)   {    if(openList[lowF].getF(pathDest) > openList[i].getF(pathDest))     lowF = i;   }   closedList.push_back(openList[lowF]);   openList.erase(openList.begin()+(lowF));  }     path.push_front(closedList[closedList.size()-1]);  tmp = closedList[closedList.size()-1];  while(!(tmp == currentNode))  {   tmp = *tmp.parent;   path.push_front(tmp);  }  path.push_front(tmp);   Here's the entire function. My node class contains a Node* parent, int g, and a Position class which has x and y integers
  9. In the last week or so, I've been attempting to implement pathfinding for my first time. I've been reading a tutorial on the general concept and have been trying to implement it on my own. For the Closed List and Open List, I use std::vector. The guide says once I find the optimal node to delete it from the Open List and add it to the Closed List. I'm doing that with this code:   closedList.push_back(openList[lowF]); openList.erase(openList.begin()+lowF);   The issue is that the wrong node is being deleted from the Open List, causing the pathfinding calculations to flow in an infinite loop. For Instance:   Closed List = (9,4) Open List = (9,3) (10,4)   After the code I posted above executes, the vectors look like this:   Closed List = (9,4) (9,3) Open List = (9,3)   While they should look like this   Closed List = (9,4) (9,3) Open List = (10,4)   I checked the lowF value, and it is 0. So openList.erase(openList.begin()+lowF) should be the same as openList.erase(openList.begin()). For some reason, that line of code is deleting the second element in the vector instead of the first. I'm attaching a error log file I printed out. I'd appreciate any help. ty
  10. Why don't you just put: [source lang="java"]#define SDLK KEY[/source]
  11. Are they multiplayer games, maybe the games are trying to go past the firewall protections.
  12. I was trying to explain to a semi-programmer friend of mine today the purpose of Bit Flags vs. Booleans. And I couldn't think of any besides Memory Usage which seems rather weak seeing as it would save you a few 100 bytes of memory at most. So what's a could argument for Bit Flags I can tell him about, and to be honest I'm wondering myself right now too.
  13. The problem was that I had an extra delimiter at the end of the file. Thanks guys.
  14. [CODE] #include <iostream> #include <string> #include <cstdio> #include <cstdlib> using namespace std; const int CELLS_IN_GRID = 81; int main() { FILE *file; /* Pointer to File */ double cellValue[CELLS_IN_GRID]; /* Array of cellValues for each Cell in Grid */ string csvValue[CELLS_IN_GRID]; /* Array of cellValues as Strings */ char currentChar; /* Current Character in File Stream */ int cellPosition = 0; string filename; cin >> filename; file = fopen(filename.c_str(), "r"); while(currentChar != EOF) { currentChar = fgetc(file); if(currentChar != ',' && currentChar != '%') { csvValue[cellPosition] += currentChar; } if(currentChar == ',') { cellPosition++; } } fclose(file); /*for(int i=0;i<CELLS_IN_GRID;i++) { //cellValue[i] = atof(csvValue[i].c_str()); //cout << csvValue[i] << '%' << " " << i << endl; }*/ return 0; } [/CODE] Here's the code. The line that causes it to break(if commented out) is the first line in the for loop.
  15. I was just writing a small program today converting csv files to xml, and I noticed something weird was happening. I had an array of doubles that was being iniatialized near the end of the program using an array of strings, [font=courier new,courier,monospace]atof()[font=arial,helvetica,sans-serif], and a for loop. When I commented out the initialization and left only the declaration, I got some runtime errors. Then when I commented out the declaration, the program ran fine again. I've never had this happen to me before, so I made a short test program. All it was was an integer declaration, and it ran fine. Any idea what's causing this?[/font][/font]