Showing posts with label nebula3. Show all posts
Showing posts with label nebula3. Show all posts

Monday, May 11, 2009

Drakensang into N3

Recently one of my team member tried to add some models of DrakenSang into N3 April 2009.

The followings are result:


<with HDR>


<without HDR>

The monster which is behind of the bear is not in DrakenSang but our game. The model was exported modified Nebula2 3dsmax toolkit and works fine.

One of the best practice for 3D engine is to do reverse engineering with its real sample. :-)



Friday, May 1, 2009

Random notes on N3, April 2009 release version

I'm spending most of my time with N3, April 2009 version on these days.

And so, drop some quick and random notes about it.

  1. IO stream should support multi-bytes or unicode. It fails to run if any directory name has multi-bytes code. e.g. Korean etc.
  2. It used file DB but changed now to memory DB. (yes, it is type of usage of sqlite) As I know, file DB is more fast than memory one and even stable. Why have it been changed?
  3. N3 uses compressed vertex format so any directly exported model from 3dsmax toolkit will not work correctly.
  4. There is n3convert but it only converts .n2 to .n3 not .nvx2 and .nax2. You also need .nvx2 for mesh file and .nax2 for animation file if it is necessary.
  5. One of good news is that, nmaxtoolkit has been modified to be compatible to the latest released N3.
  6. But bad news is that it has not been committed yet.
  7. Drakensang's model can be converted, not all of the models but some of them can be converted and run into the April 2009 version.
  8. Light and Shader stuff are still broken. When? :-)
  9. All clips must be in one .nax2 file for character animation. A complex character may not have all its animations at once but it may added one by one or changed during a develop time. So it is good to support to use seperated animation data file like ncharacter3skinanimator of N2. (well, it may not have clean interface though)
  10. There are some momory leaks.

Ok, that's all right now. I'll post more after have some experiments.

Monday, April 20, 2009

Quick Fix to run testgame of N3 April. 2009 version.

Someone mentioned, 'testgame' application of N3 April. 2009 version does not run.

The following might fix the problem:

Modified:
trunk/code/application/
appgame/gameapplication.cc
trunk/code/application/appgame/gameapplication.h
trunk/code/application/basegamefeature/statehandlers/gamestatehandler.cc
trunk/code/application/basegamefeature/statehandlers/gamestatehandler.h

Modified: trunk/code/application/appgame/gameapplication.cc
==============================================================================
--- trunk/code/application/appgame/gameapplication.cc (original)
+++ trunk/code/application/appgame/gameapplication.cc Fri Apr 17 14:32:54 2009
@@ -336,6 +336,11 @@
GameApplication::SetupGameFeatures()
{
// create any features in derived class
+ //@csy
+ this->graphicsFeature = GraphicsFeature::GraphicsFeatureUnit::Create();
+ this->graphicsFeature->SetCmdLineArgs(this->GetCmdLineArgs());
+ this->graphicsFeature->SetRenderDebug(true);
+ this->gameServer->AttachGameFeature(this->graphicsFeature.upcast<Game::FeatureUnit>());
}

//------------------------------------------------------------------------------
@@ -346,6 +351,9 @@
GameApplication::CleanupGameFeatures()
{
// cleanup your features in derived class
+ //@csy
+ this->gameServer->RemoveGameFeature(this->graphicsFeature.upcast<Game::FeatureUnit>());
+ this->graphicsFeature = 0;
}

} // namespace App

Modified: trunk/code/application/appgame/gameapplication.h
==============================================================================
--- trunk/code/application/appgame/gameapplication.h (original)
+++ trunk/code/application/appgame/gameapplication.h Fri Apr 17 14:32:54 2009
@@ -22,6 +22,8 @@
#include "http/httpinterface.h"
#include "http/httpserverproxy.h"
#include "timing/mastertime.h"
+//@csy
+#include "graphicsfeature/graphicsfeatureunit.h"

//------------------------------------------------------------------------------
namespace App
@@ -91,6 +93,9 @@
// game server
Ptr<Game::GameServer> gameServer;

+ //@csy default game features
+ Ptr<GraphicsFeature::GraphicsFeatureUnit> graphicsFeature;
+
// profiling
_declare_timer(GameApplicationFrameTimeAll);
};

Modified: trunk/code/application/basegamefeature/statehandlers/gamestatehandler.cc
==============================================================================
--- trunk/code/application/basegamefeature/statehandlers/gamestatehandler.cc (original)
+++ trunk/code/application/basegamefeature/statehandlers/gamestatehandler.cc Fri Apr 17 14:32:54 2009
@@ -5,7 +5,7 @@
#include "stdneb.h"
#include "appgame/gameapplication.h"
#include "game/gameserver.h"
-#include "basegamefeature/basegamefeatureunit.h"
+
#include "basegamefeature/statehandlers/gamestatehandler.h"

namespace BaseGameFeature
@@ -40,7 +40,12 @@
*/
void
GameStateHandler::OnStateEnter(const Util::String& prevState)
-{
+{
+ //@csy
+ this->defaultGameFeature = BaseGameFeature::BaseGameFeatureUnit::Create();
+ App::GameApplication* app = App::GameApplication::Instance();
+ this->defaultGameFeature->SetCmdLineArgs(app->GetCmdLineArgs());
+ Game::GameServer::Instance()->AttachGameFeature(this->defaultGameFeature.upcast<Game::FeatureUnit>());
BaseGameFeatureUnit::Instance()->SetRenderDebug(true);

// setup the game

Modified: trunk/code/application/basegamefeature/statehandlers/gamestatehandler.h
==============================================================================
--- trunk/code/application/basegamefeature/statehandlers/gamestatehandler.h (original)
+++ trunk/code/application/basegamefeature/statehandlers/gamestatehandler.h Fri Apr 17 14:32:54 2009
@@ -13,7 +13,7 @@
(C) 2003 RadonLabs GmbH
*/
#include "appgame/statehandler.h"
-
+#include "basegamefeature/basegamefeatureunit.h"
//------------------------------------------------------------------------------
namespace BaseGameFeature
{
@@ -61,6 +61,8 @@
Util::String exitState;
Util::String levelName;
Util::String saveGame;
+ //@csy
+ Ptr<BaseGameFeature::BaseGameFeatureUnit> defaultGameFeature;
};

//------------------------------------------------------------------------------


Saturday, March 7, 2009

Build Nebula3 on OS X

Here is description on building Nebula3 on OS X:

1) Check out Sep. Nebula3 from Nebula3 google code site. You shoud the svn link for "https://nebula3.googlecode.com/svn/branches/Porting" to get OS X ported stuff.
2) Next, You need CMake tool to build the Nebula3 stuff. You can download it from here. (Download Mac OSX Universal dmg file, mostly it works fine.)
3) Mount the downloaded dmg and install CMake tool.
4) Now, time to generate Xcode project file from CMake. It might be good to make seperate directory which contains all CMake generated build files. I created 'xcode' directory under 'code' directory so the directory is that - "$nebula3/code/xcode".
5) Open any terminal and move to the created 'xcode' directory.
6) Type the following "cmake -G Xcode ../" This makes all necessary Xcode project files under the 'xcode' directory।
7) Open 'Nebula3', created Xcode project file.
8) Finally, Build.

Wednesday, February 25, 2009

Nebula3 with wxWidget - #1

On VisualStudio, Nebula3 set up _fastcall for its calling convetion but wxWidget defaultly uses_cdecl for that. It might cause link error if both of setting is different.

So you should set up same calling convention to avoid the link error problem. (not sure the exact errors but it contains wxConsoleApp related unresovled link errors)