   Starting off in game development
  I have been interested in game development for a long time, I used to program macromedia flash games in actionscript and later on learned java, then c++ and openGL to try to make something of a bigger and better scale.The problems I remember running into were many hours hassling over how to get image loading and other "basic" technical functions to work that got in the way of the actual game structure and character programming that I wanted to do.  I've remember I tried SDL for a while (to try to make my game multi-platform) but always felt unconfident that what I was doing was going to work on more than one computer.I am looking for your thoughts on what currently is the easiest and fastest way to set up the system/graphic foundation of a multi-platform game.  I have not looked at c++ game development in over a year and my current assumption would be to use SDL to set up the basics of my window setup kind of stuff, and use the Devil image loader (it was linked to here on gamedev.net, see here: http://openil.sourceforge.net/) to load image graphics, but I'm not sure what other libraries I should use to help me save time from learning tedious specifics of a c++/sdl game's simple technical operations.For example, I understand the programming process of a game in that in each update I should update the player, the characters, objects, etc and then render the objects the way a normal game cycle would work.  But I know nothing about what I should do about the render/sound/IO process of a c++/OpenGL game, since all of that stuff was handled for me in Macromedia Flash.I know this is a lot of questions that can't all be answered at once but I thought i might as well state them all to give you an idea of what I am trying to do,  thanks for your time.   
  If you aren't intent on writing everything from scratch, I would recommend using something like Ogre3D or maybe Unity3D or Torque3D.  Each of these provide the implementations that you are asking for, and you can learn from their examples.  Once you are ready to move up to doing it all yourself, you'll have a good foundation of what should go where.   ;  no what i mean is that, yes, I am intent on writing everything from scratch, i just want to make sure I am using the best libraries so that i don't waste my time learning the proprietary specifics of a library i won't end up using in the long term.  the other big point is that i guess im looking for an easy to setup "temporary" graphics solution for my game that can be used for the main development process until I form a real educated strategy on how to create my own.   ;  I think those are two opposing goals - not wanting to learn library specific details, but having a placeholder graphics solution...I would still recommend checking out Ogre or Panda3D - you don't have to learn all of the details about the engine, but can still see what they have to offer.  You will have to spend some time with the library, but that doesn't mean that you won't gain value from learning how they do things.  That's just my opinion, but it can't hurt to take a look...   ;Quote:Original post by watwatyes, I am intent on writing everything from scratch, i just want to make sure I am using the best librariesUsing the libraries is a good idea, but I have to wonder what exactly "writing everything from scratch" means to you.   ;  Most big companies use 3rd part libraries for something.  Sound/Graphics etc.  Personally i think, that if you want to make a game, writing everything from scratch is a bad idea.SDL is a good choice and it is used lots of places and is free.  There are other alternatives, but these can cost several houndrer thousands of dollars per title (for the cheapest ones) up to millions for the more expensive ones (unreal)   ;  I just use SDL and OpenGL.  I don't need the Devil image loader, SDL has it's own image loader.  My program runs on both Linux and Windows.  Probably I could make it run on Apple, too.  You gotta get SDL and SDL_image run time libraries for whatever computer you are running your program on.  I think http://lazyfoo.net/SDL_tutorials/index.php has everything I need to know.This is my image loader:/*************************************************************************** *   Copyright (C) 2007 by icecubeflower* *   icecube@icebox * *   * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or* *   (at your option) any later version.* *   * *   This program is distributed in the hope that it will be useful,  * *   but WITHOUT ANY WARRANTY; without even the implied warranty of   * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    * *   GNU General Public License for more details. * *   * *   You should have received a copy of the GNU General Public License* *   along with this program; if not, write to the* *   Free Software Foundation, Inc.,    * *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.   * ***************************************************************************/#include "Picloader.h"VaultNode::VaultNode(){   imagenext=NULL;}VaultNode::~VaultNode(){   //When an ImageVault goes out of scope, every image it loaded into OpenGL is erased.   glDeleteTextures(1,&imagenum);}ImageVault::ImageVault(){   imagehead=NULL;   imagereturn=NULL;}ImageVault::~ImageVault(){   imagereturn=imagehead;   while(imagereturn!=NULL)   { imagehead=imagereturn->imagenext; delete imagereturn; imagereturn=imagehead;   }}//This is only for PNG's and JPG's.  If anything else works then it's a coincidence.//If you try loading a file that is already in this ImageVault then funnum will just//be set to the correct numberbool ImageVault::ImageLoader(std::string filename, GLuint &funnum){  bool breturn=false;  SDL_RWops *rwop;  //don't remember wtf this is, use it to check if an image is a jpeg  SDL_Surface *image;  VaultNode *temp;  temp=imagehead;  imagereturn=imagehead;  //scroll to the point in the list where the file already exists or scroll all the way to the end  while(imagereturn!=NULL&&imagereturn->imagename!=filename)  {    temp=imagereturn;    imagereturn=imagereturn->imagenext;  }  //if(image is already in list)  if(imagereturn!=NULL)  {    funnum=imagereturn->imagenum;  //set funnum to corresponding image in OpenGL land    breturn=true;  }  else  //image is not in list  {    if(image=IMG_Load((Pathfinder::Image_Path+filename).c_str()))    { /*maybe need to be checking glGenTextures(1, &funnum);    glTexImage2D    glTexParameteri  (if they fail make funnum=0 in addition to returning false) for exceptions*/ glGenTextures(1, &funnum);  //funnum = a number not currently corresponding to an image in OpenGL glBindTexture(GL_TEXTURE_2D, funnum);  //we bind funnum but this texture is empty //so load a texture (*image) into OpenGL and funnum will correspond to it because it's the currently bound texture rwop=SDL_RWFromFile((Pathfinder::Image_Path+filename).c_str(),"rb"); if(IMG_isJPG(rwop))  //if it ain't a JPG then it's a PNG   //image->pixels is what sends the SDL image    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image->w, image->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image->pixels); else    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image->w, image->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels); //magical OpenGL stuff glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); //we are at the end of the linked list try {   imagereturn=new VaultNode;   if(imagehead==NULL)imagehead=imagereturn;   elsetemp->imagenext=imagereturn;   imagereturn->imagename=filename;   imagereturn->imagenum=funnum;   breturn=true; } catch(std::bad_alloc&) {   glDeleteTextures(1,&funnum); }    }    else  //if image won't load make the GLuint 0 just like glGen Textures    { funnum=0;    }    if(image) SDL_FreeSurface(image);  }  return breturn;}void ImageVault::Apocalypse(){   imagereturn=imagehead;   while(imagereturn!=NULL)   { imagehead=imagereturn->imagenext; delete imagereturn; imagereturn=imagehead;   }}bool ImageVault::ImageZap(GLuint funnum){   VaultNode *temp;   imagereturn=imagehead;   temp=imagehead;   while(imagereturn!=NULL&&imagereturn->imagenum!=funnum)   { temp=imagereturn;  //there is no imageprev so I need temp to shadow imagenext imagereturn=imagereturn->imagenext;   }   //if we found the image in the linked list, delete it   if(imagereturn!=NULL)   { temp->imagenext=imagereturn->imagenext; if(temp==imagereturn)  //if 1st node contains the image    imagehead=imagehead->imagenext; delete imagereturn; imagereturn=NULL; return true;   }   return false;}std::string ImageVault::GetName(GLuint funnum){   std::string strval;   imagereturn=imagehead;   while(imagereturn!=NULL&&imagereturn->imagenum!=funnum) imagereturn=imagereturn->imagenext;   if(imagereturn!=NULL) strval=imagereturn->imagename;   return strval;}std::string ImageVault::GetName(){   std::string strval;   if(imagereturn!=NULL) strval=imagereturn->imagename;   return strval;}GLuint ImageVault::GetNum(){   GLuint picnum=0;   if(imagereturn!=NULL) picnum=imagereturn->imagenum;   return picnum;}void ImageVault::Reset(){   imagereturn=imagehead;}bool ImageVault::End(){   if(imagereturn==NULL) return true;   else return false;}bool ImageVault::Next(){   if(imagereturn!=NULL)   { imagereturn=imagereturn->imagenext;   }   if(imagereturn!=NULL)return true;   elsereturn false;}I'm not an OpenGL expert.  The way I understand it, OpenGL holds all the images you load and it returns the "name" of the image which is a GLuint.  So I grab that number with glGenTextures(1, &funnum);  I use this image loading program to keep from loading he same image multiple times.  If it's already loaded I just get the correct "name" returned.Oh yeah, I wrote this before I learned the STL and I obsessively coded linked lists for everything.  I just think they're fun.   ;  thanks for the responses,Jason I have taken your suggestion and downloaded the ogre3d SDK, because it seems like exactly what I'm looking for.  I ignored it the first time because you mentioned it next to torque3d so I assumed it was another proprietary game engine.When I said I wanted to write everything from scratch what I meant was that a "game engine" is the opposite of what I am looking for.  I just want a rendering engine, which ogre3d apparently is (and I assume i can find a crossplatform 3d audio engine that uses openAL later).Still though ... I have run into the same kind of shitty problems I always run into with using other people's code: i cannot get it to work.  Download and install the ogre3d SDK and fire up xcode 3.0, okay that's simple, but then I get to the "Setting up the application" tutorial (http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication) and can't make it past the first paragraph.  I modify the filepaths in resources.cfg and plugins.cfg so they are pointing to what I'm pretty sure they're pointing to, press build, it compiles, and then nothing happens."FacialAnimation exited with status 5." is all that xcode tells me when I press Build and Go.  I can't run any of the examples.  ReportCrash goes to 90% cpu and nothing happens.I have found no explanation anywhere... if this is the kind of shit i'm going to have to go through to use ogre3d I really do not want to use it.  This was my fear from the beginning.  I do not understand many of the specifics of xcode or ogre3d, so there is really nothing I can do..I'm going to abandon the Samples project for now and try to get something working the specific xcode way (http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode) later.  If anyone has some insight into an easier way to get a compileable Ogre3d template on mac os x, please let me know.  I'll keep you posted if I get anywhere.;  How multi-platform is multi-platform? i.e. What are your target platforms?   ;Quote:Original post by yaustarHow multi-platform is multi-platform? i.e. What are your target platforms?ogre3d only supports windows, linux, mac, and thats what im using so I plan to target all 3 of those platforms.I have followed every instruction given for the xcode setup and it is very frustrating.  I've got my project to be able to find all the right Ogre files, but then i'm stuck with these errors in OgreWindowEventUtilities.herror: 'EventHandlerCallRef' has not been declarederror: 'EventRef' has not been declaredso I google those errors and it says try adding#include <Carbon/Carbon.h> to the first line of my main.cppso I do that and then I get these new errors in OSMessageNotification.h:error: 'io_user_reference_t' was not declared in this scopeerror: 'io_user_reference_t' does not name a typeerror: 'OSAsyncReference64' does not name a typeerror: 'io_user_reference_t' does not name a typeBuild failed (4 errors)so I google this and find out this is related to IOKit.framework.  i now presume this has to do with some inconsistency between what base SDK path to use.  The Ogre SettingUpApplication tutorial tells me I need to use MacOSX10.4u.sdk, but the IOKit.framework is only in the MacOSX10.5.sdk.  If I change the Base SDK Path back to 10.5 I end up with around 67 new errors.  So what am I supposed to do now?seriously, how is it possible that there is no actual working compileable template to just start using?  the whole point of using this rendering engine was for simplicity, and after trying to configure this for hours I can't even get a goddamn window to display.if anyone can offer advice i would greatly appreciate it   