Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


RanBlade

Member Since 27 Feb 2003
Offline Last Active Aug 16 2014 09:19 AM

Topics I've Started

Multiple development PC's

29 February 2012 - 05:18 PM

Does anyone else have a need to do there work on separate PC's? And if so what medium do you use for your files "synced". dropbox? simply use SVN? usb drive?

Interview

24 August 2011 - 01:03 PM

I have a question about the job interview for a programming position, I've never had to do a real job interview before with my line of work. I was just curious how formal the suit or attire is for a programming interview? Does it need to be the full blown suit/tie or a little less formal. I don't want to overdress or under dress for my interviews and to find out what I need to buy because I don't really own a suit or any "formal" clothing. Thank you in advance.

Keep your faith ( in programming)

22 May 2009 - 11:04 AM

A lot of young programmer are probably like me when they first start. You hit a snag and if it takes more then 3 minutes to fix the problem you start to feel like your not smart enough or you aren't learning the language fast/well enough. Well keep the faith my friends. I have felt like that way time and time again. Today I can stand up and honestly say that I can throw pointers , function pointers, and all those other things that scare the heck out of young programmers around with ease(while using them properly) and understand exactly what I am doing with them and how they will affect my program and all that. In the next couple months my portfolio will be at a suitable level to start submitting resume's to places for a job in network programming and I finally have every confidence I can take on any project that a company that hires me will give me. So keep plugging away. Remember that the more you do it (and even fight with it) the better you will learn. And in the future you wont have to fight that issue again Also look into learning things in another light. If C++ is giving you trouble take break (when your at a good break point, like in between projects) and learn python or lua. It will get your brain thinking on different levels so you might have your brain respond to a situation differently(remember its only a new syntax your still programming and all the rules still apply) peace,

VM software

05 February 2009 - 11:21 AM

Was just curious if anyone has used some VM software to install a O/S like Unix/BSD to run the server programs they have created while being able to run the client under windows on same box? And if so how did it work out for you? I am currently in the process of installing one with a BSD O/S so once I get it working Ill post back on my success/failure.

searched and cant solve error LNK2001: unresolved external symbol

21 November 2006 - 05:32 PM

I have searched for the last 2 days and cant figure anything out so I figured Id give it a shot here before I go to bed see If i can get any insight from the gamdev guys. Iam working on a engine and a game. I have them setup as diffrent projects in MVSC++ 6.0(I know i need to upgrade). As well I could get it to link as long as I included the .cpp files but that is not the effect I wanted and I have never had this happen before(but this is the first time I have worked with 2 diffrent projects together). these are my errors in my game project:
ompiling...
game.cpp
Linking...
game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::LoadImage(char *)" (?LoadImage@Surface@@QAEPAUSDL_Surface@@PAD@Z)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::DrawSprite(struct SDL_Surface *,int,int)" (?DrawSprite@Video_System@@QAEXPAUSDL_Surface@@HH@Z)
game.obj : error LNK2001: unresolved external symbol "class Video_System Video" (?Video@@3VVideo_System@@A)
game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::GetSurface(void)" (?GetSurface@Surface@@QAEPAUSDL_Surface@@XZ)
game.obj : error LNK2001: unresolved external symbol "public: bool __thiscall STATE_System::HandleInput(void)" (?HandleInput@STATE_System@@QAE_NXZ)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::SetProgName(char *)" (?SetProgName@Video_System@@QAEXPAD@Z)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::Init(void)" (?Init@Video_System@@QAEXXZ)
Debug/Fantasy Battle.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

Fantasy Battle.exe - 8 error(s), 0 warning(s)




And my game code is
#include "video.h"
#include "system.h"
#include "map.h"
#include "globals.h"


bool game_running = true;


STATE_System GameSTATE;
Static_Map   GameMAP;


int main( int argc, char* argv[] )
{
	Game_Video.Init();
	GameMAP.LoadMap("images/testbackground.bmp");
	Game_Video.SetProgName("Fantasy Battle v1.0");

	while(game_running == true)
	{
		GameMAP.Show();
		game_running = GameSTATE.HandleInput();
	}

	return 0;
}



these are all in my engine project. this is the valid points in video.h:
class Video_System
{
	private:

		int                 x;
		int                 y;
		int                 z;
		int                 error;
	    static int          ResHeight;
	    static int          ResWidth;
		Log_System          VideoLogs;
		Bound_Box           MainWindowBox;
	
		


	
	public:		
		static SDL_Surface* g_window;
		
		//Default Constructor
		Video_System() : x( 0 ), y( 0 ), z( 0 ){}
		//accessor functions
		//Set functions
		void SetX(int TempX){x = TempX;}
		void SetY(int TempY){y = TempY;}
		void SetZ(int TempZ){z = TempZ;}
	    void SetResHeight(int TempRes){ResHeight = TempRes;}
		void SetResWidth(int TempRes){ResWidth = TempRes;}
		
		//Get Functions
		int* GetX(){return &x;}
		int* GetY(){return &y;}
		int* GetZ(){return &z;}
		int  GetResH(){return ResHeight;}
		int  GetResW(){return ResWidth;}

