TheConceptBoy Posted June 13, 2019 Share Posted June 13, 2019 Good day, everyone. I've gotten a hang of setting up a fresh blank C++ project without much issues. But it is doe by completely wiping the all the code from the Main.cpp, importing the Leadwerks.h library and working my way up from there. When a project is created like this, "from a blank page", this destroys all the Lua connections to the engine and you are no longer able to use Lua in the engine, right? I think Lua has it's place, it's like blueprints in Unreal and I wanted to see how do you go about proceeding with the game development from that blank project? It seems as if this block here is where the app window should be created: App* app = new App; if (app->Start()) { Map::Load("Maps/city01.map"); while (app->Loop()) { and in the while loop, is where you game logic would go. But that seems to not be the case. The app starts, blanks the screen and closes immediately. I would like to see if I can get a C++ project running without destroying the initial Lua interpreter setup. Where am I to look for the clues? Quote Link to comment Share on other sites More sharing options...
reepblue Posted June 13, 2019 Share Posted June 13, 2019 Lua scripts still work, you just removed the entry point being the Main.lua script. You can execute any script using a function call. Check out App.cpp for more details. 2 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
cassius Posted June 13, 2019 Share Posted June 13, 2019 I too have been mystified by this blank project problem. I replace all the default source files and substitute my own files but if I use the default files instead where do I start to enter my own code? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
wadaltmon Posted June 14, 2019 Share Posted June 14, 2019 On 6/13/2019 at 11:45 AM, cassius said: I too have been mystified by this blank project problem. I replace all the default source files and substitute my own files but if I use the default files instead where do I start to enter my own code? Generally I've seen 2 schools of thought: delete all of App.cpp and put your code in here while leaving main.cpp alone, or delete all of main.cpp and leave App.cpp alone. I've had success by leaving App.cpp be and writing all my code in main.cpp. Delete all the code that's in that file, stick an include for Leadwerks.h and using namespace Leadwerks at the top, and then create a bool main() with a while (true) loop in there, and you're set to go. Quote Link to comment Share on other sites More sharing options...
cassius Posted June 14, 2019 Share Posted June 14, 2019 thanks Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 15, 2019 Author Share Posted June 15, 2019 11 hours ago, cassius said: thanks Quote 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.