Jump to content

  • Log In with Google      Sign In   
  • Create Account


Scripting Languages ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
46 replies to this topic

#41 LessBread   Moderators   -  Reputation: 1411

Like
Likes
Like

Posted 23 March 2002 - 12:08 PM

quote:
Original post by Redleaf
As you may have seen, I''ve been doing an article series on this subject, and although I''m not quite up to the topic of "script latency" I will eventually get to it, unless I have a freak stroke or something first.



Yes, I read the first two quite attentively and skimmed the 3rd one. I thought you gave the subject a great treatment. What do you have planned for the 4th installment? How many installments do you have planned? Do you have a plan? - or a rough plan more or less that can be adapted to meet requests and such?

Here, let me give you a plug: Creating a Scripting System in C++ Part III: Dynamic Loading



Sponsor:

#42 Greg Rosenblatt   Members   -  Reputation: 219

Like
Likes
Like

Posted 23 March 2002 - 12:20 PM

I have a basic "overview" if you wouldn''t go so far as to call it a plan. I outlined it in the first article. What I''m doing is taking a few related parts of the complete system, and implementing them a little at a time to see how much explanation and code changes they require. Using that, I gauge how much I can reasonably fit into a single article without it becoming bloated.

The current part I''m writing deals with a data stack and implementing program flow. It make use of a few basic concepts that can be used to develop many of the common features of high-level languages, such as complex mathematical expressions and control structures such as if-else and looping.

I originally was expecting at least 7 or 8 parts, but with the way I''m going, it may actually take more. I''d rather have the series be longer than not do justice to a particular topic.

And of course I''m also trying to meet requests that are made as best I can.

"Don''t be afraid to dream, for out of such fragile things come miracles."

#43 LessBread   Moderators   -  Reputation: 1411

Like
Likes
Like

Posted 23 March 2002 - 12:59 PM

Cool. So are you aiming for a particular publishing rate - like once or twice a month or are you going to take it slower than that - and for that matter do you have much say in that at all? - that is, that''s a perogative of the gamedev editors?

#44 DaTroof   Members   -  Reputation: 162

Like
Likes
Like

Posted 23 March 2002 - 06:12 PM

quote:
Original post by Kylotan
Most embeddable scripting languages provide facilities for you to exit the script by calling a certain function. The problem is that you then lose all your symbols as the script is considered terminated. What would be really useful is a function that suspends the script so you can resume it later. I expect there''s a language out there that does this, but I''ve not found it yet. So I think I will have to settle for my own (Flex/Bison-made) solution.



Again, you might want to look into TCL. It lets you create a namespace and execute a script in the namespace''s scope. Variables created in the namespace aren''t lost when the script terminates. I don''t know if this is exactly the implementation you want, but it sounds to me like it would do the job.

http://www.scriptics.com/man/tcl8.4/TclCmd/namespace.htm has some good info, particularly in the "What is a namespace?" section halfway down the page.


#45 Greg Rosenblatt   Members   -  Reputation: 219

Like
Likes
Like

Posted 23 March 2002 - 06:51 PM

Actually, I just work on the current article whenever I have the free time to do so. I don''t physically put the articles up myself, so the true perogative of when they will be featured is left to Dave, as long as I''ve submitted the next article. When my free time is lacking, the rate at which I will get the articles submitted suffers, unfortunately.

But once an article is submitted, Dave normally has it up within a week.

"Don''t be afraid to dream, for out of such fragile things come miracles."

#46 Kylotan   Moderators   -  Reputation: 3324

Like
Likes
Like

Posted 24 March 2002 - 07:22 AM

TCL''s namespaces look more like a hack that gets around the problem rather than a clean solution. (Relative to the problem, that is - I''m sure they are an elegant solution to other issues.) Does it support restarting a script half-way through?

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

#47 DaTroof   Members   -  Reputation: 162

Like
Likes
Like

Posted 24 March 2002 - 09:54 AM

quote:
Original post by Kylotan
TCL''s namespaces look more like a hack that gets around the problem rather than a clean solution. (Relative to the problem, that is - I''m sure they are an elegant solution to other issues.) Does it support restarting a script half-way through?



Admittedly, this solution is probably beyond the original intention of namespaces. The language itself doesn''t support restarting scripts, but it can be simulated through an extension. You''d have to pass the code within my theoretical When command back to the interpreter extension (the When command''s code) as a string argument, store the string in the engine''s queue, and pass it back to the interpreter when the condition is met, executing it in the script''s original namespace so previously declared variables don''t get lost. When the script is terminated, we can clear the namespace. This would solve the problems we discussed about maintaining scope and passing control back to the engine itself.

Doesn''t sound very elegant, does it? It may not be; I haven''t actually tried to implement it. Also, it negates the possibility of precompiling scripts, since the engine is being forced to treat code as data. I''m at a loss for a better solution, though.

I won''t beat this dead horse any longer, but if you have any other thoughts, I''d love to hear them. It''s been an interesting discussion.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS