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 - Phemar

#81
Quote from: monkey_05_06 on Tue 18/06/2013 02:26:37
First things first, thanks for having readable code. It means a lot to me. I mean, you inject random blank lines in the middle of functions for no reason whatsoever, but I mean, at least I can read it.

Readable code is very important to me too :D Yea I do put a lot of whitespace in my code, but my mind processes code 10x faster when everything's separated, so it's just a stylistic choice. If you look carefully you'll notice that similar/related lines are grouped together.

Quote from: monkey_05_06 on Tue 18/06/2013 02:26:37
I wanted to note though, there are some opportunities for generalization that I think would help improve this module. As an example, I don't understand why you opted to use a macro for label coloring versus a structure property. The latter would be of relatively equal simplicity to implement, but would give the end-user a customization opportunity that is presently missing. If you're worried about encapsulation, you could always use attributes instead of raw members.

You're probably right about the label coloring. I just figured label coloring would be a constant, so that's why I used a macro but I guess I can see that people might want it to be dynamic.

As for encapsulation, I literally only picked up this whole programming thing about a month or two ago so I'm not really sure what that means. I took about a week's worth of Java in high school seven years ago but dropped it after a week so I'm still quite new to the whole thing. Everything's a learning experience though!

I'm still getting used to the whole nomenclature and vernacular of everything.

Edit:
Things I've realized are missing from this module:
1. Text wrapping - needs to be added in a future release.
2. Option to sort the options bottom to top.
4. Option to change whether one remaining option is automatically spoken or not.
5. Auto numbering of options.
6. Option to set whether options that have been selected dim/change color.

None of which should be too hard to implement.
#82
I'm just left feeling terribly confused.
#83
I went to Chicago, climbed a tower and played some pool :D



#84
Great, that's awesome! I really should update the documentation.

Anyway, let me know if you have any other feature requests.


Edit: Documentation updated, hope things are a lot clearer now.
#85
But the brackets were still missing ;)
#86
That's an interesting problem, Ghost. I'll definitely have a look at it when I get a chance, either later tonight or tomorrow. I did upload this demo, which combines the module with non-blocking speech, but I'll do a proper open-source demo soon!

Edit: I just read the documentation, which seems to be a bit out of date. You shouldn't call ScrollDown on the gui, but instead call it on the struct itself.

So use
Code: ags
NBD.Scrolldown;


instead of
Code: ags
gDialog.NBD_ScrollDown;


I refactored the code before releasing it and I guess I forgot to change the documentation. I don't know if this will solve the problem. If it doesn't, can you clarify and explain exactly what is going wrong? I'm not sure I understand exactly from your post.
#87
Quote from: monkey_05_06 on Fri 14/06/2013 14:08:11I'm actually curious how difficult it would be to actually implement this into the AGS engine (which could revolutionize the AGScript language).

At the cost of some compile time, since the compiler would first have to scan through all the scripts and note the position of each declaration before it actually does the compiling :D
#88
Actually, since you're using a Say command in there (the string of spaces) you could use that to play the speech. just format the string somehow. I can give you code later when I'm at home (I'm in a car at the moment).
#89
Awesome. I was just thinking of releasing something like this, after all the recent topics in the technical forums. I can see a lot of newbies benefiting from an updated ALARCOST template :D

Edit: Would it not be easier to just release this as a standalone module? It would make integration easier for people with existing projects.
#90
Quote from: Ryan Timothy on Thu 13/06/2013 00:31:35
Ascovel, it says EXCEPT for templates, modules, plugins. You're in the clear.  ;)

Published templates, modules and plugins!

It would be great if we could use modules and snippets of code that we've written but never published.
#91
I guess you could just incorporate a sound argument into the function, although this would use normal audio files. I'm not sure about using actual speech files.

It does seem a bit verbose to convert the whole string to spaces for the character to say. You could just use the formula ((text length / text reading speed) * game speed) to work out how the long the text should be displayed.

That's the formula AGS uses I believe.
#92
Well I wouldn't put it in game_start, since the module's game_start will run before the global script's game_start and the player's change to the variable would register after you've checked its state.
#93
Why use repeatedly_execute to check EVERY game loop if the player has changed the option? From the looks of it it only runs once when the game starts.
You could just make it a function: eg. SC.SetOption (eSC_CustomInvClicks, true); or SC.SetOption (eSC_SwapLeftRight, false); etc.
#94
My module does exactly this!

You might want to combine it with a background speech module for the exact functionality you described. SayBackground doesn't do talking animations or wait for the text to disappear before continuing with the script.

Edit: I uploaded a little demo to show what it can do when combined with background speech. Check it out!
#95
This could work.

Code: AGS
function btnIconExit_Click(GUIControl *control, MouseButton button) {
 gIconbar.Visible = false;
 int i = 0;
 while (i < 50) // since there are 50 hotspots max
 {
  if (hotspot[i])
    hotspot[i].Enabled = false;
  i++;
 }
 gQuitter.Visible = true;
}
#96
I'm not entirely sure what you're asking. Could you perhaps clarify a bit more?
#97
+1 Vote for Ryan and Subspark's version.
#98
Khris, you make me laugh haha :D
#99
That's probably the way to do it, and I think I already kicked myself earlier for not doing it that way.

I think I'm just gonna redraw it (sigh! haha), but this time do it on a separate layer for each shade. At least it was a good learning experience - you don't learn without screwing up, right?
#100
It does, however the relationships between the colors aren't too nice. For example, in the original, the hue shifts from the green to red going from the lightest shade to the darkest. With the new colors it shifts more correctly.

So I've tried changing the hue of the layer and playing with adjustment layers using different blending modes and whatnot, however the problem lies with the actual relationship between the colors - so those need to be sorted out before any of those other techniques will work.

Edit: Haha Miez it's awesome you posted here, it's actually your FOY tutorial I've mainly been following while drawing this :D
SMF spam blocked by CleanTalk