cassius Posted March 2, 2013 Share Posted March 2, 2013 I have written my le2 game in the c language without too many probs but when I buy le3 I will have to decide on c++ or lua. I know almost nothing about lua so my question is this: is it a short step from c to c++ or should I learn lua? What do you think? Maybe after a short time someone should run a poll on which language is most used with Leadwerks 3. 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...
Canardia Posted March 2, 2013 Share Posted March 2, 2013 I would say it's trivial. 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...
Admin Posted March 2, 2013 Share Posted March 2, 2013 I think Lua is good for simple behavior and learning. For performance you will want to write demanding code in C++. We made Darkness Awaits in pure Lua just because it's easy to understand, but in reality you would probably use C++ for the AI and player, just because it would allow you to have more characters active at once. Most games will probably use a combination of C++ and Lua. C++ for the main code, Lua for simple things like doors and game level interactions. Quote Link to comment Share on other sites More sharing options...
cassius Posted March 3, 2013 Author Share Posted March 3, 2013 Thanks. I will be looking for a first person example to get me started. I am no good at setup code but ok at gameplay stuff. Anything in the main loop I can handle. 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...
Chris Vossen Posted March 3, 2013 Share Posted March 3, 2013 Often times C++ is considered a superset of C (This is not technically true) but it is very close to C. I've always felt that if you can learn C you can learn anything. Quote Link to comment Share on other sites More sharing options...
Furbolg Posted March 3, 2013 Share Posted March 3, 2013 Please dont make the mistake and equal c with c++, c++ is based on c but has some major improvement (new(constructor)/delete(destructor), templates, classes (private/public/proctected, inheritance, virtual)..... etc.) When you mastered c, c++ isnt that hard but there are differences (malloc/realloc/free vs new/delete ... dont to mention stl). Quote Link to comment Share on other sites More sharing options...
cassius Posted March 3, 2013 Author Share Posted March 3, 2013 Now your scaring me. I probably won;t need most of those. 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...
Furbolg Posted March 3, 2013 Share Posted March 3, 2013 Oh you will, because class mytest { public: mytest() : someint(0), somefloat(0.0f) { calcsome(); } private: int someint; float somefloat; void calcsome() { } } int main() { mytest* test = new test(); // or mytest test2(); } is much better then somethind like int someint; float somefloat; void calcsome() { } void xyz_init(int a, float B) { someint = a; somefloat = b; calcsome(); } int main() { xyz_init(0, 0.0f); } Quote Link to comment Share on other sites More sharing options...
Josh Posted March 3, 2013 Share Posted March 3, 2013 Please dont make the mistake and equal c with c++, c++ is based on c but has some major improvement (new(constructor)/delete(destructor), templates, classes (private/public/proctected, inheritance, virtual)..... etc.) When you mastered c, c++ isnt that hard but there are differences (malloc/realloc/free vs new/delete ... dont to mention stl). I probably use about 2/3 of those things. The subset of C++ we stick to is pretty simple to use. I wanted to keep things simple so we could be sure it would compile everywhere. 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.