Josh Posted February 23, 2018 Share Posted February 23, 2018 I noticed during the switch from procedural to OOP in the Blitz community (Blitz3D to BlitzMax), a large number of users were unable to grasp the idea of functions tied to objects. I am considering making the script API procedural in Leadwerks 5: OOP: local box = CreateBox() local material = LoadMaterial("Materials/brick.mat") box:SetMaterial(material) box:SetPosition(1,5,3) box:SetRotation(0,90,0) box:Move(0,0,1) Procedural: local box = CreateBox() local material = LoadMaterial("Materials/brick.mat") SetEntityMaterial(box,material) SetEntityPosition(box,1,5,3) SetEntityRotation(box,0,90,0) MoveEntity(box,0,0,1) This is just an idea. I don't know if I will do this. What are your thoughts? 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...
Rick Posted February 23, 2018 Share Posted February 23, 2018 I'm personally not a fan but I guess it comes down to if you think you are losing sales or that is stopping people from making games with LE or you can get to market faster with that style. 1 Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted February 23, 2018 Share Posted February 23, 2018 I would prefer the OOP-way since you can easily get information about what can and what cannot be made with an object... This especially applies to auto-completion, like intelli-sense. It is far more convenient to only see the functions that apply to the given object. But why don't you do both? You can also create the procedural functions as wrapper-functions that merely call the OOP-functions or vice versa. 3 1 3 Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 24, 2018 Share Posted February 24, 2018 OOP, please. Mostly for the selfish reason that it allows me for the most part to use old code without having to completely rewrite it and procedural will pretty much guarantee that majority of your current users will be frustratingly be typing in the wrong code because they keep forgetting that you just decided to randomly change your API syntax. 3 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Crazycarpet Posted February 24, 2018 Share Posted February 24, 2018 Gross, please don't go procedural. I would use plain C 100 pct of the time rather than C++ if I didn't want OOP.... If a user has problems grasping the concept of OOP they should spend some time learning the tools that each programming language provides before moving onto game development.... If you can't grasp the concept of OOP, you will never be able to make a game.. Simple as that. The concept of polymorphism is fairly simple, it is taught to first year computing students @ any university in North America and these classes are absolute jokes most students take to avoid having to take calculus. It would be a shame to see LE move away from object oriented programming. Not to mention Blitz isn't a great example to follow, considering it is not a very popular programming language to start with. It certainly isn't known for it's "smart" design choices. 1 Quote Link to comment Share on other sites More sharing options...
aiaf Posted February 24, 2018 Share Posted February 24, 2018 You dont really need advanced OOP to use Leadwerks and can simply do a game procedural style is suported by c++ also. Unless new api is more simple to use for users i would go for oop. For example i really like this api change because it simplify things: local model = Model:Box() local box = CreateBox() Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
Josh Posted February 24, 2018 Author Share Posted February 24, 2018 17 hours ago, Ma-Shell said: I would prefer the OOP-way since you can easily get information about what can and what cannot be made with an object... This especially applies to auto-completion, like intelli-sense. It is far more convenient to only see the functions that apply to the given object. Best reasoning here. However, the author completion we have now is limited. The dynamic nature of Lua makes this difficult because a variable’s type is not explicit. So developing a parser will be necessary. 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...
gamecreator Posted February 24, 2018 Share Posted February 24, 2018 I agree with the auto-completion/intelli-sense reasoning too. Especially when something is not documented and/or unofficial, it's nice to see something suggested you didn't think of. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 24, 2018 Author Share Posted February 24, 2018 I must go to Germany now. ?? 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...
GSFC_1 Posted February 24, 2018 Share Posted February 24, 2018 3 hours ago, Josh said: I must go to Germany now. ?? go to Kaiserslautern!!!! 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.