Crystal Space
Welcome, Guest. Please login or register.
December 20, 2014, 09:09:15 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9295 Members
Latest Member: Marioibuch
* Home Help Search Login Register
  Show Posts
Pages: 1 [2] 3 4 ... 7
16  Crystal Space Development / General Crystal Space Discussion / How to make a 2D game? on: April 29, 2006, 07:35:00 am
I need to make a small 2D game. So I don't need iGraphics3D. But how will I create iView? It needs csView which is initialized with iObjectRegistry and iGraphics3D.
Thanks.
17  Crystal Space Development / General Crystal Space Discussion / Re: Minimal code to use Emitter, Fountain, Fire, Snow, Rain, etc. mesh objects? on: April 18, 2006, 11:34:19 am
I've made
Code:
rain_state->SetMaterialWrapper (rain_tex_mw);
and even tried
Code:
rain_state->SetColor (csColor (0.5, 0.5, 0.8));
but still no rain (
18  Crystal Space Development / General Crystal Space Discussion / Shaders and Cg on: April 18, 2006, 10:18:37 am
What shader version does Cg-1.4 support?
19  Crystal Space Development / General Crystal Space Discussion / Re: Minimal code to use Emitter, Fountain, Fire, Snow, Rain, etc. mesh objects? on: April 18, 2006, 10:13:05 am
Thanks, I've made:
Code:
csRef<iRainState> rain_state = scfQueryInterface<iRainState> (rain_itself->GetMeshObject ());
all compiles ok, but I can't see any rain (
What's wrong?

Thanks.
20  Crystal Space Development / General Crystal Space Discussion / Shadows on: April 16, 2006, 03:12:12 pm
When I move a thing mesh object shadows are not recalculated.
I was told to use stencil shadows, but I have no hardware shaders, so isotest doesn't work for me(
What shoud I do?

Thanks.
21  Crystal Space Development / General Crystal Space Discussion / Re: Minimal code to use Emitter, Fountain, Fire, Snow, Rain, etc. mesh objects? on: April 16, 2006, 08:45:23 am
Code:
- - - -
    if (!loader->LoadTexture ("rain_tex", "/lib/std/spark.png"))
        ReportError ("Failed to load \"rain\" texture");
    csRef<iMaterialWrapper> rain_tex_mw = engine->GetMaterialList ()->FindByName (
            "rain_tex");

    csRef<iMeshFactoryWrapper> rain_mfw = engine->CreateMeshFactory (
            "crystalspace.mesh.object.rain", "rain");
    if (!rain_mfw)
        cout << "no rain_mfw initialized!\n";
    csRef<iMeshWrapper> rain_itself = engine->CreateMeshWrapper (rain_mfw, "rain_itself",
            0, csVector3 (0, 0, 0));
    rain_itself->SetZBufMode (CS_ZBUF_TEST);
    cout << "aaa\n";
    csRef<iRainState> rain_state = csQueryRegistry<iRainState> (GetObjectRegistry ());
    if (!rain_state)
        cout << "no rain_state!\n";
    rain_itself->GetMeshObject ()->SetMaterialWrapper (rain_tex_mw);
    rain_state->SetMixMode (CS_FX_ADD);
    rain_itself->GetMeshObject ()->SetColor (csColor (0.5, 0.5, 0.8));
    rain_state->SetParticleCount (100);
    rain_state->SetDropSize (1, 1);
    rain_state->SetLighting (false);
    rain_state->SetBox (csVector3 (-5, 0, -5), csVector3 (5, 10, 5));
    rain_state->SetFallSpeed (csVector3 (0, -1, 0));
- - - -
So the app does say "no rain_state!". Why no rain_state? What am I missing?

Thanks.
22  Crystal Space Development / General Crystal Space Discussion / Re: How to rotate an object around itself? on: April 15, 2006, 05:28:55 pm
Thanks. Now all works Smiley
Here's a "full" code if anyone is interested:
Code:
- - - -
    // It's training in using thing mesh obj
    csRef<iMeshWrapper> cube = engine->CreateThingMesh (room, "cube");
    csRef<iMeshObject> cube_object = cube->GetMeshObject ();
    csRef<iMeshObjectFactory> cube_factory = cube_object->GetFactory ();
    csRef<iThingFactoryState> cube_state = scfQueryInterface<iThingFactoryState> (
            cube_factory);

    // create a cube at (0, 0, 0) local position, then we'll move it to the necessary
    // place
    //cube_state->AddOutsideBox (csVector3 (7, 0, 7), csVector3 (9, 3, 9));
    cube_state->AddOutsideBox (csVector3 (-1, -1.5, -1), csVector3 (1, 1.5, 1));

    cube_state->SetPolygonMaterial (csPolygonRange (1, 5), cube_tex_wall_mw);
    cube_state->SetPolygonTextureMapping (csPolygonRange (1, 5), 1);

    cube_state->SetPolygonMaterial (csPolygonRange (0, 0), cube_tex_mw);
    cube_state->SetPolygonTextureMapping (csPolygonRange (0, 0),
            csVector2 (0, 0),
            csVector2 (1, 0),
            csVector2 (1, 1)
            );

    // It's training in moving a mesh

    csRef<iMovable> cube_movable = cube->GetMovable ();
    cube_movable->SetPosition (csVector3 (7, 1.5, 7));
    csVector3 xyz = cube_movable->GetFullPosition ();
    cout << "xyz = (" << xyz.x << ", " << xyz.y << ", " << xyz.z << ")" << endl;
    cube_movable->GetTransform ().RotateThis (csVector3 (0, 1, 0), 45 * PI / 180 );
    cube_movable->UpdateMove ();
- - - -
23  Crystal Space Development / General Crystal Space Discussion / Re: How to rotate an object around itself? on: April 15, 2006, 05:06:35 pm
But it *is* located in the center of the world, isn't it?
So I need to create all objects in the center of the world and then move it?
24  Crystal Space Development / General Crystal Space Discussion / Re: How to rotate an object around itself? on: April 15, 2006, 05:00:42 pm
I should first make a box at 0,0,0; rotate it; and eventually move to the corner? Well, it seems very stupid.
Is there any way to rotate around itself?
Or am I misunderstanding you?

Thanks.
25  Crystal Space Development / General Crystal Space Discussion / Re: How to rotate an object around itself? on: April 15, 2006, 04:11:21 pm
What do you mean saying centered around 0, 0, 0? GetFullPosition () returns 0, 0, 0.
RotateOther, as described in the first message, doesn't work too.

Thanks.
26  Crystal Space Development / General Crystal Space Discussion / Re: How to rotate an object around itself? on: April 15, 2006, 03:43:29 pm
I have:
Code:
- - - -
    csRef<iMeshWrapper> cube = engine->CreateThingMesh (room, "cube");
    csRef<iMeshObject> cube_object = cube->GetMeshObject ();
    csRef<iMeshObjectFactory> cube_factory = cube_object->GetFactory ();
    csRef<iThingFactoryState> cube_state = scfQueryInterface<iThingFactoryState> (
            cube_factory);

    cube_state->AddOutsideBox (csVector3 (7, 0, 7), csVector3 (9, 3, 9));
- - - -
    csRef<iMovable> cube_movable = cube->GetMovable ();
    csVector3 xyz = cube_movable->GetFullPosition ();
    cout << "xyz = (" << xyz.x << ", " << xyz.y << ", " << xyz.z << ")" << endl;
    cube_movable->GetTransform ().RotateThis (csVector3 (0, 1, 0), 45 * PI / 180 );
    cube_movable->UpdateMove ();
- - - -
Before-Rotate-This Screenshot
After-Rotate-This Screenshot
So how to rotate the object around itself?

Thanks.
27  Crystal Space Development / General Crystal Space Discussion / Does CS map format suits the needs of OSRPG map? Have a look, please. on: April 11, 2006, 04:41:43 pm
Global map is created with a very low detalization intended to be shown from a bird-flight altitude. Programmers in their turn implement a dynamic detalization (using random) of the global map (dynamic, because in a detalized view it'll occupy just an anormous amount of memory). Then, according to this random map, designers create a set of "patches" which will be applied in order to make map view detalization better.
After leaving a location, player enters that "dynamic" global map, and there appears a globe icon at the screen. Starting from this moment player is able to switch to a bird-flight altitude view at any moment (moving on the map with the help of point&click). When using this mode (bird-mode, let's say=)) time starts to run faster which leads to a faster movement from one place to another. At any moment player can return back to a pedestrian view, but in this case the speed of his movement comes back to normal. Also, player will be returned to pedestrian view when meeting a NPC (like Fallout).
An example of such a movement is an Arcanum game where you're able, if you wish, travel all the planet by feet.
28  Crystal Space Development / General Crystal Space Discussion / AWS on: April 11, 2006, 06:03:24 am
I have this code:
Code:
- - - -
    aws->SetupCanvas (0, g2d, g3d);
    aws->GetPrefMgr ()->Load ("/aws/awstest.def");
    aws->GetPrefMgr ()->SelectDefaultSkin ("Normal Windows");
    csRef<iAwsWindow> test1 = aws->CreateWindowFrom ("Form1");
    if (test1)
        test1->Show ();
    //aws->CaptureMouse (aws->ComponentAt (10, 10));
- - - -
When I run the app I get these errors:
Code:
- - - -
        loading definitions file /aws/awstest.def...
aws:  Couldn't find sink 'testButtonSink'.
aws:  Couldn't find sink 'testButtonSink'.
aws:  Couldn't find sink 'testButtonSink'.
aws:  Couldn't find sink 'testButtonSink'.
aws:  Couldn't find sink 'testButtonSink'.
aws:  Couldn't find sink 'testButtonSink'.
        load successful (5 windows, 1 skins loaded.)
aws-debug: setting up global AWS palette...
aws-debug: finished palette setup.
- - - -
How to fix it?

Thanks.
29  Crystal Space Development / General Crystal Space Discussion / Best file format for models, maps, skeletal animation, etc. on: April 05, 2006, 12:15:25 pm
What do you advise?
We want to use X3D.

Thanks.
30  Crystal Space Development / Support / Current cal3d version support? on: April 05, 2006, 11:27:22 am
What cal3d version does cs-pseudo-stable-2006-01-27 support?

Thanks.
Pages: 1 [2] 3 4 ... 7
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 6.219 seconds with 15 queries.