Jump to content

Search the Community

Showing results for tags 'c++'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

  • Development Blog
  • Canardian's Blog
  • Beyond Civilization Blog Ext
  • Tyler's Blog
  • macklebee's Blog
  • B-Byrnes' Blog
  • Marleys Ghost's Blog
  • omid3098's Blog
  • Richardsimpo123456's Blog
  • DJDD's Blog
  • Rick's Blog
  • --
  • xtreampb's Blog
  • Economically Disadvantaged
  • klepto2's Blog
  • Old Blog
  • Chris Paulson's Blog
  • Davaris' Blog
  • nil
  • Rekindled Phoenix's Blog
  • Flexman's Blog
  • Kattemaksu Online
  • Marcousik's Creations Blog
  • EVE LBS Studio
  • Rendering puzzles
  • Screen Size Utility
  • Niosop's Blog
  • 1299 RTS Game Project
  • Blitzbat's Blog
  • gordonramp's Blog
  • Andy Gilbert's Blog
  • Marcus' Blog
  • JornAggror Blog
  • diedir's Blog
  • wayneg's Blog
  • Masterxilo's Blog
  • Dave Lee's Blog
  • peubuy's blog
  • OD Arts -Leadwerks Blog
  • The progression......
  • Ultra Software Company Blog
  • The Progression
  • Pancake's Blog
  • Test Blog
  • BLaBZ Blog
  • Pure³d's Blog
  • dreamhead Blog
  • RVL's Blog
  • DB's Blog
  • Toxin Games Development Blog
  • CombatHelo Blog (RSS Import)
  • Foolish's Blog
  • ZioRed's Corner
  • Toxin Games Twitter
  • Shard - Third Initiative
  • Shard's Blog
  • Soamp's Blog
  • Soamp's Blog
  • Laurens' Blog
  • JT`s warehouse district
  • Kennar's Blog
  • KiteFuchs' Blog
  • KiteFuchs' Blog
  • Rachel's Dev-Blog
  • Eagle's Blog
  • zaphos' Blog
  • please delete this blog
  • Afke's Blog
  • Richard Simpson
  • knowledgegranted's Blog
  • EdzUp(GD)'s Blog
  • aGameLife's Kelasel MMORPG Blog
  • tournamentdan's Blog
  • Beyond Civilization Blog
  • smashthewindow
  • AnniXa's Blog
  • AnniXa's Blog
  • Elemental Development
  • DigitalHax Blog
  • Aria's Blog
  • Strogg76's Blog
  • Clackdor's Blog
  • Leadwerks Project Status
  • simpleprogrammer's Blog
  • Pathfinding in LE.2.x
  • Naughty Alien's Blog
  • smashthewindow's Blog
  • Ali Salehi's Blog
  • Jardar's Blog
  • Chris Vossen's Development Blog
  • Scarlet Thread Studios' Blog
  • Kronos' Blog
  • Benton's Blog
  • ChrisV's Blog
  • tjheldna's Blog
  • shadmar's Blog
  • 3D Masons, LLC
  • Andy Gilbert's Enviro Models
  • ParaToxic's Blog
  • NarkLord's Blog
  • ChrisMAN's Blog
  • ChrisMAN's Blog
  • CGMan's Blog
  • The Game
  • Chris Tutorials
  • Leadwerks 3 Experience
  • An Alien Saga
  • klepto2 & Leadwerks 3
  • Inside the mind of eternal insomniac
  • josk's Blog
  • Shader Development in Leadwerks 3.1
  • 3D Coat : Column game making of
  • Einlander's Blog
  • Ginger George's Blog
  • I have a problem
  • Michael_J's Blog
  • nasamydifol's Blog
  • Digman's Blog
  • noesisGUI
  • SavageDogg38's Blog
  • Built from Ruins
  • Remaining Days
  • test_external_blog
  • The Hunt For Food Blog
  • Crazy Minnow Studio
  • CrazyMinnowStudio
  • Guppy's Blog
  • Playing Online
  • Evayr's Blog
  • DerRidda's Blog
  • Karl's Blog
  • whiterabbit's Blog
  • Tinyboss Games
  • abendkleider's Blog
  • sacguccireplica's Blog
  • Arena
  • Imchasinyou's Blog
  • xtom's Blog
  • Lua is better than you think.
  • mdgunn's Blog
  • Crime Closer
  • lxFirebal69xl's Blog
  • Wedmer's Blog
  • Lockdown, going forward.
  • Pump-Action Captain
  • Igor's Blog
  • Dead Anyway
  • Runenrise and more
  • reepblue's Blog
  • Slippy's Corner
  • LUA Musings
  • severjack's Blog
  • mikeporter's Blog
  • miko93's Blog
  • Megalocerous' Blog
  • lxFirebal69xl's Blog
  • aiaf's Blog
  • Lostghbear's Blog
  • echo $BLOG_NAME > blog_title.tmpl
  • johnadam111's Blog
  • Dwarf Beard
  • burgelkat's Blog
  • Charrua's Blog
  • peterpaul's Blog
  • joshmathews' Blog
  • Martin Kearl's Blog
  • Brutile's blog
  • tipforeveryone's Blog
  • Glushchenko Blog
  • Express Lab Games Blog
  • Blueapples' Blog
  • DooMAGE's Blog
  • Structura devblog
  • UltraEngine - Experiences, add-ons and other Stuff
  • martyj's Blog
  • Dragonfreak's Blog
  • Brutile's Blog
  • assigmenthelp
  • Case Study Assignment Help
  • How to deal with bad grade ?
  • How to deal with bad grade ?
  • GameDev Blog
  • devcjohnson's Blog
  • devcjohnson's Blog
  • THE WHAT? Blog
  • The Demurian Scribe
  • GUI Editor
  • GUI Tutorial
  • noob_shaders
  • The Seventh World
  • Phodex Games Blog
  • Leadwerks VS Source 2
  • Work in Progress - Scifi PBR Media
  • [C++] First Player game start
  • The Blog of Yue
  • Snowboarding Development Blog
  • Ocean: Rendering in Leadwerks 4
  • Game Ready Maps
  • Ultra App Kit (Advanced Custom Widgets)
  • Poking around
  • SALVATIONLAND
  • Blender tutorials
  • Usefull Scripts & Components
  • Thirsty Panther
  • Ultimate Action Game Controller

Forums

  • Software
    • General Discussion
    • Programming
    • Game Artwork
    • Showcase
    • Suggestion Box
    • Bug Reports
  • Addons
    • Extensions & Plugins
    • Components
    • Addon Development
  • Platforms
    • Windows
    • Linux
    • macOS

Categories

  • Streams and Events
  • Tutorials
  • Games
  • Work in Progress

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

  1. I messed around with the trial on my laptop, and was very impressed. However, I can't get it to work on my desktop. Upon starting up Leadwerks.exe I get this error: Microsoft Visual C++ Runtime Library This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Both my laptop and desktop run 64 bit Windows 7 SP1. They both have the same MS Visual C++ Redistributables, which can be seen in this screenshot. I've reinstalled the MS VC++ 2010 Redistributable several times. I've uninstalled it and used the one included with the Leadwerks installer. I've reinstalled Leadwerks several times. Running dependency walker gives the exact same result as on my laptop. Is there any solution to this? I see someone else has had this issue, but it wasn't resolved in this thread. Thank you.
  2. A few weeks ago i discussed my business software to a friend of mine. This friend owns an insurance business and expressed to me that my business software as a good potential, it just has to be put in front of the right people. With him insuring businesses, we agreed that he is in a better position to put the software in front of people who would benefit from it. Because of this, I have decided to make that my current priority when it comes to time set aside for software developing. This will help me fund my game project. About my business software: The software asks the user to determine what positions are needed, and how many shifts are needed for that position each day. On each shift the user puts the start time, stop time, and the number of employees assigned to that position are needed for the shift. next the manager populates a list of employees which include their name, position, max hours, days and time available for each day. all the shift and employee information is saved between uses. One all data has been inputted, the manager will press "generate Schedule" any time the manager wants a new random schedule. manual editing is still available. What this does is allow the manager, each week, to create a new random schedule at the click of a button. The only thing i have left to do now is to implement some encryption algorithms for the data and create the installer. Once available, would anyone like a demo of this software? It is designed for any place of business that has part time employees such as retail. It isn't designed for places of business who's shifts carry past midnight.
  3. Hi guys! I couldn’t find any class in Leadwerks 3 that applies to LoD so I created my own. I may have been loading the models incorrectly, but the game froze whilst doing so. Have I missed something or should I use threading for this? Also, on this note: will LoD be implemented in Leadwerks 3 any time soon? Oh, also, I created a terrain and loaded it into a map scene via the editor. My little character falls through it. How do I got about setting it up properly as a collision mesh? Again, I’m probably missing something silly so please excuse me if I am! Thanks guys!
  4. Hello all! I'm a first-time user and was wondering, and hoping, if anyone could suggest how I could get up to speed with Leadwerks 3, considering most of the tutorials I've seen and read concern LE2 (the API has changed quite a bit since then, of course). The main things I wish to learn at the moment are how to properly implement post-processing effects, like: bloom, 'god rays', DoF, fog, etc, as well as collision detection and water. I'm also having some difficulties enabling dynamic shadows (this could be due to using the trial version - I don't know what the limitations are for the trial). I'm aware that LE3 is still under some development at the moment, so this could be another factor hindering progression. I'm using C++ to program with. I've tried downloading some games created with Lua and translating some of the scripts into C++, but, of course, it's easier said than done when you're using a new software and API. At the moment, I'd feel more comfortable continuing to use C++, but if enough of you suggest I use Lua, and with good reason, I'll definitely consider doing so! I’d love to get my prototype game finished before my 30-day trial is over and see what I can achieve with Leadwerks, but I’m still stuck on some of the basics and have 12 days left of the trial period! I didn’t want to start posting help questions in the forum, as I understand newbies can be a pain in the backside at times, but desperate times call for desperate measures! Any help, suggestions and tips will be greatly appreciated!
  5. The current API has these nice String converters. //Leadwerks.h std::string IntToString( int i ); std::string String( double f ); std::string String( int i ); std::string String( unsigned int i ); std::string String( long l ); std::string String( const unsigned long l ); I use these Vector2, Vector3 and Vector4 converters myself. They might be useful for the API to be there: //Header std::string String(Leadwerks::Vec2 vector); std::string String(Leadwerks::Vec3 vector); std::string String(Leadwerks::Vec4 vector); //CPP std::string String(Vec2 v) { return "X: " + Leadwerks::String(v.x) + " Y: " + Leadwerks::String(v.y); } std::string String(Vec3 v) { return "X: " + Leadwerks::String(v.x) + " Y: " + Leadwerks::String(v.y) + " Z: " + Leadwerks::String(v.z); } std::string String(Vec4 v) { return "X: " + Leadwerks::String(v.x) + " Y: " + Leadwerks::String(v.y) + " Z: " + Leadwerks::String(v.z) + " W: " + Leadwerks::String(v.w); }
  6. Hello again fellow developers. I've been busy with trying to set up the first test-level for our game, which is a small house that I've build using only BSP. The house also includes a grandfather clock model, but I couldn't get light to render onto the model. So my first step was to render the lights manually using the 'calculate light' button, but all it does is say "Lighting rendered in 21 millseconds" (the number of milliseconds varies from 20 to 24) and the load-bar never actually progresses. Even when I turn all the resolution on low, the result is the same; just an empty loadbar with the same text that never progresses. I wonder if this is some kind of bug, and if it is I would like to know if there is some kind of way around this. For your convenience, I added a screenshot to demonstrate the problem. I would love to know how to deal with this problem, because I'm kinda stuck with it right now.
  7. Hello there, I recently purchased Leadwerks 3 and I'm quite happy with it. However, I use Wings 3D myself to create and export static 3D models and I noticed that there is not a single file supported by Leadwerks to which Wings 3D can convert. There seems to be an option to import .OBJ files, but this didn't do anything for me (except it froze Leadwerks once). Is there any easy way to export a 3DS or OBJ file to a file that Leadwerks supports? I noticed that Leadwerks 3 supports FBX and GMF, but again these files are not supported by Wings and I can't find any exporters for it. I would appreciate it if somebody could help me out. I know the majority of people use high-end software such as 3DS Max, but for static models a light-weight program like Wings is more ideal for me and I'm more familiar with it. Greetings,
  8. I am supporting this game through kickstarter so I do not have access to all the forums yet so I am posting here. (Sorry if this is the wrong spot, but no access to the programming area). So I was playing with the trial and was banging my head against the wall on how to toggle fullscreen, well I figured it out and thought I would share here for others that are having a hard time. void Settings::SetFullScreen(bool isFullscreen) { if (isFullscreen != _vidSettings._fullscreen) { _vidSettings._fullscreen = isFullscreen; GetCore()->window->Release(); if (isFullscreen) { GetCore()->window = Window::Create( _vidSettings._title, 0, 0, _vidSettings._res.x, _vidSettings._res.y, Window::FullScreen); } else { GetCore()->window = Window::Create( _vidSettings._title, 0, 0, _vidSettings._res.x, _vidSettings._res.y, Window::Titlebar); } GetCore()->context = Context::Create(GetCore()->window); } } I have a class I pass around to everyone that pretty much just contains pointers to window, context, world, and camera that is what the GetCore() is (well it is a function that returns the core pointer but that is a personal coding style)
  9. Hello everybody, I'm trying out the trial version of Leadwerks 3 to see if it suits my needs. The game I want to develop has a team of four people, so I would like to be able to share projects over Skype to keep eachother up to date. We tried the project manager option, but we found that after I unpacked the folder that my partner created with his Leadwerks 3 trial into my Leadwerks >> Projects folder, the project manager would not recognize it. We tried searching for a sollution to this, but we couldn't find any. Since teamwork is very crucial for our project, I would like to know the most efficient method of sharing our project using Leadwerks. I will be waiting for your reply!
  10. So i'm trying to throw a stone when i press the mouse. in my app::loop function i have this code if(window->MouseHit(1)) { Model *tStone=Model::Load("Models/Stone/Stone_1.mdl"); tStone->SetShape(Shape::Load("Models/Stone/Stone_1.phy")); tStone->SetMass(1); Vec3 mouseposition = window->GetMousePosition(); //mouseposition.z-=5; mouseposition=camera->UnProject(mouseposition); tStone->SetPosition(mouseposition); tStone->SetVelocity(Vec3(0,0,10)); } i'm using this as my reference. When i press my left mouse button, a stone is indeed "thrown" however when i move my mouse to a different location, the stone is still thrown in the same location, it didn't move to fallow my mouse from what i can tell. Am i doing this wrong, or should i report this as a bug? ~Xtreampb~
  11. Why all the members of Leadwerks classes are placed in the public section? What about encapsulation?
  12. So i my code i am registering a collision hook like this this->Full->AddHook(Entity::CollisionHook, (void*)CSColl); this works fine. in this collision hook when a certain statement is true i remove this hook like this this->Full->RemoveHook(Entity::CollisionHook, (void*)CSColl); my problem is that this remove hook throws a runtime error. am i doing this right?
  13. Is there a way to view the physics bodies while my game is running. I got some weird things going on with my physics shapes. Being able to see them would really help me out. ~Xtreampb~
  14. I am going through a simple free look tutorial which everything is going smoothly, however I clicked on 'Calculate Lighting' inside the LE Editor and now my scene is dark, I realize i don't have a light source but in the tutorial video there was already shadows where mine had no shadows. So i guess my question is why did the lights already cast shadows in the tutorial video and not in my scene (I have the same code as the tutorial as well). And how do I undo the calculate lighting so i can see my level again. Sorry about the wordiness
  15. OK this is very weird, and may be a leadwerks bug. i've created a class which is basically 3 models and functions to control them. in my main loop i load an instance of my class and create another model with the same texture. the collision recognizes fine. I can hide the main model in my custom class. I get an issue when i try to position my second model to the location of the first one i just hid, it moves my ground (the model that the first collided with) to the location instead of the first one. below is my code. At the bottom is an attached exe so that you can see what is going on. rusted_iron.cpp // // Rusted_Iron.cpp // Kings // // Created by James Thomas on 6/6/13. // Copyright (c) 2013 Leadwerks Software. All rights reserved. // #include "Rusted_Iron.h" //Function that is called when object collides void Coll(Entity* entity0, Entity* entity1, float* position, float* normal, float speed) { Rusted_Iron *mBlock=reinterpret_cast<Rusted_Iron*>(&entity0); mBlock->Break(); } Rusted_Iron::Rusted_Iron() { //load all the models for the rusted_iron block this->Full=Model::Load("Models/Rusted_Iron/Rusted_Iron.mdl"); this->P1=Model::Load("Models/Rusted_Iron/Rusted_Ironpart01.mdl"); this->P2=Model::Load("Models/Rusted_Iron/Rusted_Ironpart02.mdl"); this->P3=Model::Load("Models/Rusted_Iron/Rusted_Ironpart03.mdl"); //hide the broken models //this->Full->Hide(); this->P1->Hide(); this->P2->Hide(); this->P3->Hide(); //paint all the models wit the material this->Full->SetMaterial(Material::Load("Models/Rusted_Iron/Rusted_Iron.mat")); this->P1->SetMaterial(Material::Load("Models/Rusted_Iron/Rusted_Iron.mat")); this->P2->SetMaterial(Material::Load("Models/Rusted_Iron/Rusted_Iron.mat")); this->P3->SetMaterial(Material::Load("Models/Rusted_Iron/Rusted_Iron.mat")); //load the physics shape for each model this->Full->SetShape(Shape::Load("Models/Rusted_Iron/Rusted_Iron.phy")); this->P1->SetShape(Shape::Load("Models/Rusted_Iron/Rusted_Ironpart01.phy")); this->P2->SetShape(Shape::Load("Models/Rusted_Iron/Rusted_Ironpart02.phy")); this->P3->SetShape(Shape::Load("Models/Rusted_Iron/Rusted_Ironpart03.phy")); //this->Full->SetCollisionType(Collision::Scene); this->Full->SetMass(1); this->P1->SetMass(1); this->P2->SetMass(1); this->P3->SetMass(1); //insert collision hook this->Full->AddHook(Entity::CollisionHook,(void*)Coll); //set user data type to 'this' so that we can retrieve itself upon collision //this->Full->SetUserData(this); } Rusted_Iron::~Rusted_Iron() { /*delete this->Full; delete this->P1; delete this->P2; delete this->P3;*/ } void Rusted_Iron::Break() { // this->P1->SetPosition(Full->GetPosition()); // this->P2->SetPosition(Full->GetPosition()); // this->P3->SetPosition(Full->GetPosition()); this->Full->Hide(); this->P1->SetPosition(0,0,0);//sets my ground model to origin instead of this model this->P1->Show(); //this->P2->Show(); //this->P3->Show(); } rusted_iron.h // // Rusted_Iron.h // Kings // // Created by James Thomas on 6/6/13. // Copyright (c) 2013 Leadwerks Software. All rights reserved. // #ifndef __Kings__Rusted_Iron__ #define __Kings__Rusted_Iron__ #include "Leadwerks.h" using namespace Leadwerks; class Rusted_Iron// : public Model { private: Model *Full, *P1, *P2, *P3; public: Rusted_Iron(); ~Rusted_Iron(); void Break(); }; #endif /* defined(__Kings__Rusted_Iron__) */ app.cpp #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Vec3 camerarotation; #if defined (PLATFORM_WINDOWS) || defined (PLATFORM_MACOS) #else #endif bool App::Start() { //Create a window window = Window::Create("Kings"); //Create a context context = Context::Create(window); //Create a world world = World::Create(); Light *tLight=DirectionalLight::Create(); tLight->SetRotation(0,45,45); //Create a camera camera = Camera::Create(); camera->Move(0,-5,-5); camera->SetRotation(0, 0, 0); //Hide the mouse cursor window->HideMouse(); Rusted_Iron *mBlock=new Rusted_Iron;//my instance of my custom class Model *ground=Model::Box();//my ground that is moving and not supposed to ground->SetShape(Shape::Load("Models/Rusted_Iron/Rusted_Iron.phy")); ground->SetScale(10.0, 0.1, 10.0); ground->SetMaterial(Material::Load("Models/Rusted_Iron/Rusted_Iron.mat")); ground->SetPosition(0,-8,0); /* std::string mapname = System::GetProperty("map","Maps/start.map"); Map::Load(mapname); */ //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); return true; } bool App::Loop() { //Close the window to end the program if (window->Closed()) return false; //Keyboard movement float strafe = (window->KeyDown(Key:) - window->KeyDown(Key::A))*Time::GetSpeed() * 0.05; float move = (window->KeyDown(Key::W) - window->KeyDown(Key::S))*Time::GetSpeed() * 0.05; camera->Move(strafe,0,move); //Get the mouse movement float sx = context->GetWidth()/2; float sy = context->GetHeight()/2; Vec3 mouseposition = window->GetMousePosition(); float dx = mouseposition.x - sx; float dy = mouseposition.y - sy; //Adjust and set the camera rotation camerarotation.x += dy / 10.0; camerarotation.y += dx / 10.0; camera->SetRotation(camerarotation); //Move the mouse to the center of the screen window->SetMousePosition(sx,sy); if(window->KeyHit(Key::Escape)) return false; Time::Update(); world->Update(); world->Render(); context->Sync(false); return true; } please help. so confused i was like WTF when it first happened. Though i was seeing things. attached is an exe so you can see what it is doing right off the bat for some reason, i think that my custom object data is being over written by the collision function. memory bleed over. It seams that in my custom object when i cast entity0 to mBlock, Full stays the same then P1 becomes the ground. The P2 and P3 are both 'forgotten'
  16. Don't have the code in front of me, but last night I was trying to find out why a model, was not getting "Pick"ed. I was quite confused, until I realized that once I removed the SetScale method for the model, I could *Pick* it. Is this working as intended, are scaled models unpick-able? It was just a simple rectangular model with a material applied to it, that imported from blender, and I did not scale it in the editor, it was done in the code. Thanks!
  17. I updated Leadwerks 3 this morning, created a new C++ project, opened it in VS 2010 Express and upon running it just crashes with the error ; Unhandled exception at 0x00e4e9c4 in MyProject.debug.exe: 0xC0000005: Access violation reading location 0x00000024. So I commented out all of the camera movement code to see where I'd end up, and I got a new error ; A buffer overrun has occurred in MyProject.debug.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program. For more details please see Help topic 'How to debug Buffer Overrun Issues'. Any Ideas?
  18. Hello, After adding trees over the terrain surface and a water plane I tried to get reflections of trees that are near the edge of the water plane or are planted half-submerged in the water plane by going to ( In the editor ) Tools => Options => Configuration and then setting the value of Reflection to : "Everything" But unfortunately the reflection of trees ( the leaves and the branches ) fail to show up on the water plane surface. Ironically the same steps worked for me when I was testing the engine using Leadwerks 2.5 trial version before purchase ! So what am I missing here ? What is the correct procedure to get reflections of any object whether static or animated ( barrels, trees, houses, animated character - people etc. ) on the surface of the water plane ? Thanks,
  19. Is it possible in Leadwerks to create a complete 3d world, what i mean it`s not a flat world with trees and hills but for example 3d space game with asteroids?
  20. I have the following simple (LEO-based) LE 2.5 program that compiles and functions properly under both VS2008 and VS2010: // ==================================================================== // This file was generated by LEBuilder // http://leadwerks.com/werkspace // ==================================================================== #include "leo.h" #include <string> #include <iostream> using namespace std; using namespace LEO; const int ScreenWidth = 800; const int ScreenHeight = 600; const char* MediaDir = "D:\\Leadwerks\\SDK"; const char* AppTitle = "TestLEO"; void ErrOut( const string& message ) { cerr << message << endl; } // -------------------------------------------- int main( int argc, char* argv[] ) { // Set graphics mode Engine engine(AppTitle,ScreenWidth,ScreenHeight); if( !engine.IsValid() ) { ErrOut( "Failed to set graphics mode."); return 1; } engine.AddAbstractPath( MediaDir ); // Create framework object and set it to a global object so other scripts can access it Framework fw; if( NULL == fw ) { ErrOut( "Failed to initialize engine." ); return 1; } // Set Lua framework object engine.SetObject( "fw", fw ); // Set Lua framework variable Lua lua; lua.PushObject( fw ); lua.SetGlobal( "fw" ); lua.Pop( 1 ); // Get framework main camera fw.main.GetCamera().SetPosition( Vec3(0,0,-5) ); Material material( "abstract::cobblestones.mat" ); Debug::SetDebugPhysics(); // Create collision cube BodyBox cube1_body(1); cube1_body.SetMass(1.0); cube1_body.SetFriction(1.0, 1.0); cube1_body.SetElasticity(0.2f); Cube cube1; cube1.Paint( material ); cube1.SetParent(cube1_body); cube1_body.SetPosition(Vec3(0, 5, 0)); BodyBox cube2_body(1); cube2_body.SetMass(1.0); cube2_body.SetFriction(1.0, 1.0); cube2_body.SetElasticity(0.2f); Cube cube2; cube2.Paint( material ); cube2.SetParent(cube2_body); cube2_body.SetPosition(Vec3(0.5, 10, 0.5)); // Create collision ground BodyBox ground_body(1); Cube ground; ground.Paint( material ); ground.SetParent(ground_body); ground_body.SetScale(Vec3(10.0f, 0.1f, 10.0f)); ground_body.SetPosition(Vec3(0, -1, 0)); // Turn on physics //TVec3 gravity = Vec3(0,-9.80665f*2,0); TVec3 gravity = Vec3(0,-2.0,0); World& back_world = fw.background.GetWorld(); back_world.SetCollisions(1, 1); back_world.SetGravity(gravity); World& main_world = fw.main.GetWorld(); main_world.SetCollisions(1, 1); main_world.SetGravity(gravity); World& trans_world = fw.transparency.GetWorld(); trans_world.SetCollisions(1, 1); trans_world.SetGravity(gravity); cube1_body.SetType(1); cube2_body.SetType(1); ground_body.SetType(1); // Add some light DirectionalLight light; light.SetRotation( Vec3(45) ); // Spin cube until user hits Escape while( !Keyboard::I****() && !engine.IsTerminated() ) { if( !engine.IsSuspended() ) { fw.Update(); fw.Render(); engine.Flip( 0 ); } } return engine.Free(); } This works as I expect, with both cubes falling and colliding properly. I now would like to detect a collision for each Cube body (to emit a sound, for example). I add the following module-level function to the code: int cubeCollision(TEntity e1, TEntity e2) { return 0; } And then I enable collision callbacks for each Cube toward the bottom of the main() body: cube1_body.SetType(1); cube1_body.SetCallback((BP)cubeCollision, ENTITYCALLBACK_COLLISION); cube2_body.SetType(1); cube2_body.SetCallback((BP)cubeCollision, ENTITYCALLBACK_COLLISION); ground_body.SetType(1); When the first impact occurs, and the callback is triggered, I'm getting a run-time error (the same in both VS2008 and VS2010) that states: Any ideas about what I might be doing wrong here?
  21. Hi When compiling a new C++ project created from the Leadwerks 3.0 Editor I get a message that the leadwerks.h file tries to include dirent.win32.h which it cannot find. Searching for this file confirmes that I do not have it installed. Changing the entry #include "dirent.win32.h" on line 190 in the leadwerks.h header file to #include "extra\dirent.h" which I presume does the same works ok but is this the proper way to solve this or should I install/refer to other components that the LE 3 engine depends on ? Regards Eirik
  22. Hey a suggestion for OS X When deploying an Application for OS X, Currently the app is generated inside a folder that contains not only the app, but all the resources. On the OS X environment, all of these resources should be placed inside the resources folder which can be found in the .app/contents/resources. As it stands i'm not sure if the games are submitted to the app store will pass because of this. A work around i have in my head is: 1) use the package maker tool, 2) we configuring the package maker tool, set deploy location to "Applications" folder 3) create a shortcut to desktop this goes against the entire framework of OS X. I know this is how windows operates, but OS X isn't windows. I know wxWidgets uses a function called GetResourceDir and it works for both OS X and MSW. Some Pre processor definitions are used in wxWidgets to manipulate what you are attempting to do. Below is a link to the API Guide (note version 2.9 dev built is used, but this feature has been implemented since 2011) http://docs.wxwidgets.org/trunk/classwx_standard_paths.html
  23. So apprently there is an error in the source code for adding hooks via the Entity::AddHook function for OS X. For more information please fallow the detailed thread listed below. http://www.leadwerks.com/werkspace/topic/6361-le3-collisions-hook/
  24. When creating a new project i attempt to build the iOS version of the Darkness awakes in the xcode project. I'm using xCode version 4.6.1. The error i'm getting is this: error: /Applications/Leadwerks/Projects/DarknessAwaits/Projects/iOS/data.zip: No such file or directory the information associated with the error is: CpResource data.zip /Users/xtreampb/Library/Developer/Xcode/DerivedData/DarknessAwaits-bkjudgfjrtsrnwhhyzewwncqlxaq/Build/Products/Debug-iphonesimulator/DarknessAwaits.app/data.zip cd /Applications/Leadwerks/Projects/DarknessAwaits/Projects/iOS setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Applications/Leadwerks/Projects/DarknessAwaits/Projects/iOS/data.zip /Users/xtreampb/Library/Developer/Xcode/DerivedData/DarknessAwaits-bkjudgfjrtsrnwhhyzewwncqlxaq/Build/Products/Debug-iphonesimulator/DarknessAwaits.app I have followed the path and there is no data.zip. there is a data folder but no zip folder. also i don't know if this is related but i also get this warning: directory not found for option '-L/Applications/Leadwerks/Engine/Library/iOS i fallowed that path and in the Library folder it has iphoneos, iphonesimulator, MacOS, Windows, and Android.
  25. In follow up to Andy, I also want to do a little blog on my experience with Leadwerks 3 so far. The first week after purchasing I didn't have much time to spend on it. Luckily after that week, there was quite some time left for the start of a new adventure. Lua In contrary to Leadwerks 2.3, I now want to lay most of my focus on C++. That is kind of Ironic, since a lot more people are interested in Lua now that Leadwerks 3 has arrived. It is not that surprising since the advantages of using Lua have improved quite a lot. Ofcourse we have debugging and stepping through Lua scripts which is a huge gain. And the other thing is the flowgraph editor. Rick has provided me an extra motivation boost to try out the flowgraph editor, with his cool scripts. (Of which the volume trigger is my personal favorite ). I tried to create a little script myself and within minutes, real simple gameplay interaction was set up.(Gravity activator) Something that was a lot harder to do with Leadwerks 2.3. C++ and Shaders For my own portfolio and skill set I started with C++ and the LE3 API. Just like with LE2, the API is very easy to use. Chris and Josh have done an excellent job on describing commands for both C++ and Lua. Pretty much every command comes with a working example. In the future I also hope to learn more about shaders. Shadmar has allready created severall of them, which you should check out. Tutorials A good way to teach yourself something, is to try teaching it to others. Thats the motto I have been going with since I have started creating tutorials for Leadwerks 2.3. The road is wide open again with the arrival of Leadwerks 3. The first 5 video tutorials for using C++ with LE3 are uploaded on youtube and more are on their way. Eventually I hope to reach a point were we will create a game that uses a combination of C++ and Lua. For a complete overview of tutorials, have a look here: http://www.leadwerks...-lua-tutorials/ Future updates There are plenty of things that can be improved with Leadwerks 3. Thats a fact. I am not talking about the deferred rendering with dynamic shadows. It is really the little things that count. I am more than confident that these issues will be dealt with in the near future. As soon as Josh is back from the GDC, there will probably be updates every other day. For now, I am really happy with my purchase of Leadwerks 3. I am looking forward to all the cool stuff that this community is going to create. Jorn
×
×
  • Create New...