WIP K_Game 3D Game Engine first official website.
Hello MasterGod.
About this code:
Well, in my Game.dll project I define GAME_DLL to know that inside it everithing that uses GAME_PUBLIC_EXPORT or GAME_TEMPLATE_EXPORT
is exported from the .dll file.
Inside you project you don't have that define so it work diferenty(importing the sinbols from the .dll)
As you can see for the simbols to work and not give you linkage errors in your project, templated objects(functions, classes)
have to use __declspec(dllexport) in the Game.dll compilations but nothing inside your project.
Trust me I worked a lot of hours to fix that problem at first(5 moths ago when I barely started this project).
I must warn you that this project is and will be inspired mainly from Irrlicht, Lightfeather and Ogre's source codes, because are the best Rendering Engine Open Source I know yet off,
BUT Everything goes through my "processor" and end "spitted out" as the final code that forms K_Game 3d engine.
I have home some other source codes to inspire from:
OpenGameEngine (very nice but is more a wrapper for other engines)
Yake
Quake Engine(I and II)
G3D
Nebula 2
Nebula 3 wich is quit good.
ODE
Bullet.
OpenAL
and other sample source codes.
About this code:
Code: Select all
ifdef GAME_DLL
00104 # define GAME_PUBLIC_EXPORT __declspec(dllexport)
00105 # define GAME_TEMPLATE_EXPORT __declspec(dllexport)
00106 # else
00107 # define GAME_PUBLIC_EXPORT __declspec(dllimport)
00108 # define GAME_TEMPLATE_EXPORT
is exported from the .dll file.
Inside you project you don't have that define so it work diferenty(importing the sinbols from the .dll)
As you can see for the simbols to work and not give you linkage errors in your project, templated objects(functions, classes)
have to use __declspec(dllexport) in the Game.dll compilations but nothing inside your project.
Trust me I worked a lot of hours to fix that problem at first(5 moths ago when I barely started this project).
I must warn you that this project is and will be inspired mainly from Irrlicht, Lightfeather and Ogre's source codes, because are the best Rendering Engine Open Source I know yet off,
BUT Everything goes through my "processor" and end "spitted out" as the final code that forms K_Game 3d engine.
I have home some other source codes to inspire from:
OpenGameEngine (very nice but is more a wrapper for other engines)
Yake
Quake Engine(I and II)
G3D
Nebula 2
Nebula 3 wich is quit good.
ODE
Bullet.
OpenAL
and other sample source codes.
Kat'Oun
Sorry I forgot about this:
In example2 you can see this pieces of code:
the variables to use.
initialize the game and the variables.
add 2 viewports to the render window with a camera atached to wich one of them and giving th proprieties of them.
First has cam1 is on the entire dimention of the render window and the rendering order(zorder) 0.
Second has cam1, has the relative position 0.65f,0.65f (0.65% top of the render window, 0.65% left of the render), the relative dimention of 0.3f,0.3f and the render order of 1.
So the first Viewport renders the scene first on the GDI(graphic device interface) coresponding to the attached camera's view.
, the second renders the scene second.
Move the cameras were ever you want, it will update your view.
Even so as the engine is made you should remove one of the viewports anytime in your game play and just disapear, letting the atached camera availabe to reuse. BUT that needs to be tested to see of any bugs and fix them (as only me is writting this engine yet, I can't verify everithing I plan to implement in it).
Thank you very much for the interest you show in my work, and the apreciation on my "white nights" I spent on it so fare.
To let you know of my recent work I have just made I simple mesh file format and a simple importer for it that works. Update from the SVN.
Did you took the sources form the SVN?
Regards.
Well that "rect" that you cand see on screen is called Viewport.And I have another question, how did you do (like I see in the screenshots) that if you make another camera you can have a rect on screen where you see what that new camera is pointing at
In example2 you can see this pieces of code:
Code: Select all
GameManager* mGameManager;
scene::SceneManager* mSMng;
render::RenderWindow* mWin;
render::RenderManager* mRMng;
scene::Camera* cam1;
scene::Camera* cam2;
Code: Select all
mGameManager = new GameManager();
mGameManager->initialise();
mSMng = mGameManager->getSceneManager();
mRMng = mGameManager->getRenderManager();
cam1 = mSMng->createCamera();
cam2 = mSMng->createCamera();
mWin = mRMng->getMainWindow();
Code: Select all
render::Viewport* vp1=mWin->addViewport(cam1,0);
vp1->setBackgroundColour(render::Colour(0.1f,0.1f,0.1f));
render::Viewport* vp2=mWin->addViewport(cam2,1,0.65f,0.65f,0.3f,0.3f);
vp2->setBackgroundColour(render::Colour(0.1f,0.1f,0.9f));
First has cam1 is on the entire dimention of the render window and the rendering order(zorder) 0.
Second has cam1, has the relative position 0.65f,0.65f (0.65% top of the render window, 0.65% left of the render), the relative dimention of 0.3f,0.3f and the render order of 1.
So the first Viewport renders the scene first on the GDI(graphic device interface) coresponding to the attached camera's view.
, the second renders the scene second.
Code: Select all
cam1->setPosition(0, 10, 0);
cam2->setPosition(0, 10, -15);
cam2->rotateX(10.0f);
Even so as the engine is made you should remove one of the viewports anytime in your game play and just disapear, letting the atached camera availabe to reuse. BUT that needs to be tested to see of any bugs and fix them (as only me is writting this engine yet, I can't verify everithing I plan to implement in it).
Thank you very much for the interest you show in my work, and the apreciation on my "white nights" I spent on it so fare.
To let you know of my recent work I have just made I simple mesh file format and a simple importer for it that works. Update from the SVN.
Did you took the sources form the SVN?
Regards.
Kat'Oun
I have yet to download it from the SVN, I was just playing with the docs.
I'll download it later and check it more deeply.
About the Viewport, I'll look into it today.
And thank you. I've already learned a lot from your work!
EDIT:
I'm downloading it right now.
2nd Edit:
I tried to compile it but I get linker errors.
I'll download it later and check it more deeply.
About the Viewport, I'll look into it today.
Are you sure you didn't mean __declspec(dllimport)?katoun wrote: Inside you project you don't have that define so it work diferenty(importing the sinbols from the .dll)
As you can see for the simbols to work and not give you linkage errors in your project, templated objects(functions, classes)
have to use __declspec(dllexport) in the Game.dll compilations but nothing inside your project.
And thank you. I've already learned a lot from your work!
EDIT:
I'm downloading it right now.
2nd Edit:
I tried to compile it but I get linker errors.
Hello.
I am using OpenGL for the rendering system.
Some could say that is the Ogre's but I say it is inspired from it and it will have a lot in common as I learned a lot from it though it is writen from scratch piece by piece.
I am proud to announce the first release of K_Game, v0.0.3 RC1.
You can have a look at the current features here: http://k-game.sourceforge.net/features.html.
Regards to all and to the Open Source community because of it I could get here, now, to present to the 'world' my own engine .
And Happy New Year!
I am using OpenGL for the rendering system.
Some could say that is the Ogre's but I say it is inspired from it and it will have a lot in common as I learned a lot from it though it is writen from scratch piece by piece.
I am proud to announce the first release of K_Game, v0.0.3 RC1.
You can have a look at the current features here: http://k-game.sourceforge.net/features.html.
Regards to all and to the Open Source community because of it I could get here, now, to present to the 'world' my own engine .
And Happy New Year!
Kat'Oun
My ScriptManager is preaty simple:
Code: Select all
script::ScriptManager* ScrMng = mGameManager->getScriptManager();
ScrMng->initialise();
script::Script* script01 = ScrMng->load("script01.lua");
script::Script* script02 = ScrMng->load("script02.lua");
ScrMng->runScript(script01);
script::ScriptSystem* ss = ScrMng->getScriptSystem("Lua");
ss->execute("onInit()");
ScrMng->runScript(script02);
ss->execute("onInit()");
Kat'Oun
I have created a forum for K_Game.
You can check the web site:http://k-game.sourceforge.net/
Regards to all.
You can check the web site:http://k-game.sourceforge.net/
Regards to all.
Kat'Oun