mdgunn Posted September 9, 2017 Share Posted September 9, 2017 Quote By default, a new game will include a sample actor class you can modify called "MyActor". The code for this can be found in the "MyActor.h" and MyActor.cpp" files in the "Source" folder in your game directory. C++ tutorial says the above but in my new projects I don't see this. As a tutorial I feel it is important that information presented as a tutorial is correct, otherwise it is a bad experience for a new user. Although some may argue people doing C++ should know there...stuff, I don't agree. If you're interested in learning C++ LeadWerks is quite a good place to start (and puts itself forward for educational use). It's a missed opportunity if there isn't a good sample or reliable and detailed information on how to get a NON-TRIVIAL example going (i..e loading up a map and getting entities out, passing data in etc.). I wish the sample project DID go a bit further with it's example as the way it loads up the Lua Interpreter but doesn't pass in any worlds, context, or get any out (if that is even possible - they are created in the Lua example it loads). What the natural next steps would be are unclear given this starting approach. Well, at least to me I can see I could rip stuff out and do it a different way (which I did) but the Lua Interpreter loading seems to suggest an intriguing alternative way. Maybe the sample project should stay as it is with perhaps a few more comments as to what next steps should be, but there should probably also be a more thorough EASILY FOUND sample(s) to show you. Examples beyond the useful, but sometimes simplified out of realistic context, help system examples, is an area that LeadWerks is still a bit weak in. Quote Link to comment Share on other sites More sharing options...
cassius Posted September 9, 2017 Share Posted September 9, 2017 Are you referring to the latest blank template in the project manager? I tried that but could not figure where to put my own code. My c++ experience is limited. 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...
mdgunn Posted September 9, 2017 Author Share Posted September 9, 2017 Yes, the C++ starter code in the PROJECTS folder created when you create any new project. Think they are always the same regardless of the template you choose, though I suppose I could be wrong. That the tutorial text doesn't match what the Project folder seems to give you is a poor start for anyone not experienced and venturing down the C++ route. A few examples beyond just the starter template would be useful, so as I say maybe the correct solution is a few simple examples and maybe the starter content could mostly stay the same. I found a single sizeable example here in case anyone finds it useful. https://github.com/ArchaicMage/Leadwerks-Template/ I've not tried it yet so it may need updating to work properly but the principles it uses still probably apply and worth a look at. Quote Link to comment Share on other sites More sharing options...
cassius Posted September 10, 2017 Share Posted September 10, 2017 After creating a blank project I remove all the files in the Source folder and replace them with files from pre updated project. This works but I lose any lua connection and the menu. 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...
reepblue Posted September 10, 2017 Share Posted September 10, 2017 I was able to get these actors working. 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...
mdgunn Posted September 11, 2017 Author Share Posted September 11, 2017 Yeah, I can get the actor class working fine. The issue for me isn't that that they don't work. The issue is that the tutorial explicitly says there should be an implementation of the Actor class MyActor (extended from Actor) but there isn't one. This isn't a code problem bug report but a web site tutorial bug report. The text on the website should be corrected so it is accurate. Either it should not say a MyActor class is created or the starter source should contain it. If it is changed to not mention the MyActor class then I think we sorely need a nice non-trivial example of a C++ project to go with an extended tutorial. Preferably one that retains most of what people get in Lua. E.g. working menus, illustration of how to manage some simple entities and pass data back and forth from lua to c++. Yeah there is some forum data on this but I think it would be preferable to have a decent official example where a number of points can be brought together into a single place of maintained sample code (rather than potentially eventually non-working or misleading forum post from 2014 or something). Anyway the original point was that there is an error in the web site tutorial but I feel there is more to this issue than that. 2 Quote Link to comment Share on other sites More sharing options...
SpEcIeS Posted September 15, 2017 Share Posted September 15, 2017 It would be really nice to have these ("MyActor.h" and MyActor.cpp") included in the Source directory, as indicated in the tutorial, or at least posted somewhere on the forum. To further C++ progress, people following the C++ tutorials do need to reference them. 1 1 Quote SpEcIeS Link to comment Share on other sites More sharing options...
TheConceptBoy Posted April 26, 2020 Share Posted April 26, 2020 So I take it since 2017, Neither the documentation, nor the engine have been updated with these example files? https://www.leadwerks.com/learn?page=Tutorials_CPP_Actors Quote Link to comment Share on other sites More sharing options...
Josh Posted April 27, 2020 Share Posted April 27, 2020 Thank you for point these out. I will get to them. The new docs system will use markdown files in a Github repo so anyone can propose modifications, and it's also easier for me to edit files there. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 27, 2020 Share Posted April 27, 2020 The last couple of years have been...not frustrating, I am not sure what the right word is...because I could never go into the full detail I wanted to with LE4, because I knew everything was going to be replaced. What is really exciting to me about the new engine is I can be completely meticulous about everything, because it is a much stronger foundation that will last for a long time. You will see this in the coming months. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 28, 2020 Share Posted April 28, 2020 This is what the new docs system looks like. 3 Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.