Argorius Posted December 16, 2009 Share Posted December 16, 2009 Is GameLib fully functional with 2.30 or do I have to tweak something to make it work properly? I have 2.30 installed and followed the Power tutorial from the Wiki. If I run it, it actually works (except my cobblestone is bright red but if I replace it with a different texture, it is fine). Also, the main map from the tutorial is all messed up if I load it in the Editor (the light is way bright and makes everything looks white etc.) However, if I take the exact code from the tutorial and try to load a simple map with pretty much nothing on it that I made myself then the program doesnt show any errors but wont compile and crashes. If I remove the mouselook function call then it works (but with no mouselook of course. I am probably missing something major but I figured I'd ask if it is all fully functional with 2.3 first or if I need to do something special first... This is the code: // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "gamelib.h" #include "leo.h" using namespace LEO ; int main( int argc, char** argv ) { TGame game; Engine engine; engine.Create(); game.Initialize( 800, 500 ); Engine::SetFilters(); ::Collisions(); game.scene.LoadMap( "abstract::gamelib.sbx" ); //game.scene.SetCurrentPlayer("info_playerstart"); // Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) // We are not in focus! { // Render game.scene.Update(); game.MouseLook(game.scene.cam); game.KeyboardMove(); game.PositionPlayerModel(); game.PositionCamera(); game.scene.Render(); // Send to screen Engine::Flip(0) ; } } // Done return engine.Free() ; } Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
Canardia Posted December 16, 2009 Share Posted December 16, 2009 The map from the Power Tutorial works fine for me with GameLib with LE 2.3. There might be some issues with the LoadMap command since it was mainly developed with LE 2.28, but I don't know of any bugs at the moment. The mouselook is supposed to crash if no player entity is found in the map and if you don't set the player in code (like you commented the line out), I could add somekind of checking to it Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Argorius Posted December 16, 2009 Author Share Posted December 16, 2009 ahh - Thanks for the help...if I add an info_playerstart node to the map and uncomment that playerstart piece of code - then it should work? Does it have to be a playerstart node from 2.28? I think I used one from 2.20 or so and had the playerstart uncommented and it still crashed. If I look at the black window that comes up - it seems like it crashes while it is doing some shader stuff sometimes. I have the normal 2.30 shaders - I assume that is correct? Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
Canardia Posted December 16, 2009 Share Posted December 16, 2009 You can see in the engine.log if there are any errors while loading the game. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Argorius Posted December 16, 2009 Author Share Posted December 16, 2009 You can see in the engine.log if there are any errors while loading the game. I attached a screenshot of what the main.sbx from the power tutorial looks like in the 2.3 Editor. Turns out, if I replace the cobblestone with soemthign else - it is still red. I can mess around with the lighting and get it to look more normal but that shouldn't be, right? Any ideas of what is wrong? Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
Canardia Posted December 16, 2009 Share Posted December 16, 2009 Maybe you forgot to update some files, make sure you have the newest framewerk files, newest shaders.pak, newest graphics card drivers. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Niosop Posted December 16, 2009 Share Posted December 16, 2009 Try turning off HDR and Bloom? Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Argorius Posted December 17, 2009 Author Share Posted December 17, 2009 HDR and Bloom - as well as all the other fancy options are off now - it looks different but not better. I pretty much just installed 2.30 into a clean directory - kept hitting update until it said there were none. yesterday I forced an update to completion again. That should mean that I have the current shaders.pak and framewerk files, right? I also got new nvidia drivers a few days ago for my video card trying to fix this. Any other ideas? I am puzzled - I have been trying this for days and searching both forums. Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
macklebee Posted December 17, 2009 Share Posted December 17, 2009 what are your computer specs... it would help if people started posted these specs as their signature... this used to be standard on the old forum Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Argorius Posted December 17, 2009 Author Share Posted December 17, 2009 Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 I put it in my sig - thanks for the reminder. I solved the initial problem I think - now I can load my own maps (as of yet without water and sky) and the program runs. The issue was that I called info_playerstart and the gmf file that I used was also called info_playerstart. However, in the editor when I placed the playerstart onto the map - it named it playerstart_1. That gave the issue apparently and now if I call playerstart_1 instead - it works. The gamelib map, however, is still all messed up (same with the gamelib test.sbx maps - they are the same way except they aren't red). At least some progress haha! Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
Argorius Posted December 18, 2009 Author Share Posted December 18, 2009 Another question about GameLib I tried to use the DrawShadowText function but it keeps saying that: 1>.\main.cpp(196) : error C2039: 'DrawShadowText' : is not a member of 'leadwerks::Renderer' 1> c:\program files\leadwerks engine sdk\cpp\renderer.h(20) : see declaration of 'leadwerks::Renderer' 1>Build log was saved at "file://c:\Documents and Settings\The Squid\Desktop\GameLib\source\Release\BuildLog.htm" 1>letest - 27 error(s), 0 warning(s) If I look at the sln project for the gamelib demo (if I hit the exe, the demo works) and try to compile it...it gives me the above error on everything that uses DrawShadowText Do I need to do something with the Renderer.h or cpp file? Quote Windows XP Home Edition Service Pack 3/ Intel Q9450 @ 2.67GHz / 3.5GB DDR3 SDRAM / GeForce 8800 GTS 512 Link to comment Share on other sites More sharing options...
Canardia Posted December 19, 2009 Share Posted December 19, 2009 DrawShadowText is a standalone function since Framewerk 1.03. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Davaris Posted December 20, 2009 Share Posted December 20, 2009 I just got Gamelib to compile and when I tried to load the new deserthighway.sbx, it exited without displaying the map. When I looked at the engine.txt file I found this: Error: Shader file "abstract::postfilter_adjust.frag" not found. I also tried: terrain_arctic.sbx and tunnels.sbx and got the same message. The editor loads them fine though. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Canardia Posted December 20, 2009 Share Posted December 20, 2009 You need to run the updater, Framewerk C++ was changed yesterday. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Davaris Posted December 20, 2009 Share Posted December 20, 2009 Thanks I just ran it and it loads now. I noticed on exit from loading the maps, I am getting this message now: Null framewerk. I am also getting the red markings a previous poster mentioned with the tunnels.sbx. The editor displays it perfectly though. Edit: All the files in directory I am running from are from the latest update. I found these messages in the Editor.txt Warning: Uniform "saturation" does not exist in shader. Warning: Uniform "brightness" does not exist in shader. Warning: Uniform "contrast" does not exist in shader. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Canardia Posted December 20, 2009 Share Posted December 20, 2009 The "Null Framewerk" message comes probably because I need to publish the framewerk object to LUA in GameLib. The shader errors might be because you didn't use the latest shaders.pak. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Davaris Posted December 20, 2009 Share Posted December 20, 2009 I just checked the shaders pack and it is the up to date one. This is the code I ran: #include "gamelib.h" #include "leo.h" using namespace LEO ; int main( int argn, char* argv[] ) { TGame game; Engine engine; engine.Create(); game.Initialize (800,500); Engine::SetFilters(); ::Collisions(); game.scene.LoadMap("abstract::tunnels.sbx"); //game.scene.LoadMap("abstract::deserthighway.sbx"); //game.scene.LoadMap("abstract::terrain_arctic.sbx"); //game.scene.LoadMap("abstract::train.sbx"); 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(); } } return engine.Free(); } This is what Engine.txt said about my card: OpenGL Version: 3.2.0GLSL Version: 1.50 NVIDIA via Cg compiler Render device: GeForce 9800 GTX/9800 GTX+/PCI/SSE2 Vendor: NVIDIA Corporation DrawBuffers2 supported: 1 32 texture units supported. GPU instancing supported: 1 Max batch size: 1024 Shader model 4.0 supported: 1 Conditional render supported: 0 Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Canardia Posted December 20, 2009 Share Posted December 20, 2009 I get those warnings in shaders.pak too, but everything seems to work. The only change I had to do in gamelib so far, was to add the skybox loader for Editor: (after the block with if(ek=="0")) ek=GetEntityKey(e,"skymaterial","nothing"); if(ek!="nothing") { GetFramewerk().GetRenderer().SetSkybox(LoadMaterial((str)string("abstract::"+ek).c_str())); } Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Canardia Posted December 20, 2009 Share Posted December 20, 2009 There were more things not working with Editor created scenes in gamelib. I have fixed so far skybox, water, sounds. Testing emitters now. Gamelib still supports 2.28 scenes, so I needed to add a variable to choose between non-lua and lua processed scenes: TScene::uselua=true is the default setting, so it will work with 2.3. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Davaris Posted December 20, 2009 Share Posted December 20, 2009 Thanks Lumooja. I'll try these changes out soon. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Canardia Posted December 20, 2009 Share Posted December 20, 2009 I haven't published GameLib 0.0.15.0 yet, but I'll inform when it's ready for download. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 21, 2009 Share Posted December 21, 2009 I haven't published GameLib 0.0.15.0 yet, but I'll inform when it's ready for download. Just out of pure curiosity, will gamelib be compatible with both 2.2x and 2.3? or will it now be geared towards one or the other? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Canardia Posted December 21, 2009 Share Posted December 21, 2009 It works with both. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 21, 2009 Share Posted December 21, 2009 It works with both. cool good to know. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Canardia Posted December 21, 2009 Share Posted December 21, 2009 I found out that a uselua=true/false control is not enough, as there is also an 3rd option: using LE 2.3 sbx files without LUA. This is needed, because some things in LUA don't work very well, like lights. They leave an unnecessary physics object in the scene, and I found no way to remove it without removing the whole light. So in order to load LE 2.3 scenes optimally, you would want to use LUA where it works, and ProcessScene for those parts which are not working so well in LUA. For this this I've thought to have 2 control flags: uselua and usenewsbx. Uselua would be then a 3-state flag (0=don't use lua, 1=use lua where it works, 2=use lua always). Default would be uselua=1. Usenewsbx would be default true, so LE 2.2x users can set it to false to load Sandbox scenes. LE 2.2x users could also specify non-sense combinations like uselua=2 and usenewsbx=0, to see what LUA would do for you, this would of course make sense only for testing purposes. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.