Andy Gilbert Posted June 21, 2013 Share Posted June 21, 2013 Hi, just updated my leadwerks 3 to find that a change since its original release it it can now only have 1 script file per object? Why is this and how does this now work? For instance the animation manager? Do i have to integrate all of the animation manager code into all my scripts that I assign to objects with animations? It was much easier before, or am i missing something? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
MikeClarke Posted June 21, 2013 Share Posted June 21, 2013 Would it be simpler to store all code that is being utilized several times in a specific class/function file. Then each object, include a file that just calls all the other files into play and specifies which functions to activate. For example create "RegFunctions.lua" Then require it in each of your object script files and just call the relevant functions you need. Quote Operation Mosquito Recruiting 3d Modeller/Animator. (pm if interested) It is the greatest of all mistakes to do nothing because you can do only a little. Do what you can. - Sydney Smith Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 21, 2013 Share Posted June 21, 2013 Unfortunately this has changed, 2 updates back. http://www.leadwerks.com/werkspace/blog/41/entry-1081-leadwerks-3-update-available/ Quote Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 It's very sad that it got changed to one script per entity. I talked to aggror these days about this problem, multiple scripts per entity is really an must have. I understand Josh wants the newcomer not to get confused. Thats how i could imagine a "middle-way": For Beginners: entity.Script:Blabla() // gets the first/top script and executes funtion Script:Blabla() For Advanced: entity.Script[ index/string ]:Blabla() // same as above just with indexer // or entity.Script:GetScript("goblinai"):TakeDamage() Quote Link to comment Share on other sites More sharing options...
ZioRed Posted June 21, 2013 Share Posted June 21, 2013 @Furbolg: This kind of inconsistency is simply awful. As you, I also think that an entity should definitely not contain only one script but as many as we need, no matter if you can "require" other scripts, it's just weird that you have to use a glue to tie all the scripts (lol it reminds me LOTR: one ring to rule them all!). But in my opinion the way to go to access other scripts should be your second (entity.Script["MyScriptName"]), it's just more readable than Script:GetScript. And also I think that we should have the possibility to connect a script member (Entity type) to a prefab/model from the assets folder instead of only actually existing objects in the scene (and this way you should be able to declare a member type as Material, Texture, Source and any other type of "entities" but selectable from the assets folder too). This kind of stuff (and the weird LUA syntax and limitations at my programmer's eye against other well known great languages for scripting) is the main reason I don't use scripts at all, besides the fact that I Love to do much more experience in C++. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 I agree a lot. Lua is not C++, LE 3 should keep C++ for such programming way, an let Lua be the "fun and play" language with possibility to have multiple scripts and it's lot more easy and fun that way Could LE3 come back to multiple scripts for our pleasure , and make back Lua the main language for 3D artists ? (specially for casual mobile or casual PC (dungeon master like remakes, advneture/action FPS , script is good enought, no need ot go C++) We should make a vote and ask Josh ? It should not be incredibly hard to come back to multiple scripts ? (I liked a lot LE 3 as it was at beginning with multiple scripts, i played a lot with that en enjoyed that way to attach scripts , even made by other people). Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 @ZioRed: "@Furbolg: This kind of inconsistency is simply awful" : If you are meaning the GetScript() part... its just an suggestion. I would also recommend a indexer (Script["goblinai"]). "and the weird LUA syntax and limitations at my programmer's eye against other well known great languages for scripting" : That's your opinion but tell me please which other great scripting language do you mean ? Dont tell me phyton. @ YouGroove: I think we all know you are against all c++ stuff guy but that wasn't the topic. You should noticed that lua is the "main language" for all non programmers and Josh also wants to release an indie version of LE3 with just LUA. Quote Link to comment Share on other sites More sharing options...
ZioRed Posted June 21, 2013 Share Posted June 21, 2013 "@Furbolg: This kind of inconsistency is simply awful" : If you are meaning the GetScript() part... its just an suggestion. I would also recommend a indexer (Script["goblinai"]). Yes I liked exactly your suggestion of Script["Scriptname"] (I didn't said it was my own idea eheh), "awful" was for both Script:GetScript and "inconsistency" was for using only Script to access the first. "and the weird LUA syntax and limitations at my programmer's eye against other well known great languages for scripting" : That's your opinion but tell me please which other great scripting language do you mean ? Dont tell me phyton. I don't like any scripting language at all, I love only high-level strong-typed programming languages where I can do everything (even interact with the operating systems libraries and functions; I know python could do this work, but its syntax is as awful as LUA as bash), so of course I was talking about C#, but I know that Microsoft and NET is definitely seen as the last and most evil around this community so I neither feel to discuss here (but I use it elsewhere and everywhere, with no bottlenecks, no FPS drop, no any of the "cons" that many around here complain, when you know your stuff) And of course as ever it's only my own opinions, I don't expect others agree in any way. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 You have to do compromises, im totally a c++ fanboy but i have to say lua has its uses. I do also C# in my job and its very handy and fast to write code. Microsoft could built it up on multiple platforms like java but they dont want to... could be really nice... yea its a shame Quote Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2013 Share Posted June 21, 2013 I wish MS would have just stuck with C++ instead of inventing .NET. However their implementation with MFC was a nightmare, but it's not as if that was the only way to implement their framework with C++. They seem to be going back to C++ now though so that's good. I also use .NET at work and like the framework but 99% of the framework could have been made using normal C++ and looked the exact same. I'm not a fan of C++/CLI though. The one script thing is something Aggror and I were trying to fight against but I don't see any signs that it'll change. It's not the end of the world but just kinda sucks and limits us in programming styles some. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 Furbolg : Im' not against C++, you don't seen my posts , but i compile now project with VS to be bale to use Lua. And i also created some protos projects on C++ only.My next step is create my C++ Game framework as LE3 don't have a level example with Player and NPCs. Nope having Lua only, multiple scripts would be good and would make me come back to full lua casual game making. For 3D artists or new comers to programming , or template modders Lua is good. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 So simple and short: We all want/accept multiple scripts ? Thats cool Quote Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2013 Share Posted June 21, 2013 For 3D artists or new comers to programming , or template modders Lua is good. This is a misconception in LE. It's like saying SQL Server isn't a serious database. It very much is these days, just like Lua in LE is very serious. I love C++ too, but we are indie programmers and I promise that 99% of us won't be taxing the computers enough to worry about the speed difference between C++ and Lua. So then it comes down to available libraries, but that's where it gets interesting because you can expose any C/C++ library to Lua. I made RakNet bindings before and had RakNet networking in Lua in LE. The gap between Lua and C++ is actually pretty small, and even more so in the indie world where we generally aren't taxing the computers. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 but we are indie programmers and I promise that 99% of us won't be taxing the computers enough to worry about the speed difference between C++ and Lua For big complex RPG, with multiple NPC AI to manage at same time, complex AI navigation in top of pathfinding, well C++ can be better suited. But if you are making some simple Run & jump games, Dungeon master remake, casual Third person shooter, arcade driving with indie graphics but good ones, could it be PC or mobile, i also think Lua will be enought in terms of speed. In some other concurrent engine, i see a bunch of 3D artists making games using some templates ready or going script only, specially on mobile games. And LE3 at beginning was great : I made several camera scripts, i could test , attach any of them at ay time , same with several AI scripts i was able to attach a common part and a specific one for specific NPC. Making behaviour that way was so fun and easy, like using components. One script is some big step back. I hope it will be reconsidered in the "user and components, tamplate" side advantage,more in the interest of non core programmers , instead just for the art of programming or visual style. Could we crate some voting for that ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2013 Share Posted June 21, 2013 For big complex RPG, with multiple NPC AI to manage at same time, complex AI navigation in top of pathfinding, well C++ can be better suited. The odds (read not impossible but very slim. do you play the lottery?) are small indie teams aren't going to make such a game. It's important to be realistic about your goals. You can dream big, but your goals need to be reachable. You wouldn't try out for a pro football team with having no experience right? So I'm not sure why people with little to no experience think they can compete with the big boys and make such large games. 2 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 You know i seen some very indie RPG in big world, by super little team, they have created their own dynamic navigation system, and even sell it, and sell some solution RPG package. I seen the video, not sure they made character/npc models or houses, but it was looking great and really good, and navigation was top. They just need dialog, quests,inventory and a good story With good tools/engine, hard work it can be done. Indeed they won't make Skyrim 3D art, dialogs, all 3D art, all level design etc ... that's thousands people work during some years. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted June 21, 2013 Share Posted June 21, 2013 Basically, we found once we got into serious game scripting that the entire concept made programming a mess. This is explained in detail here: http://www.leadwerks.com/werkspace/blog/41/entry-1081-leadwerks-3-update-available/ 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...
MikeClarke Posted June 21, 2013 Share Posted June 21, 2013 In my opinion, not knowing v.much c or lua I think 1 language is better regardless. It makes the community sharing resources much simpler. Yes it requires recompiles for c which lua doesn't but small cost if it makes the dev teams task easier for the engine and means the scripts people share are suitable to all. Quote Operation Mosquito Recruiting 3d Modeller/Animator. (pm if interested) It is the greatest of all mistakes to do nothing because you can do only a little. Do what you can. - Sydney Smith Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2013 Share Posted June 21, 2013 You know i seen some very indie RPG in big world, by super little team, they have created their own dynamic navigation system, and even sell it, and sell some solution RPG package. You know I've seen people win the Powerball lottery and get 200+ million dollars too This is why I talked about the ODDS are that a small indie team won't be making massively complex games at the level of caring about C++ vs Lua speed. A good number of these teams that make it also have people on their team who were in the industry to start with for many years and have the experience. Dream big, set realistic goals. I still don't understand the harm in allowing multiple scripts. If someone only wants to use 1 script then the multiple script system still allows that. Best of both worlds. Let the community decide which is best for them. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 Basically, we found once we got into serious game scripting Darkness was already a casual working game, already serious , no ? And scripts just worked... 1) Multiple scripts attached was really good, perhaps hard core programmer think no, but indeed this is no more hard core programming but scripting and modularity. 2 ) The health value can be managed per entity in it's own variable like : - attactkOnMe = false - if true decrease health Even better non same regin entities don't have ot run update() or check if player attacked them. 3) Instead of having plug-and-play scripts everyone can share, we have to devise a system of expected script names and variables. This breaks compartmentalization, which is what we were going for in the first place. Both Chris and I realized this approach was fundamentally wrong. - it's a core programmers advice from two core programmers : why not asking 3D artists community first ? Caus Lua is for them not for core eprogrammers. Instead of having plug-and-play scripts everyone can share That's what we wanted as 3D artists, why deciding for us what is better ... It seems i hear XBOX ONE guys saying : "we 'll make the system super closed and super restrictive" and finally they gonna super open Why closing scripts that way to non core programmers ? With the new way i see no more sharing or template scripts, this was a big advantage for non programmers.Should we not think to them instead of programming style ? Lua just loosed all it's interest that was module scripts we could share and just attach as we want and need. I stop beeing the bad boy , I won't insist a lot in modularity if LE3 just keep Lua this way, it's like that. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Andy Gilbert Posted June 21, 2013 Author Share Posted June 21, 2013 Hmm well when i initally made that FPS demo with Leadwerks 3, that was one fo the features that "to me" that made it possible to develop something so quickly. I found it so simply to create specific script, named as i want them and simply attatch them to objects? Now its back to copying and pasting code from other scripts files, and will end up with large messy script files? IF this was simply down to thinking it was confusing for beginners, i personally think thats a wrong decision, i was a beginner to LE3 and found it super simple. Shame. Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 Instead of having plug-and-play scripts everyone can share That's what we wanted as 3D artists, why deciding for us what is better ... It seems i hear XBOX ONE guys saying : "we 'll make the system super closed and super restrictive" and finally they gonna super open Why closing scripts that way to non core programmers ? That's why i preorder PS4 @ Topic: I'm sorry to have talking about but Unity has multiple scripts and it doesnt seems they have problems. As i mentioned some posts ago, you could do a two-way solution. 1 simple access for guys that want 1 script per entity and an more advanced method for the guys that want multiple scripts. Everyone can use the single scripts (FPS/TPS camera, Door slider etc.) and the advanced people can create more flexible systems and behaviors. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted June 21, 2013 Share Posted June 21, 2013 Reply , i share same about scripting changing in such basic way, it passed from modern high level script modularity to one file old system script The majority of us having used it in first form want the return of multiple scripts. It was fun, it was great, why going inverse and remove the fun , the great modularity it was ? Will it turn like XBOX ONE like revirement also ? Multiple scripts = -More guys having fun -More non programmers having fun -More shared scripts -More popularity -More non core programmers coming aboard etc ... @Fulborg : Microsoft understood lot fo gamers was going to PS4 caus they didn't liked Microsoft dictature. So you can buy Xbox One also (some guys sayed PS4 seemed more powerfull ...?) Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Furbolg Posted June 21, 2013 Share Posted June 21, 2013 @GouYroove: I dont like XBox, PS4 is cheaper, has more power and i liked the PS3 exclusives Games Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21, 2013 Share Posted June 21, 2013 Component systems are a mess. We realized quickly this was a mistake that would lead to lots of problems down the road, and compromise what users are able to do with it. 2 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.