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 - Crimson Wizard

#13061
Quote from: ThreeOhFour on Sun 15/07/2012 19:11:59
Firstly, I am not sure why you have a speech portrait character.
It is not a nomral speech view, it is a character image during the "death" sequence.

Quote from: ThreeOhFour on Sun 15/07/2012 19:11:59
Secondly, the character is saying what you've asked them to say, but you never see it because you have specified the event to occur before the room fades in. If you actually want to be able to see the speech, you need to trigger the event after the room fades in. Use function room_AfterFadeIn rather than function room_Load to fix this.
Now, that's something I missed :) maybe I confused room_Load with room_FirstLoad. But yes, this is likely the reason of the problem.

Quote from: ThreeOhFour on Sun 15/07/2012 19:11:59
Also, unless you really need it, and as much as I like the number, I advise against using room 304 for anything. Unless it's been changed and I am unaware of this, AGS doesn't save room states beyond room 300, so you're best to use rooms below this number unless you really need more than that.
It is a death sequence room, it does not need to be saved, as far as I understood that.
Or... can it be you just don't like him using number 304? :D
#13062
Does that flickering happen when you use DirectDraw5 renderer or Direct3D 9? I had certain troubles with DD5 on Windows 7, including graphic corruption in some games.
#13063
Alright I am done!
I mean it. Done.
Phew.
:)

The clean-up stage is now "officially" over.
What's left is make sure engine compiles on other supported platforms. Also copy the latest changes from 'main'. Perhaps from 64bit too, but only after it is merged with main somehow.

@BigMC, I've put all platform-dependent files into platform/<platform-name> folders. I believe the rest could be used for any platform. Except the code in obsolete folders- they should not be used at all.

I hope those porting issues will be eventually worked out. Sincerely I got really bored with this code-tidying task and want to move further and do some other interesting things.


//--------------------------------------------------------------------------------------------------
EDIT: some useless statistics (does not include library sources and patches, and unused code):

AGS 3.2.1 SVN:

    Common:
    - headers: 15
    - sources: 12
    Engine:
    - headers: 4
    - sources: 24
    Total:
    - headers: 19
    - sources: 36

Refactory branch:

    Common:
    - headers: 51
    - sources: 39
    Compiler:
    - headers: 11
    - sources: 9
    Engine:
    - headers: 206
    - sources: 220
    Total:
    - headers: 268
    - sources: 268 <--- good coincidence
#13064
Quote from: RickJ on Sat 14/07/2012 20:50:07
(Isn't there anything anyone can do about not being able to clip the error messages out of the message box?)
You actually can do that, just press Ctrl+C when the error window has focus.
Unless there's some error with error window ;)
#13065
Quote from: RickJ on Sat 14/07/2012 20:53:57
1.  Display runtime errors so that the error test can be selected, copied to the clipboard, and pasted into a forum post or email.
I've started writing new output system for that purpose:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=46290.0
It's a preliminary draft yet. Also I've started drafting error handling system, but don't know who will implement that and when.
Basically, idea is to customize where errors and warnings are being printed (log file, window, etc).

Quote from: RickJ on Sat 14/07/2012 20:53:57
2.  Make command line arguments available to the script.  Probably needs some editor work as well to accomplish.
I don't think it is a difficult task. Engine already stores cmdline args, although they are used only during initialization. New script commands could simply create script objects of String type, that contain command argument, like:
Code: ags

int i = CmdArgs.GetCount();
String s = CmdArgs.Get(0);

I seriously think this is one day of work.
#13066
Quote from: JJS on Sat 14/07/2012 12:17:12
You can only write to the documents and the appdata folder. The program files directory is indeed not writable by an application.
Hmm, does not AGS 3.0+ writes there by default?
#13067
Quote from: Caracal on Sat 14/07/2012 17:29:00
But honestly the "previous room" is not a good solution. Just emagine if there are rooms (and there are) in which several death scenes occure... how wouldi i program the diffrent lines the portrait sais? I need a better solution for this.
Well, this one is a simple one. Make a global variable, preferrably of enum type, like:

GlobalScript.ash:
Code: ags

enum DeathType
{
   eDeadByFallingIntoPit,
   eDeadByDrinkingPoison,
   eDeadByGettingTooCloseToNuclearExplosion,
   etc...
}

import DeathType LastDeathType; // declare a variable

GlobalScript.acs:
Code: ags

DeathType LastDeathType; // create a variable
export LastDeathType; // allow other scripts use it


Set variable each time character dies, e.g.:
Code: ags

LastDeathType = eDeadByFallingIntoPit;


Then for the death room:
Code: ags

function room_Load()
{
Wait(30);
gInventory.Visible = false;
gDeathMessage.Visible = true;
aExpired.Play();

if (LastDeathType == eDeadByFallingIntoPit){
  cPortrait.Say("I should be more careful!");
}
else if (...)
... etc...




I am still thinking on your main problem... I'll post if I get any ideas.
#13068
The Rumpus Room / Re: Riddle me this
Sat 14/07/2012 17:40:01
Creamy, regarding ropes
Spoiler

Quote from: Creamy on Sat 14/07/2012 16:05:37
I don't see how you can be sure that the rope will burn in 30 minutes if you put both ends on fire.
No matter how fast each piece of the rope burns, the fire will have to "pass" every one of them to burn whole rope. If fire goes from both ends rope will burn x2 faster.
Neither length of the rope, nor flammability of each piece matters, it is only overall burning time that does.
We may take this analogue: imagine there are X items on the floor, each of different weight and it takes different time to pick each up and put it in the crate. Now, isn't that obvious that two men will move them to the crate x2 faster that one? (Here we make a simplification that they are of same strength and do not get tired)
[close]

Quote from: Creamy on Sat 14/07/2012 16:05:37
Anyway, what about this one : " the princess is half younger than the prince was when the princess was three times younger than the prince is. How old are they? "
Now, this is a funny case. I was totally sure there's some tricky solution and certain answer. But then I decided go math, and found... something different.
There's a chance I made some dumb mistake, but I got this:
Spoiler

Code: ags

X0; // Princess age before
Y0; // Prince age before
X1; // Princess age now
Y1; // Prince age now

X1 = Y0 / 2;       // the princess is half younger than the prince was
X0 = Y1 / 3;       // the princess was three times younger than the prince is
// Or...
Y0 = 2 * X1;
Y1 = 3 * X0;

// We, of course, understand that the difference between their ages is always the same
Y1 - X1 = Y0 - X0;

// Hence...
3 * X0 - X1 = 2 * X1 - X0;
3 * X0 + X0 = 2 * X1 + X1;
4 * X0 = 3 * X1;
X0 = 3/4 * X1;

X0 = 3/4 * (Y0 / 2);
X0 = 3/8 * Y0;


Now, this means we may choose practically ANY Y0 value, calculate X0 from it and still got right answer.
For example:

Prince's age was Y0 = 100;
Princess' age was X0 = 3/8 * 100 = 37.5;
Prince's age now Y1 = 3 * X0 = 112.5;
Princess' age now X1 = Y0 / 2 = 50;

Now, checking this.
The princess is half younger than the prince was: Prince was 100, she is 50 now (half younger), correct.
...the prince was when the princess was three times younger than the prince is: Princess was 37.5, Prince now is 112.5 (three times older), correct.
Time passed for prince: 112.5 - 100 = 12.5 years, time passed for Princess: 50 - 37.5 = 12.5, the same, correct.

Now, tell me what did I wrong?  :-X
[close]
#13069
I think my biggest problem always was that I needed to be sided by someone (or side someone, depending on angle of view). I don't know, maybe it's lack of self-confidence. I can do complex things for certain period of time and be full of enthusiasm, but as time passes I start to feel disappointment. At first I thought it's like I need people's attention, but that did not actually help. I found that I sometimes loose a will to continue working even if there are people who express positive opinions towards what I do.
However, things really change if I participate in something that is being actively worked upon by several other devs. It's like I need to feel myself a part of dedicated team all the time, to know that I am not alone who cares of the project. That's weird... Although I am a grown up man already, I still can't figure how to solve this problem.
#13070
The Rumpus Room / Re: Riddle me this
Sat 14/07/2012 14:24:24
Quote from: Snarky on Sat 14/07/2012 13:36:00
Imagine you have two ropes, which work like fuses. They'll each burn in exactly one hour. But the rate at which they burn is not constant (they won't necessarily have burned halfway in half the time; it might take 59 minutes to burn half the length, then only 1 minute to burn the rest). How can you use them to measure a period of 45 minutes?

That sounds as an extended version of one-rope riddle.
Spoiler

Put the first rope on fire from both ends and the second rope from one end. First rope will burn in 30 minutes (hour / 2), the second has still 30 minutes to burn. Immediately put the other second rope's end on fire. It will now burn in 15 minutes.
45 minutes total.
[close]
#13071
The Rumpus Room / Re: Best Food.
Sat 14/07/2012 00:57:15
Borsch :D
Also roasted chicken and mutton ribs.
Eggs fried with sausage, potatoes and tomatoes altogether.
#13072
Quote from: Caracal on Fri 13/07/2012 23:49:39
If i use Character.Animate, will i be able to just play the speech file (sound file) in the background just as easily as with the Say function???
Ah... probably not (unless you make it a normal audio clip). :/

Hmm, well, I am out of ideas for now. You said that:
Quote
the portrait in my game does not talk at all
Do you mean it does not animate or that say lines do not appear? Or both?
#13073
Actually I hoped that would solve second problem as well :) A pity it did not.