		//Member Functions
		void         Init();
		void         SetProgName(char* ProgName);	
		void         SetIcon(char* IconName);
		
		
		void         DrawSprite( SDL_Surface* Sprite, int x, int y);
		void         AnimateSprite( Surface* Animation, int Size, int X, int Y );
		void         UpdateScreen();
		void         Delay(int i){ SDL_Delay(i); }
		void         ClearScreen(){ SDL_FillRect(g_window, 0 , 0);}
		
	

	
};

//=================================================
// Class Surface 
// Objective: To create a class that will hide the
//            use of the SDL features and make it
//            easier to do surface mainipulation
//=================================================
class Surface
{
	private:
		Log_System   SurfaceLog;
		SDL_Surface* Image_Surface;
		SDL_Color    TransColor;
		int          SurfaceX;
		int          SurfaceY;

	public:
		Bound_Box  ImageBox;


		Surface() : Image_Surface( 0 ), SurfaceX( 0 ), SurfaceY( 0 ) {} 
		
		void         SetTransColor(SDL_Color Temp){TransColor = Temp;}
		void         SetTransparency();
		//void         SetSurface(char* filename){Image_Surface = LoadImage(filename);}
		SDL_Surface* GetSurface();

		int GetSurfaceX(){return SurfaceX;}
		int GetSurfaceY(){return SurfaceY;}

		void SetSurfaceX(int TempX){SurfaceX = TempX;}
		void SetSurfaceY(int TempY){SurfaceY = TempY;}

		SDL_Surface* LoadImage(char* ImageName);


		TTF_Font*    LoadFont(char* FontType, int PointSize);
};


and the video.cpp:
//===================================================
//Class: Video_System
//Function: Init()
//Parameters: None
//Objective: To initilize the video of the game
//===================================================
void Video_System::Init()
{
	SetResHeight( 768 );
	SetResWidth( 1024 );

	// initialize the video system.
	error = SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER );
	if(error == -1)
	{
		VideoLogs.SendError("Failed to load SDL");
	}
	TTF_Init();

	

	g_window = SDL_SetVideoMode( ResWidth , ResHeight , 0 , SDL_ANYFORMAT);
	if(g_window == NULL)
	{
		VideoLogs.SendError("Failed to SetVideoMode");
	}

	
}

//=====================================================================================
//Class: Video_System
//Function: DrawSprite()
//Parameters: SDL_Surface* Sprite - The SDL_Surface that is to be drawn to the screen
//            int x               - The x coordinate on the screen to be drawn to
//            int y               - The y coordinate on the screen to be drawn to
//Objective: To draw surfaces to the screen for the user
//=====================================================================================
void Video_System::DrawSprite(SDL_Surface* Sprite , int x , int y)
{
	SDL_Rect destination;

	destination.x = x;
	destination.y = y;

	SDL_BlitSurface( Sprite , NULL , g_window , &destination );
}

//===================================================================
//Class: Video_System
//Function: LoadImage()
//Parameters: char Imagename[] - The filename of the image that is 
//                               to be applied to the surface
//Objective: To load the image to a surface for the user
//===================================================================
SDL_Surface* Surface::LoadImage(char* ImageName)
{
	Image_Surface = SDL_LoadBMP( ImageName );
	if(Image_Surface == NULL)
	{
		SurfaceLog.SendError("Failed to load image" );
		
	}
	
	return Image_Surface;
}


//==================================================================
//Class: Video_System
//Function: SetIcon()
//Paramaters: char IconName[] - the path to the image of the icon
//Objective: To set the icon of the program for the user
//==================================================================
void Video_System::SetIcon(char* IconName)
{
	SDL_WM_SetIcon(SDL_LoadBMP( IconName ), 0 );
}




That handles the video. the state_system: system.h

//===========================================================
//Class Event_System
//Purpose: This is the work horse of the engine this is
//         where the game loop is and all the base structure
//         of the event system
//===========================================================
class STATE_System 
{
	protected:
		std::vector<Event_Handler*> STATES;
		std::vector<Event_Handler*>::iterator iter;

		

	public:
		
		void DispatchEvent( int Type, int Arg1 = 0 , int Arg2 = 0 );
	
		void RegisterSTATE( Event_Handler* Interface, int defaultstate = -1 );
		
		void ClearSTATES();
		
		
		

		bool HandleInput();
				
};


system.cpp
bool STATE_System::HandleInput()
{
	
    
    
    // declare event holder
    SDL_Event event;
	// set our at exit function
    atexit( SDL_Quit );
	


	
	
	//while( IsRunning == true)
    //{
	
		
		while( SDL_PollEvent( &event ) > 0 ) 
        {
            //an event was found
            switch( event.type )
			{
			case SDL_QUIT:
				{
				  return false;
				}break;  
            //A ton more key presses....
}



Well I searched all day and the only thing I could find was that I left my functions empty as you can see I most certinatly defined each function but Iam still getting the link errors. So Iam lost. Do I have to go about this a diffrent way. point me in the right direction. Thanks eveyrone.

PARTNERS