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

#13001
The solution to this could be simply to check what button is pressed over inventory.
Here's some info that may be useful:
http://www.adventuregamestudio.co.uk/wiki/?title=Predefined_global_script_functions#on_mouse_click

In short, function on_mouse_click is called when player clicks mouse. You check that he clicked right mouse button over inventory item and if it is true then exit the function. You probably do not need to test coordinates, since AGS will recognize when click was made on item and sets button type to eMouseLeftInv or eMouseRightInv.

The code may look like this:

Code: ags

function on_mouse_click(MouseButton button) {
  if (button == eMouseRightInv)
  {
    return;
  }

  ... your other mouse code ...
}


This is simply an example. You may find more sutable way to manage this depending on how you handle mouse events in your game.
#13002
Quote from: Feijotikus on Wed 25/07/2012 13:42:08
And apologies for starting new threads.
It is not a problem ;), it just an advice that reading the manual usually saves time.

Quote from: Feijotikus on Wed 25/07/2012 13:42:08
Sorry, I've already seen the ChangeView command, but maybe my english is not enough good and something is missing to me. I understand that ChangeView changes the Normal view. My problem is changing permanently all the views of the character.
Only NormalView is readonly and should be changed by the use of ChangeView. Other views (Speech, etc) are not read only and could be changed anytime.
But of course, use the method that is more fit for your needs.
#13004
RickJ just got RTFM note :D

Quote from: Deu2000 on Tue 24/07/2012 14:18:17
Have you searched in the manual? http://www.adventuregamestudio.co.uk/manual/File%20functions%20and%20properties.htm
Those functions do not let write to any path, just to certain folders.

Quote from: AGS Manual
IMPORTANT: If you open the file for writing, then you can ONLY work with files in the game directory. You CANNOT use a path, so any filename with "" or "/" in it will automatically be rejected, for security reasons.

The only exception to this rule is the special tag $SAVEGAMEDIR$, which allows you to access files in the save game directory. This is especially important with the move to Windows Vista, in which you may not have access to the main game folder. You can use the $SAVEGAMEDIR$ tag to write and read files from the current Saved Game directory, which will always be writable. An example is below.
#13005
Mhehehe.



Quote from: Frito Master on Mon 23/07/2012 21:47:16
Now I'm thinking about how I haven't drawn on a real sheet of paper in months.
I haven't for... years? :( perhaps I should start over.
#13006
Quote from: Frito Master on Mon 23/07/2012 21:17:15
Now that I think about it I've never drawn anything that had nudity.
Well, me too (at least I don't remember if I did ;)), but I was speaking rather of bizzare things in general.
#13007
If you'd only knew what I was drawing when I was 14 :D.
#13008
Heh. I hate how they dub the voices in russian localizations. Those so called "professional actors" seem to not pay any attention neither for the context nor to the character, and prefer to read everything in such manner that sounds like they are reading a fairy tale book for kids in kindergarden. Sometimes makes me laugh, but usually bores to hell. Hence I prefer to play english versions of the games when possible.
I remember only one game I played back in 90-ies which actually had better voice-over in russian than in original english. But.... that localization was made by pirates! oh, the irony :)

On topic. Well, what can I say, except for obvious? If the acting is good I vote for the voice. Otherwise better not. I remember I disabled voice in Laura Bow 2 because some of the actors just pissed me off (sounded too much off-character).
Regarding giving your own voice to characters. That's the same problem as when making a movie based on a novel - if you read a book before you will always be dissapointed a bit because some characters are not like you imagined. On other hand, if your imagination has a right to give character a voice, why game creator's shouldn't? And how can one say that it is their imagination that has higher priority on doing that? I suppose it is rather a matter of getting used to something.
Subtitles is a must have regardless of anything. Even if your game is translated to hungred languages there are still people who prefer to listen to original acting and check text when they do not understand something. I do :).
#13009
Quote from: JJS on Mon 23/07/2012 09:41:34
Edit: There might be a problem with returning anything but FILE* variables. I am not sure about it, but it might be that files are closed outside of the engine code (somewhere in Allegro or libraries). So I see a possible memory leak there.
Hmm, well, from what I've seen I can tell that there's fclose call for each clibfopen right in the engine.
#13010
Quote from: JJS on Wed 11/07/2012 11:53:46
CLIB:
Every time a resource inside the game exe or another archive is opened, this is done through
Code: C
csetlib(archive_file_name, "");
FILE *f = clibfopen("filename.ext", "rb");
fread(); fscanf(); //... whatever
fclose(f);

I wonder if this can be converted to use the stream classes, but I am not sure it can in any case. This is because of the way clib interacts with the Allegro functions which expect a FILE pointer and being able to use stdio functions for access.
At the moment I decided to create CFileStream objects that wrap around returning FILE* pointers from clib. Otherwise we will have to rewrite clib itself. I did not look deeply into this yet, but if my guess is correct it registers some sort of of packed files database?

Also I plan to gradually remove all direct references to clib and use newly introduced CAssetsManager object that returns a file from any data file (provided it exists) something like:
Code: cpp
CFileStream *OpenAsset(const CString &data_file, const CString &file_name, const CString &mode);

That is to keep original way of accessing resources for now.

On other hand, better way would probably be make engine check for files in different locations according to priority rules, like first in the subfolders, then in external data file, then packed in executable. That, however, would require a game setting which allows such behavior, since not every game author would like his game resources be overriden that way.
#13011
Being more a player than a game creator I find this even more important :).
According to what you say it is mainly a problem of making player be ready in time. I may suggest using some visual and/or audio signal, like screen border flashing accompanied by short sound. Or maybe flashy cursor animation.
#13012
Finished this one. A good game, interesting puzzles. Also funny ending. The one after the credits.
(Note: when I say 'funny' I don't mean 'ridiculous'; it just made me smile.)
Perhaps it's overall mood of the game, but I felt the atmosphere of loneliness surrounding Rosangela and Joey most of the time. Maybe it is because they didn't have a chance to speak with any friendly NPC, at least living NPCs.

Here's little bug report, just FYI.
Spoiler

1. I noticed that sometimes you have to do extra click with mouse before hotspots start to respond. This seem to happen if I wait for character speech ends in natural way. However it is not 100% reproducible.
2. When discussing the Peridot item ('Chat with Joey' dialog option right after I stole it) the last Joey's line is "Good", but voice over is "The cost is clear, let's split".
3. Tiffany's voice-over missing for the line "I love him." (topic "Ken Sharpe")
[close]
#13013
Quote from: DavidGabriel on Sat 21/07/2012 23:15:43
By full screen I was speaking about 'cinematic' cutscenes where advanced animations would take place, head turns, close up eyebrow raises etc. Stuff more advanced than the default views (or LockView(s)) that might look a little silly close up or. I think in the case of full throttle, the cinematic cut-scenes were pre-rendered videos. This would also remove the need for the tedious scripting of such cutscene.
Well, I cannot be 100% sure because I never seen explanation of how exactly did they do that in FT, but if I did the animations you just described, I would use exactly common views, not pre-rendered videos.
I don't know why do you think they would look silly.
That depends on animation quality, of course. In my opinion in FT they used scripting for close ups. I just reviewed the intro in the game, and yes, I am almost sure they did. If we take such game as Monkey Island 3, there they probably used prerendered animated movies.

Regarding scripting, yes, these could be tedious, but you may help yourself by making use of helper functions that would cover most repetitive stuff. You may put most common sequence of moves in them.
Well, just some random example: a function that makes character turn his head, close his eyes for couple of seconds, open them once again and turn head back. You may then call that function whenever you wish that events happen.
Also, checking FT intro again, I really think that those closed eyes and raised eyebrows are not separate actions, but simply a part of single talking animation loop.
#13015
General Discussion / Re: The Dark Knight Rises
Sat 21/07/2012 15:10:19
Quote from: Frito Master on Sat 21/07/2012 14:13:09
I was gonna do a special drawing but someone on did a decent shoop.
I always had dual impression on such things... it feels like people using the tragedy as an occasion to show off; perhaps even without realizing it. The actual event being replaced by a glossy picture.
#13016
Quote from: JJS on Fri 20/07/2012 15:20:49
Quote from: Crimson Wizard on Fri 20/07/2012 14:49:06Is it possible to fix other ports on "refactory" branch? So that we could mark the work there completed for now.
Is this a pressing issue? Because I cannot really devote the required time right now.
I guess it isn't.
Then I will only ask not to add any new features to "refactory" branch. I hope it could stay close to main in terms of execution. So that if something wrong happens we won't have to wonder whether refactored code caused it or a newly added feature.

Quote from: monkey_05_06 on Fri 20/07/2012 21:54:20
I actually had a question about that. I've seen that it is very common practice for classes like this to provide methods "begin" pointing at the first item in the array and "end" pointing at one past the last item. This means that the pointer returned by "end" is unsafe and can never and must never be dereferenced. Is this really a good practice? I understand the ideology behind it (so you don't have to constantly put "begin() + count()" or what have you), but...I just think that we should generally avoid doing things like this.
I guess that depends on how we want to use containers in our program. These methods are natural for iterators logic. If we are not going to have iterators they seem completely pointless; we could just have First and Last for containers without random access by element index.

EDIT: on other hand, I don't think it is really obligatory to follow STL-like rules and have dereferencable "end" beyond the last element even if we use iterators (or C#-like enumerators). We may introduce different logic here. STL iterators have other problems, like for certain container types they became invalid as soon as number of elements change.
#13017
Quote from: JJS on Fri 20/07/2012 15:23:27
Both ORs are with boolean values, so the ORed values are only 0 or 1. So it doesn't matter if a bitwise or a boolean OR operator is used, it has the same result.
Ahhh.... :D cannot think properly at the Friday's evening.
#13018
Engine Development / Typo in 3.2.1, acroom.h?
Fri 20/07/2012 15:15:30
Something I noticed two months ago but forgot about.
Here's what is on SVN:
(acroom.h)
Code: cpp

#ifdef THIS_IS_THE_ENGINE
  if ((rstruc->wasversion < 17) | (rstruc->wasversion > ROOM_FILE_VERSION))
#else
  if ((rstruc->wasversion < 15) || (rstruc->wasversion > ROOM_FILE_VERSION))
#endif
  {
    fclose(opty);
    quit("Load_Room: Bad packed file. Either the file requires a newer or older version of\n"
      "this program or the file is corrupt.\n");
  }

Do you see a different operator here? Engine branch is using '|' (bitwise OR), Editor branch is using '||' (logical OR).
Is it a typo (hence a bug)? And which one is?

My guess is for '||', but... maybe there's some witty plan behind this.
#13019
Quote from: JJS on Thu 19/07/2012 16:12:48
I actually don't see the point in AGS32BitOSDriver at all. It only adds two methods to AGSPlatformDriver that are not 32 bit specific. So those methods might as well be pulled into AGSPlatformDriver, then the platform classes can be derieved from that.

Did that.

Is it possible to fix other ports on "refactory" branch? So that we could mark the work there completed for now.
#13020
There's something I wanted to have for a long time (unless already implemented): a keyboard shortcut to switch between script header and source. Is there one? If not may that be added?
SMF spam blocked by CleanTalk