Alright, this is only a guess, since frankly I don't remember how this works pretty well. But I think that Speech View requires to have all the loops for all directions (left, right etc). And portrait character is turned to some direction it does not have appropriate loop for.
Actually (regardless if that is the case) I won't recommend using SpeechView for the portrait character. I'd rather recommend using Character.Animate function.
#13074
What is your global game speech setting? I mean Global Settings -> Dialog -> Speech style? I may be mistaken but I have a guess yours is set to Sierra-style?
Please elaborate, what is your aim, how do you want your speech look like? Unless you tell this it will be more difficult to help you.
#13075
Adventure horror set :D

    - Sinister wooden idol!
    - Human skull called Murray.
    - A voodoo doll.
#13076
Well, I believe it is actually possible to write a module which will allow to read/write values in similar fashion (i.e. key/values).
I thought there was one already, but maybe I am mistaken.

EDIT:
Only one I could find is this IniFile module: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22599.0
But I am afraid it was made for older version of AGS.
#13077
Quote from: MurrayL on Fri 13/07/2012 13:36:20
So it reads linearly?

For example:
Code: AGS
WriteInt(43);
WriteInt(63);
WriteInt(12);


This could be read back in with successive calls of ReadInt(), each one returning the next number in the sequence (43, 63, then, finally, 12)?
If so then that will work perfectly for what I have in mind. It's not as intuitive as a key/value system, but it's workable.
Wwwhat? :)
Ofcourse it will return in same order. And what do you mean it is not intuitive? It's how file storage work since early days of computers :)
#13078
Will saving custom file work for you?
Check File routines in the manual:
http://www.adventuregamestudio.co.uk/wiki/?title=File_functions_and_properties
#13079
While writing an editor (inside AGS game or as a separate tool) takes time, this approach still have certain benefits. They may or may not have importance depending on what you are trying to achieve:

1. Extendability, especially if levels can be read from disk rather than from data file/game exe. Easier to create small demo/test maps, allow players to make their own levels.
2. Much, much easier to fix/replace certain tile graphic without a need to redraw everything.
3. An easier way to bind certain tile types to game data (passability, location properties); actually I have no idea how people do this without tile engine - using regions and walkable areas sounds hell of a work.
#13080
Quote from: Khris on Fri 13/07/2012 00:32:55
Quote from: Armageddon on Tue 10/07/2012 22:31:22I also have the weirdest thing happening, if I'm walking left and then click right the character always turns up and around instead of looking down and around like when I'm walking right and click to the left.
Seems like AGS always turns the character clockwise if they make a 180° turn. Not that weird, is it?
I remember at one instance I had to override this behavior by writing my own turn function, because character turned his head only, and it looked like he's breaking his own neck :D
SMF spam blocked by CleanTalk