Crystal Space
Welcome, Guest. Please login or register.
April 16, 2014, 08:06:22 pm

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7582 Members
Latest Member: Diretz5
* Home Help Search Login Register
  Show Posts
Pages: 1 2 [3] 4 5
31  Crystal Space Project Development / Feature Requests / Re: Upcomming AutoLoader pluggin on: January 22, 2006, 10:46:50 pm
If i'm not mistaken, what is not thread safe about CS is the fact that it has no barriers for the both threads to try to access (look at or change) information in a certain part of the app.  The iAutoLoader would be given some form of callback to call when it is ok to access a certain resource.  Instead of having a mesh object just displayed on the screen as it is loaded, have it inserted into a buffer located within the engine (or related resource manager class).  The main thread would then have to call some sort of "ReadyResource()" function in the engine class that would move the resource from the buffer into the real mangaer class.
32  Crystal Space Project Development / Feature Requests / Re: Upcomming AutoLoader pluggin on: January 20, 2006, 11:46:12 pm
I've gathered my thoughts and it seems that I will be copy-pasting most of the loading functions from the csLoader class and inserting calls in them periodically to update the progress.  In effect, I will be re-doing the csLoader class with a few extra features.  Please vote on the above poll.  Any ideas and suggestions are welcome.
33  Crystal Space Development / General Crystal Space Discussion / Re: Question about crystalspace on: January 20, 2006, 03:45:01 pm
Look at the "other projects using CS" link on the side of the main page.  There is already a fps in development with CS: Vital State - Reality Check.
34  Crystal Space Development / General Crystal Space Discussion / Re: features of CS on: January 20, 2006, 03:42:29 pm
Crystal Space is the most feature-full of any and all open source engines, and is commonly ranked second to one called ogre3d, and that's only because ogre3d is much easier to start out with than Crystal Space, even though CS has more features.  Third on the list is Irrilect(sp?)  As for comercial ones, the best(for a modest budget) is Torque.
35  Crystal Space Project Development / Feature Requests / Upcomming AutoLoader pluggin on: January 20, 2006, 02:33:14 pm
Hi all,
I'm currently working on a pluggin called iAutoLoader, which will serve as a full threaded load pluggin, allowing the main thread to check up on the progress of the load (the overall progress, and the file progress).  I looked through the current pluggins for CS, and it seemed that a class like this one is sorely needed.  The user would add several files to the load stack, via the AddToLoad function, and then call the StartLoad function to start the load of those objects in a new thread.  I am planning to submit this code back to the community, which brings me to my question:  are there any comments, questions, or requests for the system?  FYI, I am hoping to release it before March of this year (I am still in school, and can't devote all of my time to this project.)

Thanks in advance
36  Crystal Space Development / Support / Re: Compile Errors on: January 19, 2006, 04:23:10 am
For future reference - there's really no point in putting that small of text file on "file factory" - and I seem to not be able to access it without paying a buck.  Just put an excerpt or the important parts in a code block in your post.  Beyond that, your errors seem to be pretty similar to some of mine.  Make sure that the win32 external libraries (available on the download page) are properly installed.  That was my problem. 
37  Crystal Space Development / Support / Display error on: January 19, 2006, 04:08:23 am
So far, the operational (code that actually does something except initialize stuff) code in my game is as follows:
Code:
void TestState::Start()
{
manager->GetEngine()->SetLightingCacheMode(0);
camera = manager->GetView()->GetCamera();
room = manager->GetEngine()->CreateSector ("room");
camera->SetSector(room);
walls = manager->GetEngine()->CreateSectorWallsMesh (room, "walls");

csRef<iLight> light;
iLightList* ll = room->GetLights ();
light = manager->GetEngine()->CreateLight (0, csVector3 (3, 0, 0), 8, csColor (1, 0, 0));
ll->Add (light);
light = manager->GetEngine()->CreateLight (0, csVector3 (-3, 0,  0), 8, csColor (0, 0, 1));
ll->Add (light);
light = manager->GetEngine()->CreateLight (0, csVector3 (0, 0, 3), 8, csColor (0, 1, 0));
ll->Add (light);
light = manager->GetEngine()->CreateLight (0, csVector3 (0, -3, 0), 8, csColor (1, 1, 0));
ll->Add (light);

manager->GetEngine()->Prepare();
manager->GetEngine()->SetAmbientLight(csColor(127, 256, 127));
camera->GetTransform().SetOrigin(csVector3(0, 0, 0));
}

void TestState::ProcessFrame()
{
if (!manager->GetGraphics3d()->BeginDraw (manager->GetEngine()->GetBeginDrawFlags () | CSDRAW_3DGRAPHICS))
return;

manager->GetView()->Draw();
}
void TestState::FinishFrame()
{
manager->GetGraphics3d()->FinishDraw ();
manager->GetGraphics3d()->Print (0);
}

