SoloWingPixy Posted March 30, 2016 Share Posted March 30, 2016 Good day, Around September, a generous relative overheard me grumbling about the state of video games and deciding to surprise me: copies of GameMaker:Studio Pro and the full version of Leadwerks. I was well aware of what GameMaker is (who isn't at this point), but I wasn't as familiar with Leadwerks, and was under the impression it was more akin to something like CopperCube 5 and haven't looked at it closely until recently. Anyways, I recently ordered a book to help me start learning C so I can get a good enough grasp of the language to understand Anton Gerdelan's OpenGL 4 tutorials. Dr. Gerdelan's book teaches OpenGL 4 in C, not C++. While that seems to strike many as odd, he does so cause OpenGL was written in C and so far his book has nothing but positive reviews, some of them from OpenGL learners who found it more helpful than the Superbible. Now, what I'm wondering is, how much different is C++ from C, truly? Dr. Gerdelan's book is my priority, and I think I'm safe and sane to assume GameMaker Language will be simpler to pick up, especially compared to C, but it'd be a colossal waste to not ever use Leadwerks. Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted March 31, 2016 Share Posted March 31, 2016 Welcome! The basic concepts between C and C++ are the same. In fact, you can write most of the C++-stuff in C-style, as well. The most important difference between C and C++ is that C++ is (/can be?) object oriented. This means that things are organized in classes, which have attributes and functions. Actually classes are only more comfortable ways to represent structs and corresponding functions. In order to work with the C++-Edition of Leadwerks, you will have to make yourself familiar with the concepts of classes, but other than that, there is not much difference between C and C++. 1 Quote Link to comment Share on other sites More sharing options...
Rick Posted March 31, 2016 Share Posted March 31, 2016 Learn Lua if you ask me. You'll be a lot more productive right off the bat in Leadwerks with it. 2 Quote Link to comment Share on other sites More sharing options...
thehankinator Posted March 31, 2016 Share Posted March 31, 2016 I agree with Rick, learn Lua first. Even if you needed to mod the engine, a lot of your game will likely still be scripted in Lua so it is a great place to start. Personally, I've not come up with anything I needed to mod the engine for. Also working with Lua, you will learn a lot about how the engine works before diving head first into the C++. 1 Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 1, 2016 Author Share Posted April 1, 2016 @Ma-shell: That's good to hear, thank you for giving me that answer. @Rick and thehankinator: Sorry, I should have clarified that even before I had received the entire Leadwerks software package along with GameMaker:Studio, I was already seriously considering learning C so I could understand Dr. Gerdelan's book anyway. See, my older brother's aiming for an animation degree except he's always preferred hand drawn animation (he's quite a good artist) and schools really only teach animation through the use of Maya and he's only used it for one class so far which last year. I figured if I could get a good grasp of OpenGL, I could potentially offer advice or even help (if its allowed) on future projects. Modding the Leadwerks Engine hadn't even occurred to me. I've done very little programming, so doing something like that is a bit too beyond me right now! Anyways, are you guys are telling me that me learning Lua first would not only get my feet wet with Leadwerks quicker, but also make picking up C easier? Is attempting to learn two languages simultaneously not advised for someone just starting out? Quote Link to comment Share on other sites More sharing options...
cassius Posted April 1, 2016 Share Posted April 1, 2016 I use c++ for making games in leadwerks .I don't know lua but don't need it. The leadwerks c++ api is easy to use and you have all your code in one place with c++ AND a main loop you can put your gameplay in. 1 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...
Rick Posted April 1, 2016 Share Posted April 1, 2016 What kind of advice are you hoping to give your brother by learning OpenGL? Also, when hank says "modding the engine", it's a little misleading. When you use C++ you aren't really modding the engine per say. I think what he means is that with C++ you can bring in other C++ libraries to use with your Leadwerks game. Like one for networking, or a GUI system, etc. So really it's just combining different C++ libraries together. You can do that in Lua as well with Lua libraries though. There are just more C++ libraries, but there are quite a few Lua libraries I'm finding out as well. We are just saying that if you wanted to get the max use out of Leadwerks it would be easier and quicker to use Lua. It's probably not going to help you with C that much. Also note that you don't need to use C++ to make games with Leadwerks. You can use straight C if you wanted to. Quote Link to comment Share on other sites More sharing options...
Bytecroc Posted April 1, 2016 Share Posted April 1, 2016 I am also have buyed over a year ago the book from Anton Gerdelan Amazon Kindle. It's much better to understand than Object Oriented C++ OpenGL Tutorials. But I got surprisingly a job offered in Nov 2014 so I buyed also Leadwerks Pro, I do not use LUA, the C++ OO structure in Leadwerks is not that much complicate. There are some small examples in the API reference, compile them and look how they work. It's a good training. And LUA is not easier in my opinion. Quote Leadwerks 4.x Pro, examples please for C++, english is not my native language. Link to comment Share on other sites More sharing options...
nick.ace Posted April 2, 2016 Share Posted April 2, 2016 Rick is an expert in Lua and trains people in Lua, so his advice is very valuable! I'm experienced in C/C++, but I use Lua about 99% of the time with Leadwerks. It's so much simpler and quicker to get things done and tested. Waiting for your program to compile only to see seg faults appearing isn't the most pleasant thing in the world. Handling strings and other more complex objects can also be a pain. Plus, it's easy to just attach Lua scripts to entities in the editor. If you are really interested in game dev, then starting with OpenGL might be kind of tricky (which is why people buy engines in the first place). To completely understand it, you need to have a good foundation in linear algebra, a decent knowledge of GPU architecture, and an understanding of advanced programming concepts (such as precision errors). In terms of C differing from C++, C++ is somewhat a superset of C, meaning that C code will run when compiled with a C++ compiler. OpenGL being written in C shouldn't matter, but I think the reason to teach it in C is because C++ features aren't really necessary for OpenGL. You are welcome to use C++ if you want though, and it'll probably scale better as you develop a larger OpenGL program and start using a bunch of shaders and VAOs. Classes are simpler to manage that structs with function pointers imo. There are other useful features besides classes with C++, and usually compilers are a little less stringent on C++ syntax because the standard is more forgiving. BTW, what is your background in programming? Jumping straight into C/C++ isn't usually recommended for beginners. 1 Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 3, 2016 Author Share Posted April 3, 2016 @ Rick Unless I'm mistaken, his student license for Autodesk Maya is expired so long as he's not actively enrolled in graphics/animation class, which he isn't right now because as he isn't an out of state student, he's assigned pretty crummy registration dates. This has really gotten him down and discouraged lately. I recommended he download Blender to sharpen his skills in the meantime, but he hasn't given it any look thanks in no small part to all the Maya cheerleaders at the colleges and universities. So I figured if I can learn enough OpenGL to do some animation, I can show him that even though it might not be what the industry prefers, it doesn't mean it's useless. And since a lot of indie animators lately seem to use a combination of the two, hopefully I can be of help to him if he's struggling with an assignment or a project he's doing in his spare time. It's always been his dream to be a Disney Animator, and I'd hate for him to start thinking he's never going to make it. Anyways, I hope I gave no offense, considering you seem to be the resident Lua expert. I love S.T.A.L.K.E.R. and all the scripting and AI is done with lua, so that adds all the more weight to your suggestion. @nick.ace I did try a couple of Coursera courses in Python, but I struggled with all of them. It was only when I began reading some online tutorials on C did programming make some more sense to me. For example, in the coursera classes, I don't ever recall any of the professors talk about why the lines of code that end the main function do just that. The online C tutorials? I was able to grasp that the main function was waiting for the program to return false just from the "Hello World!" example. C++ on the other hand? I've heard nothing but horror stories about how obtuse it is, and I've been finding it disheartening that so many online tutorials when it comes to games use it or C# as opposed to C. Nigh all of said tutorials stress "proper C++" and seem to want to backhand anyone who writes a C++ in a C style. I take it you and Rick would advise against trying to learn C and Lua concurrently, then? Quote Link to comment Share on other sites More sharing options...
Rick Posted April 3, 2016 Share Posted April 3, 2016 Are you implying that you are going to write an animation application? Wow, seems like a rather big task. This just seems strange to me. Get him to use Blender. You aren't really doing him any favors by writing a custom animation app that won't transfer to any other job because it's an unknown setup. If he wants to be a Disney Animator then get him to use Blender if he can't afford Maya or other modeling software packages. There is no way, no offense to you but most people here couldn't either, including me, write an animation app that would come close to those other professional apps that already exist. Most people find Python to be good. I personally am not a huge fan because I don't really like having formatting affect the code, but I can see why some like that since it brings a structure to the language. If you are new to coding, which it sounds like you are, then learning 2 languages will only confuse you. You might want to give C# a try first. It's very C like, but much easier to learn than C. You can download Community Visual Studio for free online. However, coming back to my first part of this post. If you think you're going to write an animation application with raw OpenGL given the skill level you are at now, you are way in over your head, I think. 1 Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 3, 2016 Share Posted April 3, 2016 I saw the word Blender in here and then decided to read on haha. Just my 2 cents. The principles for animating is pretty much the same across all applications, sure there are different tools to do things in different ways but it's still all the same principles. You move some objects and make a keyframe, move stuff some more and make a keyframe, essentially automating parameters to give the effect of motion. Blender is fantastic for animating. I used Maya LT (which is on Steam for around £25 a month) and the workflow compared to Blender is exactly the same. I would really recommend showing your brother Blender as it costs nothing, there is a ton of tutorials on Youtube showing how to use the program, sounds like your serious about this as well so you could buy him a subscription to CG Cookie so he can do some learning there about how to animate in Blender, they have some really great courses on there and subscription is next to nothing per month considering the knowledge he would learn which would really improve his animation skills. As long as he learns the principles of animating the rest would be learning the programs tools to do what he already knows, that's it haha. The more time he spends in Blender practicing the better he gets so if he does need to pick up his learning with Maya all he would have to do is learn the tools to do what he already knows. Hope that helps. 1 Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 3, 2016 Author Share Posted April 3, 2016 @ Rick Oh no, no, no, me write a animation application? I guess I'm pretty terrible at explaining myself. I know OpenGL is used to build animation applications or game engines (cause isn't that what Leadwerks was built from?) but I also thought you could use OpenGL for modeling and animation like you would say Maya or Blender, the biggest differences being that Maya and Blender you do this with a GUI whereas with OpenGL you need to use the API. I didn't think I'd have to write an animation application. Quote Link to comment Share on other sites More sharing options...
Rick Posted April 3, 2016 Share Posted April 3, 2016 I'm still unsure of what you are trying to do. You are trying to code models with OpenGL? Nobody does that. They use modeling software to make the model and then you use OpenGL or game engines to load those models in. You have Leadwerks so if you just want to load a model then just use Leadwerks to do that. It takes about a min to do that and place it in your scene. If you want to code models how does that help your brother? If you want to build a modeling app then again, way too big of a task for someone at your skill level. However, I'm really not following what you are actually trying to do here. Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 3, 2016 Author Share Posted April 3, 2016 I'm still unsure of what you are trying to do. You are trying to code models with OpenGL? Nobody does that. They use modeling software to make the model and then you use OpenGL or game engines to load those models in. You have Leadwerks so if you just want to load a model then just use Leadwerks to do that. It takes about a min to do that and place it in your scene. If you want to code models how does that help your brother? If you want to build a modeling app then again, way too big of a task for someone at your skill level. However, I'm really not following what you are actually trying to do here. After reading yours and ScrotieFlapWack's posts, I'm starting to wonder if I even know myself. I think I need to gather my thoughts for a bit, please pardon me and I'll get back to you ><. Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 3, 2016 Author Share Posted April 3, 2016 I saw the word Blender in here and then decided to read on haha. Just my 2 cents. The principles for animating is pretty much the same across all applications, sure there are different tools to do things in different ways but it's still all the same principles. You move some objects and make a keyframe, move stuff some more and make a keyframe, essentially automating parameters to give the effect of motion. Blender is fantastic for animating. I used Maya LT (which is on Steam for around £25 a month) and the workflow compared to Blender is exactly the same. I would really recommend showing your brother Blender as it costs nothing, there is a ton of tutorials on Youtube showing how to use the program, sounds like your serious about this as well so you could buy him a subscription to CG Cookie so he can do some learning there about how to animate in Blender, they have some really great courses on there and subscription is next to nothing per month considering the knowledge he would learn which would really improve his animation skills. As long as he learns the principles of animating the rest would be learning the programs tools to do what he already knows, that's it haha. The more time he spends in Blender practicing the better he gets so if he does need to pick up his learning with Maya all he would have to do is learn the tools to do what he already knows. Hope that helps. I don't why I didn't notice your post until now but it helps quite a bit actually, thank you for all the advice. I'll let him know as well as look into all of this myself. 1 Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 3, 2016 Share Posted April 3, 2016 @SoloWingPixy. No problem man. When I first started modelling, animating, etc, I always thought I had to stick to one program and learn that to do what I needed to do but as the years ticked on I realized that the principles of these skills are the same. Once you and your brother know the fundamentals of animation or modelling or whatever it is you want to do the only thing holding you back would be the tools and the tools is all down to the program you use. You'll realize the more time you spend learning the actual skill and the principles behind it you can then focus on what program you would like to use with your newly learnt skills. It's all down to personal preference, maybe there is a tool in Maya you like to use frequently which is why you would choose that, or you like how fast Blender is with all its hotkeys. Whatever you choose I would focus on those principles first, once you have those down you can then make a choice of what program you would like to use. Quote Link to comment Share on other sites More sharing options...
Bytecroc Posted April 3, 2016 Share Posted April 3, 2016 If you are not sure if C++ is the right language then the only thing is what you can do to find out if it's the right language --> do it. go to this side, it's the best side to learn the STL http://www.cplusplus.com/reference/ possibly you want to learn how a file would be opened and read some binary code from it go to fstream then fstream or ifstream and click read look here http://www.cplusplus.com/reference/istream/istream/read/ you see examples for nearly each function in the STL library which is the base for C/C++ programming. start programming with console programs. To get a feeling for 3D programming you can try for the first the now free Blitz3D, it's outdated, but gives you a good feeling for 3D programming. And to switch to Leadwerks then is very easy. And don't let you suggest that you can not program an animation program, you can if you want. My first program (beside the small things I have done to learn 3D programming) was AnimB3D, not very successful but I have also stopped the development because Pacemaker and CharacterFX becomes free. And I would not say I am a professional programmer but I do what I want to do and not what other say what I can do or should do. But it's your choice if you do it or not. You can if you want, that's the truth. My first C++ program was a compiler or let's say converter that let me program C++ in BASIC Style, I did not like the == and the semicolon ; at he end of the line, I did not like curly braces { } to mark blocks, but to learn C++ was the only way to get the freedom to program what I want, today there is possibly the choice of C# but I stay with C++. So I go my way with BASIC to C++ but it's still C++ at the end. And you will find your way, if you say ony C not C++ is my way then you should go that way. Quote Leadwerks 4.x Pro, examples please for C++, english is not my native language. Link to comment Share on other sites More sharing options...
Bytecroc Posted April 3, 2016 Share Posted April 3, 2016 This gives you an overview how slow lua is against C/C++ http://benchmarksgame.alioth.debian.org/u64/which-programs-are-fastest.html Quote Leadwerks 4.x Pro, examples please for C++, english is not my native language. Link to comment Share on other sites More sharing options...
nick.ace Posted April 3, 2016 Share Posted April 3, 2016 Those benchmarks are completely irrelevant: 1. They are testing on computationally expensive algorithms, not games. Those benchmarks aren't even labelled as gaming related benchmarks. As far as I know, using Haskell for gaming would be a horrible idea! 2. They are likely not using a LuaJIT compiler. Of course a scripting language is going to be slower without caching the results. Even comments will contribute to speed loss at that point. If Lua were so slow, why do AAA games use it? Here's a benchmark for LuaJIT: http://luajit.org/performance_x86.html 3. Lua in Leadwerks (and any reasonable game engine that uses Lua) used compiled functions from the API, so even the computationally expensive parts (like pathfinding) are only going to be negligibly slower since you are effectively calling the same piece of code as you would in C++. Also, I don't think anyone is saying that he's wrong to do something. A lot of us have a lot of programming experience and have seen people struggle trying to learn things a certain way and don't want newcomers to make the same mistakes. Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted April 3, 2016 Share Posted April 3, 2016 I also wouldn't see a benchmark as relevant for deciding whether to use Leadwerks with C++ or LUA: The computationally most expensive parts of a frame are most likely the rendering and the physics simulation, both of which are done by Leadwerks. Unless you totally screw up, your own programs written for Leadwerks will not influence the computational speed too much. Quote Link to comment Share on other sites More sharing options...
Bytecroc Posted April 3, 2016 Share Posted April 3, 2016 OK, I was not informed about the speed of LUAJit or better I have not recognized that there is a difference to LUA. LUA was for me a interpreted script and so automatically slow. This let me think about some tests I will made in the near future. And possibly a BASIC to LUA converter. Quote Leadwerks 4.x Pro, examples please for C++, english is not my native language. Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 3, 2016 Author Share Posted April 3, 2016 Okay, I've reread my initial post and see I really should have proofread it better, so apologies everyone. Anyways, while he was doing a project for the art (not animation) class he's currently taking for transfer credits earlier today, he vented about people at his college telling him he has to learn to program if he wants to make it at Disney, and as such this is why I mentioned learning OpenGL in my initial post to help him out. This isn't the first time he's mentioned this. If programming isn't required for the animation he wishes to do, why are people at his school telling him otherwise? Quote Link to comment Share on other sites More sharing options...
Rick Posted April 3, 2016 Share Posted April 3, 2016 You'd have to ask those people. You don't NEED to know how to program to be an animator. Knowing how to program will never hurt you though and can only help. It's one of those skills I think everyone should have, but you don't need to be amazing at it and to be an animator I wouldn't think you'd need to code at all. 1 Quote Link to comment Share on other sites More sharing options...
SoloWingPixy Posted April 4, 2016 Author Share Posted April 4, 2016 Okay, then that clears up quite a bit. Heavens. Now in my case, I do have to learn the languages the Leadwerks API requires to make anything remotely resembling a game, obviously, but for character and enemy models, textures, and whatever else, that's what Blender is for. 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.