Crystal Space
Welcome, Guest. Please login or register.
September 23, 2014, 11:30:33 am

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2051 Topics by 8504 Members
Latest Member: Colleencoffey
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Associate Projects / CEL Discussion / Dynamic Heightmap Loading on: March 22, 2009, 01:27:05 am
I'm currently working on an isometric strategy game.  The "level" consists of basically two parts - a two-dimensional heightmap, and a two-dimensional character grid.  These two parts correspond directly, each being a two-dimensional array of dimensions AxB.  The heightmap is the basic geometry of the level, while the character grid dictates what type of thing each grid unit is (grass, sand, water, etc).

Now, here's where I'm having trouble: both the heightmap and grid change quite frequently, and tend to be rather large dimensionally (128 x 128 needs to run smoothly).  In my original implementation, I had a different mesh for each grid type, and would create an entity for each node in the grid, like so:

   
for(x=0; x<gameMap.width; x++)
{
   for(y=0; y<gameMap.height; y++)
   {
      char buffer[12];
      sprintf(buffer, "res%.3i%.3i", x, y);

      celentity=pl->CreateEntity(buffer, bl, "level_behave", "pcobject.mesh", CEL_PROPCLASS_END);
      pcmesh=CEL_QUERY_PROPCLASS_ENT(celentity, iPcMesh);
      pcmesh->SetPath("cellib/lev");
      pcmesh->SetMesh("genFloor", "floor");
      if(!pcmesh->GetMesh())
      {
         return ReportError("Error loading mesh...");
      }
      zonemgr->PointMesh(buffer, "main", "Origin");
      pcmesh->MoveMesh((iSector*)(0), csVector3(x, gameMap.heightmap
  • [y], y));
   }
}


This achieves the desired result in that I have a game grid that I can modify on the fly, but framerate leaves quite a bit to be desired.  My suspicion is that there's a much more efficient way to do this with static geometry that gets recompiled whenever a change occurs, but I'm a little stuck as to how to begin that, or if that's even a good idea.

Ideas?  Suggestions?  Links?  Anything helps.
2  Associate Projects / CEL Discussion / Re: Nettest Troubles on: March 22, 2009, 01:10:52 am
Very helpful, thanks!
3  Associate Projects / CEL Discussion / Nettest Troubles on: March 17, 2009, 10:39:02 pm
Hello all,

I just compiled CEL v1.4 and everything looks good.  All the demos run finely except for one - nettest.  When I run nettest, I'm met with the following:
During initialization:

crystalspace.pluginmgr.loadplugin:
could not load plugin 'cel.network.tcp'


Then, as the app is launching:

Fatal Error!
Network test: CEL network layer missing!


The plugins\network\tcp folder contains the cpps and headers, as well as tcpnetwork.csplugin, whcih looks like the plugin to me.  However, it doesn't seem to have a project file.  I'm fairly new with CEL, but I'm guessing the actual compiled plugins are the files at the root called addon_cellgraph.dll and so forth.  Was there ever an MSVC 9 project for the tcp network plugin?  Should it need one?  Do I need to compile using MSys or something different instead?

Any ideas why it can't find the plugin?  I'm assuming that's what causes the error, correct me if I'm wrong...


4  Miscellaneous / Article/Tutorial Discussion / Basic Compiling on: March 17, 2009, 08:11:39 pm
Hey everybody,

I've had a very difficult time getting CS and CEL to compile and play nice together, so when I finally got things working I wrote up a quick synopsis of all the things I had to do  to make it work properly.  I thought to myself, "Surely this is something I should share with the CS community so that others who follow this path need not search so long and hard for answers."  So anyway, here it is:

Notes on building crystal space:
1) Checkout stable CS (v1.4 currently) from the SVN repo
   SVN URL: https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.4
   (See notes on using Subversion - I like TortoiseSVN)
2) Set up the CRYSTAL environment variable to point to the location of the CS source
   In Windows, right click on My Computer, go to Properties->Advanced->Environment Variables, then add CRYSTAL with the location of your Crystal Space files (Ex: C:\CS)
3) Download MSVC 9 Express and install it
4) Download Windows Server 2003 Platform SDK and install it
5) Add Platform SDK dirs to MSVC under options->projects and solutions
   Executables: SDK_Dir/Bin
   Includes: SDK_Dir/Include
   Libraries: SDK_Dir/Lib
   Note: You'll need to fill in your own path where SDK_Dir is
6) Download cs-win32libs and install it
   URL: http://www.crystalspace3d.org/downloads/cs-win32libs/
7) Open crystal space .sln file
Cool Build solution

Building CEL:
1) Checkout stable CEL (currently v1.4) from the SVN repo
   URL: https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.4
2) Open CEL .sln file
3) Build solution
4) Move appropriate crystal space libs for running example apps (If an app needs a library, it will complain)

I hope this is helpful!
Pages: [1]
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.861 seconds with 17 queries.