I made sure that everything is being called at the apropriot(sp?) times, and that every one of the variables is initialized properly, but when I run it, I get nothing more than a black screen.  If it helps, here is the rest of my initialization code:
Code:
bool GameManager::OnInitialize(int argc, char* argv[])
{
if (!celInitializer::RequestPlugins(GetObjectRegistry(),
CS_REQUEST_VFS,
CS_REQUEST_OPENGL3D,
CS_REQUEST_ENGINE,
CS_REQUEST_FONTSERVER,
CS_REQUEST_IMAGELOADER,
CS_REQUEST_LEVELLOADER,
CS_REQUEST_REPORTER,
CS_REQUEST_REPORTERLISTENER,
CS_REQUEST_PLUGIN ("crystalspace.dynamics.ode", iDynamics),
CS_REQUEST_END))
return ReportError("Failed to initialize plugins!");

if (!RegisterQueue(GetObjectRegistry()))
return ReportError("Failed to set up event handler!");

return true;
}
bool GameManager::Application()
{
if (!OpenApplication(GetObjectRegistry()))
return ReportError("Error opening system!");

g3d = CS_QUERY_REGISTRY(GetObjectRegistry(), iGraphics3D);
if (!g3d) return ReportError("Failed to locate 3D renderer!");

g2d = CS_QUERY_REGISTRY(GetObjectRegistry(), iGraphics2D);
if (!g2d) return ReportError("Failed to locate 2D renderer!");

engine = CS_QUERY_REGISTRY(GetObjectRegistry(), iEngine);
if (!engine) return ReportError("Failed to locate 3D engine!");

view.AttachNew(new csView (engine, g3d));
iGraphics2D* g2d = g3d->GetDriver2D ();

// We use the full window to draw the world.
view->SetRectangle (0, 0, g2d->GetWidth (), g2d->GetHeight ());

SetupStates();

Run();

return true;
}


void GameManager::SetupStates()
{
states.Push(new TestState(this));
states[0]->Start();
curState = 0;
}

I'm running wxp pro sp2 and the pseudo-stable cs and cel releases.

thanks in advance.
38  Crystal Space Development / General Crystal Space Discussion / Re: Is this game idea even possible??? Planet with millions of polygons on: January 11, 2006, 12:40:15 am
There is... the one I know is called x-plane (x-plane.com), but the data that it uses is a total of about 10000 files and just under 10 gigs.  Another, more practicle method, is simply store the important stuff and a random seed that can be used to calculate the rest of the stuff.  Just store 1/100 of what youre planning as far as verticies go, and also store a random seed along with each of those.  then you can use the random seed to recreate the detailes only when required.
39  Crystal Space Development / General Crystal Space Discussion / Re: features of CS on: January 04, 2006, 04:09:47 am
the number of polygons it can display will depend on the hardware.  It might be possible to write a wrapper-framework for cs for C# or delphi, but none exists now.  I don't know much about QT-GUI, but from the short blurb I read about it, integrating it should be possible.  CS comes with project files for VS 6-7.1, and the external libraries can be installed with support for VS, but there are no wizards or such.  Other than that, it has all of those features.
40  Crystal Space Development / Support / transfering csRef objects on: December 29, 2005, 07:43:08 pm
In my project, I have a class called GameManager that holds the references to the engine, view, and anything else that might be needed.  After the initialization is done (by GameManager), it hands over control to the respective state class, each of which represents something like the loading state or playing state of the game.  The state class then calls the manager->GetEngine() (manager is a member of the states, initialized with a paramater in the initialization function) to get the csRef<iEngine> object, or calls the other functions (GetView, etc.) to get their respective objects.  This brings me to my question:

Why does this work (this is in the GameManager header):
Code:
inline csRef<iEngine> GetEngine(){return engine;}
inline csRef<iLoader> GetLoader(){return loader;}
//inline csRef<iGraphics3D> GetGraphics3d(){return g2d;}
//inline csRef<iGraphics2D> GetGraphics2d(){return g3d;}
inline csRef<iKeyboardDriver> GetKeyboardDriver(){return kbd;}
inline csRef<iMouseDriver> GetMouseDriver(){return md;}
inline csRef<iVirtualClock> GetVirtualClock(){return vc;}
inline csRef<iView> GetView(){return view;}
inline csRef<iCollideSystem> GetCollideSystem(){return cdsys;}
inline csRef<iDynamics> GetDynamics(){return dyn;}
inline csRef<iDynamicSystem> GetDynamicsSystem(){return dynSys;}

While this produces errors in ref.h:
Code:
inline csRef<iEngine> GetEngine(){return engine;}
inline csRef<iLoader> GetLoader(){return loader;}
inline csRef<iGraphics3D> GetGraphics3d(){return g2d;}
inline csRef<iGraphics2D> GetGraphics2d(){return g3d;}
inline csRef<iKeyboardDriver> GetKeyboardDriver(){return kbd;}
inline csRef<iMouseDriver> GetMouseDriver(){return md;}
inline csRef<iVirtualClock> GetVirtualClock(){return vc;}
inline csRef<iView> GetView(){return view;}
inline csRef<iCollideSystem> GetCollideSystem(){return cdsys;}
inline csRef<iDynamics> GetDynamics(){return dyn;}
inline csRef<iDynamicSystem> GetDynamicsSystem(){return dynSys;}

These are the errors, if it helps:

c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics2D *' to 'iGraphics3D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics3D
        ]
c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics3D *' to 'iGraphics2D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics2D
        ]
c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics2D *' to 'iGraphics3D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics3D
        ]
c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics3D *' to 'iGraphics2D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics2D
        ]
c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics2D *' to 'iGraphics3D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics3D
        ]
c:\Libs\CS\include\csutil\ref.h(167): error C2440: 'initializing' : cannot convert from 'iGraphics3D *' to 'iGraphics2D *'
c:\Libs\CS\include\csutil\ref.h(167): error C2439: 'csRef<T>::obj' : member could not be initialized
        with
        [
            T=iGraphics2D
        ]

thanks in advance.
41  Crystal Space Development / Support / Re: About SetAnimAction and SetAnimCycle on: December 28, 2005, 09:59:25 pm
Did you export more than 1 animation?  Was there a right foot animation and a right foot-left foot animation?  That is what you need to make him (or her?) continue walking.
42  Crystal Space Development / Support / Foliage Generator on: December 28, 2005, 09:33:57 pm
I was reading the short blurb about the generator on the home page, and I was wondering:  Does it actually dynamically generate meshes for plants and bolders like the source forge project OpenTree, or does it simply take input of pre-made meshes and then randomly places them over the surface of the terrain?
43  Crystal Space Project Development / Feature Requests / Re: Non-jerky terrain on: December 28, 2005, 09:10:07 pm
But when terrain is really big and detailed, it is significantly constly on current graphics cards to extend the lod distance significantly enough to make it smooth, and nearly unnoticable, supposing it is fairly mountainous.
44  Crystal Space Development / Support / Re: ProcessFrame error on: December 28, 2005, 07:28:11 pm
Here is the code.  dont worry about the states array object.  It shouldn't make any difference.

Code:
// Aliendom.cpp : Defines the entry point for the console application.
//
#include "aliendom.h"
CS_IMPLEMENT_APPLICATION
#pragma disable(LNK4099)

bool GameManager::HandleEvent(iEvent& ev)
{
return true;
}

void GameManager::ProcessFrame()
{
if(curState < states.GetSize())
states[curState]->ProcessFrame();
}

void GameManager::FinishFrame()
{
if(curState < states.GetSize())
states[curState]->FinishFrame();
}

bool GameManager::OnInitialize(int argc, char* argv[])
{
if (!celInitializer::RequestPlugins(GetObjectRegistry(),
CS_REQUEST_VFS,
CS_REQUEST_OPENGL3D,
CS_REQUEST_ENGINE,
CS_REQUEST_FONTSERVER,
CS_REQUEST_IMAGELOADER,
CS_REQUEST_LEVELLOADER,
CS_REQUEST_REPORTER,
CS_REQUEST_REPORTERLISTENER,
CS_REQUEST_PLUGIN ("crystalspace.dynamics.ode", iDynamics),
CS_REQUEST_END))
return ReportError("Failed to initialize plugins!");

if (!RegisterQueue(GetObjectRegistry()))
return ReportError("Failed to set up event handler!");

return true;
}
bool GameManager::Application()
{
if (!OpenApplication(GetObjectRegistry()))
return ReportError("Error opening system!");

SetupStates();

g3d = CS_QUERY_REGISTRY(GetObjectRegistry(), iGraphics3D);
if (!g3d) return ReportError("Failed to locate 3D renderer!");

g2d = CS_QUERY_REGISTRY(GetObjectRegistry(), iGraphics2D);
if (!g2d) return ReportError("Failed to locate 2D renderer!");

engine = CS_QUERY_REGISTRY(GetObjectRegistry(), iEngine);
if (!engine) return ReportError("Failed to locate 3D engine!");

view.AttachNew(new csView (engine, g3d));
iGraphics2D* g2d = g3d->GetDriver2D ();

// We use the full window to draw the world.
view->SetRectangle (0, 0, g2d->GetWidth (), g2d->GetHeight ());

Run();

return true;
}


void GameManager::SetupStates()
{
states.Push(new TestState(this));
states[0]->Start();
curState = 0;
}
int main(int argc, char* argv[])
{
return csApplicationRunner<GameManager>::Run (argc, argv);
}

45  Crystal Space Development / Support / ProcessFrame error on: December 27, 2005, 08:08:26 pm
Hi,
I have almost directly copied the code from simple1, and I am having a problem with ProcessFrame, as overloaded in GameManager(my class, inheriting from csApplicationFramework and csBaseEventHandler) from csBaseEventHandler.  It compiles fine, and when I run it, I get a blank screen.  I set several breakpoints, and I found that my ProcessFrame function is never getting called!  Why might this be?  I am using the pseudo-stable cs release and vs.net 7.1. 
Thanks in advance.
Pages: 1 2 [3] 4 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.153 seconds with 16 queries.