Jump to content

Calimaw

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by Calimaw

  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.
  16. Whats up with the editor not being able to render my sky? I select it like the default 'FullskiesBlueClear...' and it does a "hall of mirrors" no-draw effect. The *.mat file contains the following (it works correctly in the engine) texture0="abstract::sky.dds" clamp0=1, 1, 1 blend=0 depthmask=0 depthtest=1 depthmask=0 alphatest=0 overlay=0 zsort=0 castshadows=1 shader="abstract::skybox.vert","abstract::skybox.frag"
  17. Right now Im just playing with values and determining their ranges and setting stuff manually so I can better build a separate class to automatically create the scene for me, at which point I want to create a few entities for the sandbox editor so I can then add those to that class as well. I've not used C# in a long long time, nor did I use it very much when I did, so I'm learning syntax as well. I understand the logic at least
  18. Im using Framework.Effects.Water.Enabled and have set its position in the scene (havent built a loader to do it for me yet), problem is, I create a mesh, which I parent to a body, and this body would 'float', or what looked to be floating (bobbing up and down a bit) at a different location than the visual location of the water, so I assumed that was the fluid plane, which Im unable to quite figure out how to set its position correctly. My water plane is at 0, 28, 0. In addition to this, when I set the physics body (the one with the mesh attached to it) to myBody.CollisionType = 1; while myScene.CollisionType = 1; and Collisions.Set(1, 1, true); with a mass of any amount the body will drop down with gravity for a brief moment, then shoot off in an unlikely directly very quickly and vanish from sight.
  19. How do I set the fluid plane? I have a mesh parented to a body and its floating mid air, I assume thats because the fluid plane is assumed to be at that position, but Im having trouble figuring out how to format the values correctly for Core.SetFluidPlane.
  20. Thanks bro, I'm sorry I'm so ignorant, I really appreciate the help you're giving me, I'm learning C# as I do this as well and have very little experience with LW.
  21. Well, what Im trying to do is find the water plane in the scene, and then grab its position
  22. Cool, you can message me on aim as CalimawMAP or Yahoo! as Wamilac if you don't get a hold of me on the forum. Is there a list of all the commands any where? I'm trying to figure out how to get the position of entities in the sandbox, I.E. the water plane.
  23. @ ZioRed, Thanks a ton bro, thats just what I'm looking for! Let me know if you're needing any audio done for anything.
  24. I'm really not sure where to begin, so I may not even ask the right questions; please assume I know nothing, as that's probably the case. I'm wanting to start with getting an environment loaded from a sandbox map, including water and environment lights, textures ect, but I'm completely new to setting anything up to work with C#, the project configuration utility doesn't seem to have any templates for C#, which is confusing to me because I thought it was officially supported. If some one could take the time to help me set things up by provide an 'idiot tutorial' I would greatly appreciate it. In return if there are projects you may be working on that require sound effects and or music I am also available to provide my services; as I that is my forte. I'm attempting to pull together some very basic code to run an environment and populate it with my audio work.
  25. Yes Marleys Ghost, I'm wanting to use content and examples from previous versions, the problem is if I do a "clean install" with 2.28 after installing 2.23 then it removes all files in the SDK, it even states so. Regardless of some functions being broken with 2.23 code due to changes to 2.28 I'd still like to be able to use the assets, and fix those examples. The real issue is the lack of content in 2.28 and lack of examples. I don't have a way to learn and see stuff function. As I said earlier I do plan on updating to 2.3 when I need its features, but I dont see the need to purchase features I dont use until I require them. I'm sure if I knew more I'd be able to render a solution, but that's the problem, I'm not able to get results, so I'm unable to know what is correct and what is not. I'm not a well versed game programmer, the stuff I've done is more in the realm of hacking and data manipulation (think memory layer aimbot; no, I dont release them publicly, its for learning/challenge). I guess I'll have to spend the $50, which Im sure is worth it, and $50 isn't much, I just don't like paying for something more than once when it should have been honored the first time around.
×
×
  • Create New...