Page 2 of 3
Re: Squirrel Discussion
Posted: Sat Jan 31, 2009 3:27 am
by psychopath
Makes sense. Personally I still lean more in favour of Python, but another approach would be to just offer support for multiple scripting languages. Different users have different needs, and it shouldn't be too difficult to create an abstract scripting module for the engine.
Re: Squirrel Discussion
Posted: Sat Jan 31, 2009 3:21 pm
by Jay
Personally i think it would be better to have just one scripting language. It's fewer work to maintain the code, it's fewer work to make updates to the code, it makes it easier to answer to forum posts regarding the scripting language (I just know some users will come and say they have problems with the scripting language, and then we won't know which language is meant...) Also with 2 scripting languages we would need more tutorials, more documentation etc.. It could also become so that only one language will be used and the other becomes code garbage. Or users only see tutorials for one and then don't know that there is another scripting language, which again throws the other out of the picture. Even in best case when both languages would be used and supported equally it would mean that half the code to implement the scripting, half the scripting documentaion, half the scripting tutorials would be for nothing...
Compared to the benefits it's much more work.
Re: Squirrel Discussion
Posted: Sat Jan 31, 2009 5:54 pm
by paradoxnj
I agree with Jay here...from a support standpoint it would be a mess to have a generic scripting module. Also...all scripting languages have very distinct APIs and binding libraries. Lua has luaBind and toLua++, Python has the Python API and Boost::Python, AngelScript has a decent API, and Squirrel has SqPlus. To make a generic interface to account for all the nuances in each API/Binding Library would take too damn long and be too damn buggy.
Python is a decent language, but it is notoriously slow when you embed it into applications. I am aware that Battlefield uses it, but Battlefield is a game that has a specific focus. RF2 is meant to be used for all kinds of games and not just FPS. From a training point of view, the larger the scripts are, the harder it is to troubleshoot scripting errors...Andy was writing a script editor just to do that. Squirrel doesn't need it because Squirrel doesn't rely on invisible characters and it's logging is far better than Python's. Python also double's the size of the EXE when using it as a DLL (I can imagine what it would do if you statically linked it). Squirrel is actually compiled into the shell and is half the size of the Python version of the shell.
Re: Squirrel Discussion
Posted: Sat Mar 07, 2009 8:07 am
by zany_001
More people use Python, so it does mean they don't have to learn a new language coming to RF, however if Squirrel is faster I would use that. If it is easier too, then I won't complain.
Incidentally, did you acutally try that script cos I noticed an error you made:
RF2GetGame().getWorld().addExplosion("bombexposion", getPosition(), "bombdebris.mesh", 3000);
should be :
RF2GetGame().getWorld().addExplosion("bombexplosion", getPosition(), "bombdebris.mesh", 3000);
....I know, I'm silly, but it was bugging me.....ok no that was pointless humour, soz.
Re: Squirrel Discussion
Posted: Sat Mar 07, 2009 2:39 pm
by paradoxnj
More people do not use Python for games. More people use Lua which is what Squirrel is based off of. I don't know where you get your information from. Don't you have to learn a new language anyways? RF currently uses Simkin.
....I know, I'm silly, but it was bugging me.....ok no that was pointless humour, soz
The answer to your question is yes. Considering that it's just a name for the explosion, it doesn't really matter what is in that field. By the way...I looked up "soz" in the English dictionary and could not find it....
I have low tolerance for unfounded information and ridiculous criticism in a post that is looking for a valid opinion. If you have an intelligent opinion, I would love to hear it.
Re: Squirrel Discussion
Posted: Wed Mar 18, 2009 1:48 am
by zany_001
I never said more people use Python for games, however I believe more non-game developers use it than they use a game-orientated language such as Lua. As RF seems to be more aimed at non-skilled game designers, new to the industry, who have no or little programming knowledge, Python would be simpler for them to learn, and it is more likely that they have already learned Python for some other reason than game design. They wouldn't have to learn a new language if they got to move to Python, and I wouldn't have to as I already know a little Python. I am aware that Simkin is RF's current language.
I also don't think that Python should be used for RF2, I was merely stating a possible reason for you to choose Python, in case you hadn't heard my argument before. I was playing the devil's advocate as it were. Squirrel seems better, but I don't know enough about it so I thought you should be able to know what other people coming to RF2 may argue, as to the scripting language choice.
'Soz' is New Zealand slang for 'sorry', I didn't realise that other countries don't use it.
My information wasn't unfounded, you merely assumed that I was talking about GAME scripting languages, however I meant ALL scripting languages, specifically those designed for beginners.I didn't intend to criticise you or your post, and was trying to point out a possible opinion, as I have already said. If you weren't able to understand that from my more youthful-styled language, then I apologize, as I am used to internet users being able to understand me fairly well, I will endeavour to use better grammar etc. on the RF forums if that will make you happy.
Re: Squirrel Discussion
Posted: Wed Mar 18, 2009 3:07 am
by paradoxnj
That is because this is about RF2..a game shell...so application of a scripting language would be for games. Games are very different from a standard application. I could care less if someone could write an entire application using Python. I'd be more interested if someone used Python for their game shell and what their experience was.
As for Python being easier for a beginner...here is why I disagree:
-- Python relies on whitespace characters in it's parser (tabs, spaces, etc). If one is out of place, the script will not run. It is too sensitive to mistakes. Beginners tend to make a lot of mistakes.
-- Functions in Python are defined by the keyword "def". Squirrel uses the keyword "function"...to me that is much easier for a beginner to understand.
-- Python includes a library of things that you don't need in a game...I could probably trim this down, but why the effort?
-- Because Python's main installation has all this extra stuff in it, it leaves it open for someone to write destructive code.
I don't know about you, but I find the Simkin language to be very frustrating and ugly also. I could have just stuck with Simkin, but I thought that RF2 could be more powerful using a more robust language that looks elegant.
That is a much better answer as you explained yourself thoroughly and sounded intelligent. Thanks for the feedback.
Re: Squirrel Discussion
Posted: Wed Mar 18, 2009 9:53 am
by Allanon
Might check out [url=
www.http://www.stackless.com/]Stackless Python[/url] which is used in EVE Online, Second Life, and the Sylphis3d engine. According to
this article it is:
* Made for multi-threading
* Doesn't rely on the underlying OS thread
* Threads have small footprint on memory and CPU
* Threads take O(1) time with simple round-robin scheduling algorithm
Here is a good description of what Stackless Python is:
http://davidf.sjsoft.com/mirrors/mcmill ... kless.html
And here is a good paper that shows tradional Python programing verses Stackless Python programing:
http://members.verizon.net/olsongt/stac ... kless.html
Re: Squirrel Discussion
Posted: Wed Mar 18, 2009 3:27 pm
by Gamemaker
ahh, dudes, let's take HTML,
Re: Squirrel Discussion
Posted: Wed Mar 18, 2009 8:56 pm
by paradoxnj
Thanks Allanon...I will have a look at that.
Re: Squirrel Discussion
Posted: Thu Mar 19, 2009 9:02 am
by zany_001
Gamemaker wrote:ahh, dudes, let's take HTML,
*cough*
I don't know about you, but I find the Simkin language to be very frustrating and ugly also. I could have just stuck with Simkin, but I thought that RF2 could be more powerful using a more robust language that looks elegant.
Yeah Simkin mostly sucks compared to more modern languages IMO.Though I'm no expert.
Re: Squirrel Discussion
Posted: Sat Mar 21, 2009 10:06 pm
by Jay
Multi-threading? Does this pssoibly mean that the scripts will be executed in a different thread than the graphics, or will all scripts have different threads? With both we would gain speed on multicore processors (or even on the intel hyperthreading-processors), with the second possibly more, but the first would be easier to program scripts for i imagine.
Either way it would be good for the game speed, which is definitely good. I hope i am understanding this correctly?
btw i wasn't posting the whole time because of some weird 'forum-bug' where it let me log in, but threw me out instantly. So i was listed as online but couldn't post. very strange...
Re: Squirrel Discussion
Posted: Sat Mar 21, 2009 10:21 pm
by bernie
btw i wasn't posting the whole time because of some weird 'forum-bug' where it let me log in, but threw me out instantly. So i was listed as online but couldn't post. very strange
Yes I am still having that problem but only on my Win2k Pc, I suspect its something to do with MSN It was working fine until I cleared out my internet cache and deleted all my cookies.
Re: Squirrel Discussion
Posted: Sun Mar 22, 2009 1:49 pm
by paradoxnj
@Jay: Yes. RF2 will have 3 threads...one for the main loop, one for AI and one for scripts. It is also able to do background loading via Ogre's resource manager. You will see a FPS increase on multi-core processors. I am going to use a thread pool which will scale the number of threads based on the number of processors you have. In short, it will adapt to your machine. This will not be day one of course.
Day 1 you will have the 3 threads.
@bernie: I haven't had that issue since I switched over to forum.realityfactory.info. Are you using that URL?
Re: Squirrel Discussion
Posted: Sun Mar 22, 2009 2:05 pm
by bernie
yes thats the address i am using.