It is currently Tue Dec 12, 2017 7:22 am

All times are UTC - 5 hours




 Page 1 of 1 [ 12 posts ] 
Author Message
 Post subject: Forum Quota and Old Posts
PostPosted: Tue Feb 13, 2007 7:08 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
The game engine project code is cleaned up in this VMK and broken up into libraries. The 3 new library projects that are created are MathLib, ObjectLib and SceneLib. Libraries make the code more modular so that it can be reused.


Offline
 Profile  
 
 Post subject: 16th VMK problem.....
PostPosted: Fri Aug 15, 2008 12:13 pm 

Joined: Sun Jul 13, 2008 8:59 pm
Posts: 1
VMK 16A contains 14 videos and VMK 16B contains 6 videos, but both main page categories have 20 videos.

correct it please :)


Offline
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 2:05 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
This is correct how it is. I split this VMK into two parts 16A and 16B, each about 20 minutes long. If you have downloaded both, unRAR both files into the SAME directory. Now when you play the video it will be seamless and run all the way through.


Offline
 Profile  
 
 Post subject: something is suboptimal
PostPosted: Sat Sep 13, 2008 10:13 pm 

Joined: Wed Aug 06, 2008 7:53 pm
Posts: 182
Location: Russia
On VMK-16.

What happened in this tutorial is that the variable of type GameRenderer was extracted from Scene class and this seems as a step in right direction. However a decision to put it in each subject of rendering is definitely suboptimal. For instance, if we have, say, 1000 triangles the m_Renderer is duplicated 1000 times. That is just unnecessary. I would propose to store that var. in a single globally seen static variable. Then at some early stage of game loading we should initialize it by reading the value of this option from options-file and initialize it.
Assumed that we need options facilities anyway I would suggest the next (pseudo) code:
// in a new file Options.h
class Options // this class is incomplete! We need more functions.
{
public: // public interface
    static void LoadOptions( const TCHAR * fname );
...
    static GraphicsRenderer GetRendererType() { return s_renderer; }
...
protected: // VIP interface
    static void SetRendererType(GraphicsRenderer gr) { s_renderer = gr; }
...
protected: // member data
    static GraphicsRenderer    s_renderer;
...
};

// in Options.cpp
GraphicsRenderer Options::s_renderer = GR_NONE; // or GR_OpenGL temporarily

// perhaps in main.cpp ( indirectly via Options::LoadOptions() )
Options:: SetRendererType( GR_OpenGL );

// finally we can use this static in Render() methods:
void Triangle::Render()
{
    if (GR_OpenGL  == Options::GetRendereType()) {
    // rendering code
    }
    ...
}


In my current version of GameEngine the virtual methods machinery is used to select the right rendering branch, e.g. the choice of renderer-type occurs outside Render() method.


Offline
 Profile  
 
 Post subject: VMK-16
PostPosted: Sat Dec 27, 2008 5:25 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
I noticed at the end of the videos when you are correcting glVertex33f to Vertex3f that you have the house object in Render() within GameOGL.cpp, you do not need the Render() function at all in GameOGL since you caused each object class to call its own Render() function.

I removed the Render() function from GameOGL.cpp completely and everything runs correctly


Offline
 Profile  
 
 Post subject: Keep going
PostPosted: Sat Dec 27, 2008 4:20 pm 

Joined: Wed Aug 06, 2008 7:53 pm
Posts: 182
Location: Russia
This is correct. However, the rigid approach to the drawing scene's stuff you are contemplating will be changed significantly as soon as SCENE GRAPH will be introduced ~ in VMK 21.
Keep going, great architectural transmutations are coming forth soon. ;)


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Thu Sep 22, 2011 4:41 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
Ok, this is my 3rd time going through the game engine good praticing for c++ hehe. I have reached this point in the game engine series. I am now working in VS 2010 ultimate. Instead of trying to port in my old game engine,
I just started anew. I don't have any problems with the code at all, it seems to be the IDE itself

I was able to build all the libraries and the main project in my solution. Now here is the kicker lol;

In the properties for the GameEngine, under Linker->General->Output File ...
this was the original setting. $(OutDir)/GameEngineII.exe I am able to build and run it from VS, however when I try to change it to ./_Build/$(OutDir)/GameEngineII.exe ; I can build everything fine and the executable is in the right directory in windows explorer, but I get this error from VS when I try to run it.

Unable to start program 'C:\Users\Skilz80\Documents\Visual Studio 2010\Projects\GameEngineII\_Debug\GameEngineII.exe'.

The system cannot find the file specified.

Im lost for words here. It builds and runs as default, but when I try to change the output path VS complains. VS 2008 never complained. lol any help would be great.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Thu Sep 22, 2011 7:15 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
TargetPath(C:\Users\Skilz80\Documents\visual studio 2010\Projects\GameEngineII\MathLib\[b][size=150]_Debug[/size][/b]\MathLib.lib) does not match the Library's OutputFile property value (C:\Users\Skilz80\Documents\visual studio 2010\Projects\GameEngineII\[b][size=150]_Build\_Debug[/size][/b]\MathLib.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).


This warning message says it all. You need to go back through each project in your solution and correct the target path to match the output directory that you are using. These values are found in each project property page:
Configuration properties > General > Output Directory
Configuration properties > Debugging > Working Directory
Configuration properties > Linker > Output File
Configuration properties > Librarian > Output File

Also make sure you clean your solution so that you are not using any old built files so you can actually see what is being compiled and where it is being placed on your hard drive. You can go into windows explorer and just delete your debug folder but make sure you don't lose any resources that you may have also stored there.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Fri Sep 23, 2011 2:16 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
I know what you are saying, Im just not sure if it is something that microsoft changed between VS08 and VS10.

I will provide a list of the projects properites along with the path/s in windows explorer where the libraries and executable are being placed. All three libraries will have the same values.

LIBRARIES' PROPERTIES:
Configuration Prop. > General > Output & Intermediate Directory = _Debug\
Configuration Prop. > Debugging > Working Directory = nothing or blank
Configuration Prop. > Librarian > Output File = ../_Build/$(OutDir)/[NameOfProj].lib

GameEngineII PROPERTIES:
Configuration Prop. > General > Output & Intermediate Directory = _Debug\
Configuration Prop. > Debugging > Working Directory = ./_Build/$(OutDir)
Configuration Prop. > Linker > Output File = ./_Build/$(OutDir)/GameEngineII.exe
Configuration Prop. > Linker > Additional Library Directories = ./_Build/$(OutDir)

Windows Explorer
Location of The Libraries and Executable = C:\....\Projects\GameEngineII\_Build\_Debug

All the libraries and executable are in the right place, If I go into windows explorer
and run the executable the program starts up and runs like it is supposed to, and the log file for ErrorHandler is genereated in that directory so the working directory is correct. But when I try to debug or run it from VS. I get the error...

Unable to start program C:\...\Projects\GameEngineII\_Debug\GameEngineII.exe.

The system cannot find the file specified.

It is as if Visual studio is not updating the location that I want the executable to run from even though all the values in the properties field look correct.

I even did a clean build and deleted the _Build and _Debug Folders and still get the error from above.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Fri Sep 23, 2011 3:20 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
I compile and build all my files into one directory called _build. The difference between the debug and the release versions is defined by the output file name. All my debug builds have "_debug" appended to the end of the library or exe name.

My VS 2010 setup looks like this:
Properties for each library:
Configuration Prop. > General > Output Directory = ..\_build\
Configuration Prop. > General > Intermediate Directory = _temp\$(Configuration)\
Configuration Prop. > Debugging > Working Directory = $(ProjectDir)
Configuration Prop. > Librarian > Output File = ../_build/$(ProjectName).lib for the debug version this is set to ../_build/$(ProjectName)_Debug.lib

Properties for the GameEngine EXE:
Configuration Prop. > General > Output Directory = _build\
Configuration Prop. > General > Intermediate Directory = _temp\$(Configuration)\
Configuration Prop. > Debugging > Working Directory = $(ProjectDir)
Configuration Prop. > Linker > Output File = ./_build/$(ProjectName).exe (add _debug for the debug version of the build)


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Sat Sep 24, 2011 12:58 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
YAY lol, only i had to go into additional includes and change the libraries names from original to (Name)_Debug.lib so that the linker can find them. All works well now thank you so much. I think that MS changed some of the iternal structures and settings to VS. Glad that it works now, thank you for your time and help.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 16 - Library Projects
PostPosted: Tue Jan 10, 2012 1:59 am 

Joined: Thu Sep 27, 2007 5:51 pm
Posts: 48
Finaly got through this, but for some resason my mouse have become visible again for some reason, and I haven't changed the code, just made the projects. The mouse is stuck a little to the left of the game window.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron