as-33 0 Posted May 15, 2003 I personally favor an object oriented language (e.g. Ruby or Python). It should for example be possible to extend the default classes, so that you can implement methods like GetUnitsInRadius(radius) or IsUnderFire() for all units in the game yourself if you need them. Any comments? Share this post Link to post Share on other sites
Baron Hurlothrumbo IIX 0 Posted May 17, 2003 IMO its too late to talk about this now since they are already in development and the BIS coders will not want to change (I assume they like the way they are doing coding atm) Share this post Link to post Share on other sites
ID7 0 Posted May 19, 2003 Well, if it works OK why fix it? The main plus of OOP model is inheritance and private data hiding, which is mostly useful in large projects only. For small projects OOP is usually overkill and introduces unnecessary bloat. If you have no use for inheritance and hiding, OOP is reduced to syntactic sugar, player.SetDir(180) vs setdir(player,180), plus the object overhead. Share this post Link to post Share on other sites
Gummi 0 Posted May 19, 2003 i think its nice as it is, they could maybe add some commands and stuff... + i/we know the scripting language is now so we dont have to learn new one Share this post Link to post Share on other sites
uiox 0 Posted May 19, 2003 Vote for fortran, but I prefer, don't know in english , cards with holes... Share this post Link to post Share on other sites
as-33 0 Posted May 20, 2003 Do you want to know why I want a new scripting language? Just look at this example (from the official Resistance campaign): radio2 setPos [getPos radio2 select 0,getPos radio2 select 1,(getPos radio2 select 2)+0.95] You have to look at it a few seconds until you understand that this line of pseudo-natural-language-code does nothing more than increasing the z coordinate of radio2 by 0.95! With OO syntax you could simply write radio2.z += 0.95 And that's only one of thousand examples. (Of course this poll won't influence the OFP2 programmers in their decision, I just wanted to know what people think about it.) Share this post Link to post Share on other sites
MP Studio 0 Posted May 20, 2003 I dont want to have a new scripting language. I dont want to learn one again. I cost me 6 month in OFP to completly learn it. @as-33 a simple parameter in the objectsetting would be easier Share this post Link to post Share on other sites
toadlife 3 Posted May 20, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (as-33 @ 20 May 2003,06:29)</td></tr><tr><td id="QUOTE">Do you want to know why I want a new scripting language? Just look at this example (from the official Resistance campaign): radio2 setPos [getPos radio2 select 0,getPos radio2 select 1,(getPos radio2 select 2)+0.95] You have to look at it a few seconds until you understand that this line of pseudo-natural-language-code does nothing more than increasing the z coordinate of radio2 by 0.95! With OO syntax you could simply write radio2.z += 0.95 And that's only one of thousand examples. (Of course this poll won't influence the OFP2 programmers in their decision, I just wanted to know what people think about it.)<span id='postcolor'> Or you could write a function called "move", save it and whenever you want to use it, do this: [object,0,0,.95] call move To me it aint broke. Share this post Link to post Share on other sites
as-33 0 Posted May 20, 2003 @MP Studio: I bet it didn't take you 6 months to learn the language, but to learn how to use all those poorly documented functions. A new language wouldn't be a problem for anyone if there was a good function reference with examples. @toadlife: Yes, but it's still not very intuitive. And I think it's sad that it's necessary to write functions for simple things like this... Share this post Link to post Share on other sites
uiox 0 Posted May 20, 2003 good for bad or bad for good Share this post Link to post Share on other sites
toadlife 3 Posted May 20, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (as-33 @ 20 May 2003,12:35)</td></tr><tr><td id="QUOTE">@MP Studio: I bet it didn't take you 6 months to learn the language, but to learn how to use all those poorly documented functions. A new language wouldn't be a problem for anyone if there was a good function reference with examples.<span id='postcolor'> I don't think the ends would justify the means. Many of the people here in the editing community, including me have had absolutely no programming experience whatsoever before we stumbled into ofp scripting. Like many others, it took me a lot longer than those with programming experience to pick up on the scripting. It's easy for someone like you who is most likely a programmer for a living to say you want a more powerful, and complicated language for OFP, but what about the people who love to make missions, but don't write code for a living? I would welcome added commands (functions), a better official reference and even better support for OFPfunction-like syntax (C++), but I don't think completely changing the scripting language would be productive for the community. We already have a massive amount of knowledge available on scripting and editing in OFP - from an editing standpoint, completely changing everything around would put the community back in the position is was in back when OFP:CWC first came out - We had no scripting reference, no documentation on the editor, briefings, overviews, or the various file formats used in he game. Back when OFP first came out, we had to rely on a bunch of hacks (Lustypooh, Duma, Kegetys, Bloodmixer, ect) who either already knew a thing or two about programming, or were very bright and had a lot of time on their hands, to reverse engineer the game for us and figure everything out. Like I said, I think a little tweaking and adding of features wouldn't hurt anything at all, but to completely change everything would. I don’t think changing everything would kill the game – but it would definitely sting the existing community. Share this post Link to post Share on other sites
as-33 0 Posted May 21, 2003 The OFP scripting language is very inconsistent, this is what makes it so difficult. For example, why do I have to write removeallweapons soldier, but soldier addweapon "m16" (look at the position of "soldier")? Since version 1.85 there is also another language in OFP (sqf-files). It looks a bit more like a "real" programming language ©, but I think it is too difficult for beginners. As I wrote before, Ruby would be the perfect solution. Don't you agree that </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if CarHasArrived cam = Camera.new cam.pos = [car.x, car.y, car.z + 5.0] cam.target = car wait 10 cam.destroy end <span id='postcolor'> is MUCH easier to understand than </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ? !CarHasArrived: goto "skip" _camera = "camera" camcreate [0,0,0] _camera camSetPos [getpos car select 0, getpos car select 1, (getpos car select 2) + 5.0] _camera camSetTarget car ~10 camdestroy _camera #skip <span id='postcolor'> ? Both "programs" create a camera if CarHasArrived is true, set it 5m above the car, wait 10 seconds, and destroy it. Share this post Link to post Share on other sites
The_Captain 0 Posted May 22, 2003 Keep in mind that there are a LOT of operation flashpoint missions and scripts that would require complete rewrites if ofp used a different style of language. BIS is already planning to add and change certain functions, but scripts will still be convertable relatively easily to the new language. With a completely new language, some of the absolute best operation flashpoint missions that rely on hundreds of kb of scripts would be reduced to rubbish, which I feel is unacceptable. I also don't feel like rewriting Homeland Security from scratch... Share this post Link to post Share on other sites
SpecOp9 0 Posted May 22, 2003 Honestly I feel it will remain the same, just like OFP. Only with many "additions" ETC. If they want compatibility with both games as much as they can, having the same scripting language is likely to be required. Share this post Link to post Share on other sites
or65 0 Posted May 24, 2003 About learning and scripting I think it's a bit of a shame that game scripting languages aren't getting standardized. Only a few people learn to know it deeply, a few more now quite a bit, but the rest of us get confused and irritated by the inconsistence of scripting language structure and code syntax. What a wonderful world it would be if there would be a universal understanding of scripting game AI and mission events. One could SHARE innovations BETWEEN games and versions, one could COMPARE the methods of achieving realistic behaviour of AI and LEARN from other applications. I've been learning the gramar of a couple of game scripting languages and wasted a lot of time learning quirks of coding that are completely obsolete. There are things not-to-do just because they are. This is silly, really. If bistudio really likes to have OFP2 to live, say, five years it should lay down coherent syntax for scripting language, not just patching patched patches. That way people could really get into AI and event scripting. Games could be used in programming courses as development platforms and this would benifit whole game industry in the future. or65 Share this post Link to post Share on other sites
Gummi 0 Posted May 24, 2003 Honestly I feel it will remain the same, just like OFP. Â Only with many "additions" ETC.If they want compatibility with both games as much as they can, having the same scripting language is likely to be required. good point, if its changed then all addons and missions and tutorials and code snippets and stuff needed to be remade. Share this post Link to post Share on other sites
toadlife 3 Posted May 26, 2003 After reading posts from people who want an oo langauge, I think I wouldn't mind there being one. but I would like backwards compatibility with the old scripting language in OFP2 along with the new scripting langauge. If you're going to move to a new laguage, phase the old one out - don't just ditch it. We don't want BIS to pull an IBM on us. Share this post Link to post Share on other sites
Baron Hurlothrumbo IIX 0 Posted May 26, 2003 *sings 'not gonna happen, not gonna happen, not gonna happen * Share this post Link to post Share on other sites