Jump to content

C++, Lua and editor tutorials


AggrorJorn
 Share

Recommended Posts

Hi Aggror,

 

good c++ classes tutorial, thanks for mentioning me wub.png Am i famous now ? wink.png

 

I just get some suggestions:

- when you speak from a class: it's definitely method not function

- you can use "using namespace leadwerks;" within cpp files (it's bad style to use it in a header because everyone that includes your header also get this "using namespace xxx;" to work with... within cpp files it doesnt matter)

- std::string::c_str() is from the Standard Template Library (STL) not c++ (im a bit of smart *** ohmy.png) and stands for const string

 

Im a also doing something like this:

 

class foo()
{
// C'Tor / D'Tor
public:
foo();
~foo();
// Methods
public:
void method();
};

Link to comment
Share on other sites

@Furbolg: Thanks for the feedback. I will definitely call them methods from now on.

 

 

Lua script added for:

Animation: http://www.leadwerks...o-animation-r14

First Person Camera: http://www.leadwerks...rson-camera-r15

Third Person Camera: http://www.leadwerks.com/werkspace/page/tutorials/_/making-a-third-person-camera-r16

Edited by Aggror
Link to comment
Share on other sites

  • 2 weeks later...

@3Dski :

lol

I see C++ pasionnated people, what i'm not dealing with little non significant stuff like it could be done like that or like that, all that will only confuse me laugh.png

C++ in LE3 would just need some complete gameFramework and system like we have with Lua.

Actually, could it be the player, other characters, they are created in MainApp class, they are not instanced in some World Entities Manager Class from the map file where they are placed.

 

For me Lua advantages :

- No compiler, all in one tools (just edit Lua files)

- Have all Lua files on the ressources panel

- Ready to use game framework

- Attach script on entities

- References between entities and their script

- Enought powerfull for PC or Mobile small to Medium or Zone based games.

- You can share script , and import script into your project and use directly (just attach it to some entity)

- Fast prototyping for non coders working in a team with programmers

Stop toying and make games

Link to comment
Share on other sites

You are right about the benefits of Lua YouGroove. If someone is more comfortable with C++ then that's great and they can use that. If the game you are making pushes the envolope of the CPU then C++ will be a better option.

Link to comment
Share on other sites

Guest Red Ocktober

if you can code in one, you can code in the other... i find the place where people have the most difficulty is in the application of good logic... most jump right into coding before they think through the logic behind what they're about to implement...

 

anyways, i just wanna pay a BIG TRIBUTE TO AGGROR, for his tireless work and contribution to the community... even though i haven't licensed 3 yet, i'm following his tuts with great interest... and anticipation laugh.png

 

ok... so have i embarrassed the guy enough biggrin.pngbiggrin.pngbiggrin.png

 

--Mike

  • Upvote 1
Link to comment
Share on other sites

Thank you for these. I will watch them with complete interest. I'd rather code in Lua.

 

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

Wow ... really good tutorial aggror smile.png

 

You are right about XML its a good format because you can change your level format in a minor way without messing up your loading routine. The problem with XML is its size, i would prefer a binary level format in the final result/game (with stream::writeint etc) because its faster to load.

 

// edit:

 

If you want to see a real bloated XML file, have a look at an animated complex Model in COLLADA Format... its the worst i've ever seen...

Link to comment
Share on other sites

I don't know if this is the place to ask questions about an existing tutorial, but I'm seeing something odd with Tutorial 5 even when I replaced my code with the source posted with the video. When using the keys to control camera direction while in the physics mode, once set in motion, the camera continues to drift in that direction without stopping. How can this be handled?

Link to comment
Share on other sites

I am using aggrors third person tutorial code as the basis for my project.

Question is should I parent my character to the playermesh (cylinder) then hide the cylinder or is it best to replace the cylinder with my character ?

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

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...