Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - SpeechCenter

#81
Editor Development / Re: Transition to .net 4?
Thu 14/03/2013 20:04:41
I also managed to build the AGS allegro library with a newer compiler in the past, and don't remember any problems.

You still have the workaround of installing VC9 before VS 2012 and compile the project with the old compiler (simply choose it in the project settings). I checked this with the VC10 compiler and it works.
#82
Editor Development / Re: Transition to .net 4?
Wed 13/03/2013 19:39:43
I'd like to raise this again now that we are talking about 3.3.0 beta
.net 2.0 is more than 7 years old and .net 4.0 is out there for almost 3 years.
It could help not just plugin code, but also the editor since many improvements were added to the framework during this time.

The main impact I see is that those who develop AGS will have to transition to either VS 2010 or VS 2012, but I have been using VS 2012 express version for some time now and the fact that it's the only express version that has C++ and C# in the same IDE is very helpful. It can also use the previous C++ compilers if you have the older compiler installed, the simplest way to make it work is to first install the older VC express and then VS express 2012.

Mono compatibility also discussed here seems fine, main thing to make sure is that people don't add WPF.
#83
Just responded to your PM :)
Does it happen to all the files (that is all characters including the narrator)?
Also, are you using Player or cEgo? (currently "Player" does not play the speech since there is no AGS plugin interface to get the current player, but I could write a workaround if this is the cause)

If you'd like, send me one of the files and the corresponding AGS line that displays the text I could take a look at it on my end.
#84
Actually I contacted pcj privately to understand what is the use case. It seems that they are not sure they will use AGS as the engine. So it's possible perhaps to add some features that will aid in building just a script and export it. The question is whether that would help, not knowing what is the target engine makes it hard to assess if this solution would fit. For example, will it be possible to use updates of the exported file in the engine or will that require rewrites?

Still, the gap on the AGS side doesn't seem that large so if such an option is relevant then we can probably work something out.
#85
In C you can have
Code: C
int *p1, i2;

or
Code: C
int* p1, i2;

which in fact defines the same thing, a pointer to int (p1) and an int (i2). Therefore many prefer the first when using C and maybe that's why you saw these examples.

However, since AGS doesn't really have pointers as in C, you cannot define
Code: AGS
Character *char1, *char2;

only
Code: AGS
Character* char1, char2;


So it's true that in AGS attaching the pointer to the type makes it clearer.

(By the way, all of my examples are actually considered bad style since it's much clearer to define variables in separate lines)
#86
Yes, I agree that holding a program in one's head is a good description. The trait of taking a problem, breaking it down and having a clear logical representation is very important. I too enjoyed the experience of waking up with a solution to a problem from the night before, it's a very rare event, but it's truly fun.

The only thing I would object is the part about "keep rewriting your program", it says that rewriting the program yields cleaner design, but in fact ideally a clean design should prevent the requirement of rewriting a program. I prefer a modular design where you can build upon what you wrote before when introducing more features without requiring you to rewrite. You might refactor things a bit, which is ok since you cannot and should not write everything as generic, but often if one needs to rewrite their code it usually means that it wasn't good enough in the first place (or in case the requirements changed significantly then the new code is actually a solution to a completely different problem, therefore it's not really a rewrite).
#87
Version 2.0.2 released. Includes a bug fix that prevented exporting VA scripts in some cases.
#88
Bug fixed, I'll also update the plugin thread. Thanks KodiakBehr and for reporting it and testing the fix!
#89
room6.asc - line: 101 column: 72 is the first place with error, which means that the parser could not parse the text in that location. I would check carefully what is in that location and maybe a little prior to that.
#90
I added some time ago renumbering to the plugin I wrote. The process is independent from AGS' code, so if the plugin cannot parse it too then it's much more likely in the code. It might also provide more info on the reason, even though that's not the original purpose of the plugin.

edit: actually if there is an error it will come up more immediately when you click on the refresh button.
#91
Quote from: Denzil Quixode on Sun 30/12/2012 23:05:55
I know they're unusual, I think Google's "Go" is the only other language I remember seeing with multiple return values.
There are others, say Matlab (which I don't like the language)
Code: Matlab
[r g b] = getRGB(40892);


However, as you mentioned, the multiple return values problem is that it's easy to discard them, Matlab suffers from the same problem
Code: Matlab
c = getRGB(40892);

would work and c will have only the first return value.

Other languages cope with it by returning a tuple, like Scala
Code: Scala

def addAndSub(a:Int, b:Int) = { (a+b, a-b) }
val (sum, diff) = addAndSub(2, 3)
val bothValues = addAndSub(2, 3)

Here you can either assign them individually or assign a tuple to bothValues so nothing gets discarded silently.

Quote from: Denzil Quixode on Sun 30/12/2012 23:05:55
Code: Lua
local f = assert( io.open('i_dont_exist.txt', 'rb') )   -- /!\ ERROR: i_dont_exist.txt: No such file or directory
-- ... do something with f

This is considered very bad coding in any language that has a notion of debug and release compile as usually the whole assert statement is not compiled into anything in release (it's true that it doesn't usually return value, but this difference is easy to forget). It's a source of very nasty bugs in those environments. Solutions like Scala's Option can help cope with null return values or simply, use exceptions.

Given that Lua is a very flexible language, it  would require using some kind of style guide, otherwise the resulting code can become a horror to maintain.
#92
Quote from: Calin Leafshade on Sat 29/12/2012 19:45:43
However, my original argument was simply that right now it's silly to use AGS Script when Lua is available.
I can see two arguments:

  • More AGS developers know it so there would be more options to recruit a person to a game.
  • As far as I know there are some editor functions that would not work with the current plugin, such as creating a translation file. This means that the specific plugin would have to produce all those functions on its own.

I'm not arguing against Lua, just that there may be cases where AGS Script makes sense in the current state.
#93
I read the instructions and followed on what they do and there is quite a lot already and not the simplest to know. I wouldn't recommend adding more instructions without some kind of review process of the existing opcodes and the proposed new ones.

The idea of runtime optimizer is very common when you have an IL and it could also help when dealing with specific processor architecture.
#94
Quote from: Crimson Wizard on Tue 25/12/2012 20:31:34
Seeing as my changes to script interpreter caused noticable slowdown on PSP port (don't know about others)...
How much slower is it now compared to before? Have you considered profiling the code on PSP (or if no tool is available try to add measurements)?
The reason I'm mentioning this is that profiling usually reveals a lot of information that is very hard to know just by viewing the code. If in fact the solution is some kind of JIT optimizer then profiling will also help knowing where it's best to focus the effort.
#95
Reading this thread, I think CW is correct that the question of what's better is unnecessary. It seems that Lua has advantages for some complex scenarios and AGS Script has advantages for those who would like to keep it simple.

I seem to recall this discussion already took place in another thread and one option was decoupling the language from the editor, making Lua an option, but retaining AGS Script capabilities. Was this approach discussed and abandoned or simply ignored?

#96
Glad to be of assistance and thanks for the comments, they are useful and I think these are very valid points.

There are currently other unrelated matters occupying my time, but I'll probably be able to get to it in a few weeks and then address as much as possible.

#97
Some developers already asked to include the ability to add missing speech line numbers to an existing project in the plugin here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=45622.0

The way it works is that you go to edit mode and choose to "add missing speech line numbers" from the edit button menu. It adds numbers only to the lines that are currently displayed by the filter so you also have an option to exclude some lines from being numbered.
#98
Greetings,

I uploaded a minor update with a few fixes. Download link remains the same.

Feel free to comment or suggest additional improvements.
#99
Based on what I saw in the past, the translated line overrides the whole string, including the "&9" part, so you'll need to include a number for it to play speech.
If it would help you, check out a translation editor tool and the Speech Center plugin I wrote. They both add the original line number to the translated line.
#100
Big congrats. Nice to see this beyond the games.
SMF spam blocked by CleanTalk