Jump to content

Calimaw

Members
  • Posts

    82
  • Joined

  • Last visited

Profile Information

  • Location
    Iowa, United States

Calimaw's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks, stuff is making a bit more sense every day
  2. I need a bit of help on how to create a player using GameLib and LEO. #include "gamelib.h" int main() { Game game; Engine engine; engine.Create(); game.Initialize( 1024, 768); Engine::SetAbstractPath( "D:/Program Files/LWSDK" ); Engine::SetFilters( 4, 1 ); Collisions::Set(); game.scene.LoadMap( "abstract::murk01.sbx" ); Camera cam( CREATENOW ); // Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) // We are not in focus! { // Render game.scene.Update(); game.scene.Render(); // Send to screen Engine::Flip(0); } } // Done return engine.Free(); }
  3. Calimaw

    Game Lib?

    It keeps throwing tantrums about not finding it. I have - Gamelib.rc Gamelib.cpp Gamelib.h Window.cpp Window.h Resource.h Gamelib.ico In LWSDK\CPP\GameLib, is that not correct?
  4. Calimaw

    Game Lib?

    Where does the gamelib.ico go?
  5. Calimaw

    Game Lib?

    What do you mean Character Set: Not Set? Could explain, or provide a small bit of code to load a sandbox? [EDIT] Found out what you meant, thanks
  6. Calimaw

    Game Lib?

    I've installed GLUT, but now I have other problems. Murk Project contains Murk.cpp (game), and Gamelib.cpp Additional Dependencies: opengl32.lib glu32.lib Additional Include Directories: "D:\Program Files\LWSDK\CPP;D:\Program Files\LWSDK\CPP\LEO;D:\Program Files\LWSDK\CPP\GameLib" 1>------ Build started: Project: Murk, Configuration: Debug Win32 ------ 1>Compiling... 1>Murk.cpp 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(5) : error C2065: 'TGame' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(5) : error C2146: syntax error : missing ';' before identifier 'game' 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(5) : error C2065: 'game' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(10) : error C2065: 'game' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(10) : error C2228: left of '.Initialize' must have class/struct/union 1> type is ''unknown-type'' 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(14) : error C2065: 'game' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(14) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(14) : error C2228: left of '.LoadMap' must have class/struct/union 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(23) : error C2065: 'game' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(23) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(23) : error C2228: left of '.Update' must have class/struct/union 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(24) : error C2065: 'game' : undeclared identifier 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(24) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' 1>e:\matt.matt-desktop\my documents\visual studio 2008\projects\murk\murk.cpp(24) : error C2228: left of '.Render' must have class/struct/union 1>Gamelib.cpp 1>LEO Leadwerk Engine Objects, version 2.3.1. 1>d:\program files\lwsdk\cpp\gamelib\window.cpp(42) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>d:\program files\lwsdk\cpp\gamelib\window.cpp(48) : error C2664: 'LoadImageW' : cannot convert parameter 2 from 'const str' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>d:\program files\lwsdk\cpp\gamelib\window.cpp(50) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>d:\program files\lwsdk\cpp\gamelib\window.cpp(56) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>Generating Code... 1>Build log was saved at "file://e:\Matt.MATT-DESKTOP\My Documents\Visual Studio 2008\Projects\Murk\Debug\BuildLog.htm" 1>Murk - 18 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== With game code of... #include "gamelib.h" int main() { TGame game; Engine engine; engine.Create(); game.Initialize( 800, 600 ); Engine::SetFilters(); Collisions::Set(); game.scene.LoadMap( "abstract::murk01.sbx" ); //Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) //We are not in focus! { // Render game.scene.Update(); game.scene.Render(); // Send to screen Engine::Flip(0); } } // Done return engine.Free(); }
  7. Calimaw

    Game Lib?

    d:\program files\lwsdk\cpp\gamelib\gamelib.h(11) : fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory What is this error? I've downloaded the gamelib.cpp and gamelib.h from the wiki, and put them into lwsdk\cpp\gamelib, then added them to the includes.
  8. Calimaw

    Game Lib?

    Is game lib current to 1.31? I'm using LEO, should I check it out?
  9. Thanks, I was looking for precisely that, Masterxilo! I'm going to be using CPP and LEO, as I can't easily remedy problems Im having with the C# wrapper since I'm a noob
  10. Any one please feel free to respond, I'm a big newb to C# and game programming, so any thoughts are helpful for me. I don't know the best way to do things so another perspective helps me make decisions
  11. Alright, got it. thanks Edit: I thought I might as this now, is every one else doing something similar for auto-building their scenes?
  12. I created a class file called SceneBuilder.cs which is where I want to place some functions for auto-building my scene based on entities it discovers and their Key values. using Leadwerks; using System; namespace LWTest01 { public class SceneBuilder { public Entity child; public String colorString; public Color color; public void Atmosphere(Scene inScene) { child = inScene.GetChild("atmosphere_1"); colorString = child.GetKey("fogcolor"); color = new Color(new float[] { float.Parse(colorString.Split(',')[0]) / 255, float.Parse(colorString.Split(',')[1]) / 255, float.Parse(colorString.Split(',')[2]) / 255, float.Parse(colorString.Split(',')[3]) / 255 }); Framework.Effects.DistanceFog.Color = color; } } } The above is the entire class file, but when I try to call it in my main with SceneBuilder.Atmosphere(); it will only allow me to put in SceneBuilder, as if it's a type. I'm almost certain I did something wrong with defining the class, and it thinks its a type or something, can some one explain to me how I can consolidate a series of functions in another file to keep my main clean?
  13. I have another strange problem as well; Vector3 waterPos = myScene.GetChild("waterplane_1").Position; Framework.Effects.Water.Height = waterPos.Y; Fluid.SetPlane(new Vector4(0, 1, 0, waterPos.Y), 0.0f); Is this not a correct way to set the fluid plane? My mesh which is parented to a physics box of 1, 1, 1 floats under the water, not near the top. Also, I keep getting an error when trying to use myMesh.Scale = new Vector3(1, 1, 1); just to make sure the visual mesh is the same as the body mesh. The error it throws is: A call to PInvoke function 'Leadwerks!Leadwerks.Core::ScaleEntity' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. in Entity.cs Core.ScaleEntity(this.Pointer, value.ToFloatArray(), 0);
  14. Where can I find an entities key name? For example the atmosphere entity does have a key with the name of "name" describing the name it was given in the editor, but I'm unable to discover the rest of its keys in order to use them in building a scene.
  15. Ah, never mind, for some reason it wasnt passing the correct location of the .mat file, solved for problems concerning the skybox in the editor.
×
×
  • Create New...