Author Topic: Which scripting language should fs2_open have?  (Read 6357 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Which scripting language should fs2_open have?
i think so. damn that was a long tme ago, i was still on a 120 mhz machine. :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline CaptJosh

  • 210
Which scripting language should fs2_open have?
I still run into crap occasionally that needs vbrun600.dll. Interestingly enough, I've taken that file and renamed it for  the purpose of older programs still which wanted vbrun300.dll(or lower) and it worked just fine. :D
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Which scripting language should fs2_open have?
i remember in the old days of modding, before pcs, i wrote a little tool to convert truespace coordanates ato pof coordanates (which required everything be multiplied by 20 and then the order shifted. ithe program i wrote had 3 lines of code, and still required a bunch of bloated dll files. isnt microsoft fun :D i shoulda wrote it in c++
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Inquisitor

Which scripting language should fs2_open have?
Quote
Two, the way Python is done anyways, in order to insert a 'hook' I could just check to see if the bytecode pointer was NULL before doing anything else. Thus, no part of the interpreter/VM, beyond the initialization and destruction functions, would be run unless there was Python to parse.


That sounds like a good way to handle it...

THe advantage I see that python itself has, would be the availability of people who know the language. If this were a standalone game engine, that would be VERY important to me, would mean my programmers and scripters would not have to learn somethign totally new and/or alien, and finding new people to work on stuff would be easier, and support would be more readily available.

How modular are the "hooks"? Could you conceivable architect it in such a way that you could "swap" out another scripting language relatively easily?
No signature.

 

Offline FireCrack

  • 210
  • meh...
Which scripting language should fs2_open have?
Hmm... initialy the scripting language will be for HUD's, will we eventualy be able to add scripts to weapons, etc... ?
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline Inquisitor

Which scripting language should fs2_open have?
That, I hope, is the intention. Otherwise there isn't mcuh point :)
No signature.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Which scripting language should fs2_open have?
Quote
Originally posted by Inquisitor
How modular are the "hooks"? Could you conceivable architect it in such a way that you could "swap" out another scripting language relatively easily?


It depends.

With Python I was going to use code snippets in tables and just evaluate those. With Lua, I'm not sure how practical that is, and I may have to use callback functions.

Lua has the same concept of sessions that I abstracted Python with, so I may be able to easily modify my existing classes to handle both.

My thinking is that I'll add HUD scripting first, and branch that out as seems fit.
-C

 

Offline Luigi30

  • 27
Which scripting language should fs2_open have?
BF2's scripting was in Python. And we know how that turned out :P

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Which scripting language should fs2_open have?
OK, I've been working on getting Lua implemented into FS2. I've gotten it working on start, but I've run into a minor snag of doing it on a per-frame basis...

Apparently, the Lua devs have not seen fit to let you easily compile, and then store, Lua script for further use. The problem is that while there is a function to compile Lua code and put it on the 'stack', there's no function to get it from the 'stack' to C.

Of course, there are functions that handle compiled Lua code, and full lua scripts can be compiled via the program "luac".

So as it stands, it looks like with Lua, you'd have to specify the function to run in the TBL file, and then put the scripts in a separate .lua file for it to approach being efficient.

Although, I've gotten LuaJIT to run with fs2_open, so functions will automatically be converted to machine code the first time they're run.
-C

 

Offline Flipside

  • əp!sd!l£
  • 212
Which scripting language should fs2_open have?
Quote
Avoid  using  Lua  in  "every  frame"  actions  as  performance  drops
   dramatically.  For example, don't use Lua to do animation updates; set
   up  parameters  for  the  animation in Lua and do the updates in C/C++
   code.

   Avoid  using  Lua  for large game development tasks; rather use Lua in
   quick small-scale actions.

   Avoid  using extremely large table sizes as performance drops in table
   access actions.



From the Industry report on Lua, could this be something to do wuth the problem?

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Which scripting language should fs2_open have?
Ick. Python seems like less work. :D
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Which scripting language should fs2_open have?
i have a feeling lua would be easyer for non-programmers to learn than python would. from the coders aspect its hard but from the modders aspect its easy. and was that not the goal of implementing a scripting language? make it so more people can code stuff for freespace.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Which scripting language should fs2_open have?
I don't know. Easier to use in this case might be overbalanced by the more difficult core implementation.

As for learning lua versus learning python, I'm not a good judge: I already know python. Keeping that in mind, they seem to be on about the same level for readability and learnability. I still lean toward python though because I love the way it forces you to code to a readable standard (drove me nuts at first, and it kept me away from python for years).
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Which scripting language should fs2_open have?
forcing whitespace has got to be one of the dumbest things i've ever seen a programming language do
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Which scripting language should fs2_open have?
Kazan: It is about 9 lines of code to make a proper converter from a {} standard to a whitespace standard. You can make an implementation, with a table flag "Use {}", that will make the SCP code translate the {} you write to a whitespace system for the Python parser.

So get over the whitespace argument, and think about the rest of the implementation issues.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Which scripting language should fs2_open have?
Quote
Originally posted by Kazan
forcing whitespace has got to be one of the dumbest things i've ever seen a programming language do


Forcing blocking through braces has got to be one of the dumbest things I've seen a programming language do.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Which scripting language should fs2_open have?
mikhael: right.. because a ****ing scriptkiddie knows **** about programming languages

you're on ignore
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Which scripting language should fs2_open have?
AWESOME! Kaz ignored me. I must be like, elite.

So, um, where'd the scriptkiddie comment come from, seriously?
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline CaptJosh

  • 210
Which scripting language should fs2_open have?
Kazan, you're not helping your case. Try acting like a mature adult instead of a pissed off teenager who can't be stuffed to make a well reasoned argument and maybe more people will be inclined to listen to you.

Right now, the essence of your argument is that Python sucks because you don't like how you have to format code for it.

Someone has already countered this with the assertion that a translator can be made to change braces into whitespace for the parser, so you can code with braces if you want to, assuming that method works.

As for your personal attacks on mikhael, you sound far more like a kid than he does. You're not going to gain any support by acting a fool.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Which scripting language should fs2_open have?
My argument in the other thread was Python sucks because: It's Slow, a resource hog, poorly designed, not suited for high-speed realtime applications.

And that didn't get through the thick skull of a certain individual here who has been HARASSING us for months to get his beloved sploodge-dream into FS2 or Ferrium.  He got rather RUDE when i told him no in the Ferrium thread.


I'm sick of him - he can take his wet dream elsewhere - a scripting layer is the LAST thing FS2 needs and WMC is dangerously close to forcing a fork! Goober5000, taylor and myself are deadset against it - taylor refuses to fix any memory leaks associated with it and he's our best memory-fixer
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir