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

#11941
The Rumpus Room / Re: *Guess the Movie Title*
Thu 09/05/2013 20:50:02
This.

#11942
The Rumpus Room / Re: *Guess the Movie Title*
Thu 09/05/2013 20:14:56
I think that may be "Antichrist".
#11943
Quote from: Alan v.Drake on Thu 09/05/2013 18:28:54
Once (and if) we have a proper savegame serialization system that should be a non issue. If each serialized item has its own version number encoded, during the deserialization we'll just need a "switch(version) { case...}" that performs the necessary conversions to update to the current version.
This was possible without any "system", because save contents are defined solely by the version of the engine that saved em.
But, you really suggest keeping all those variants in the engine code?


Quote from: Alan v.Drake on Thu 09/05/2013 18:28:54
In the end, though, I think we'll end up with two different branches anyway, one to run the legacy engine and one for AGS 4.0+
What is AGS 4??? Why even mention this? I am speaking about problem that exists now and need to be solved soon.
#11944
I was thinking, if we add new features over time, the savegame format will change too (because new things will probably need to write their own data). This is not a big problem when playing newly made games, because a game will be made using one certain version of AGS and not probably never updated to next version after it is released.

We have ports, which specific is that they must run old games too (because they are only available as Windows programs). There could be situations when ports must be updated to fix bugs or add compatibility to some old games.

If both lines of development will go parallel in one branch there will be a situation when port-users won't be able to use their previous saves and have to start the game over again.

How to deal with this? We could make a branch before any new feature is added and keep it undefinitely, adding only bug and compatibility fixes, then copying same fixes over newer versions.

Or we could have a savegame convertion utility.

What is better?
#11945
Quote from: fischkopf on Wed 08/05/2013 22:38:48
Could you add to the port, a virtual screen keyboard  that pops up, if i open save game menus?
I doubt it is possible to detect when savegame menu is on, because for the engine all menus are the same (unless the game uses default built-in AGS functionality, which is not very common in latest games).
Probably it would be possible to detect when a text input control is shown and has focus.
Still, this won't help in exceptional cases when game has some custom way to program user input. Therefore, I am wondering if it would be better to bind virtual keyboard appearance to any of the persistent device's controls?

Quote from: fischkopf on Wed 08/05/2013 22:38:48
If you don't type anything name the savegames save[$]
Again, that depends on the game. If the game does not test for empty string and tries to save game even with empty name, then engine will be able to hack in and change that name, but if the game is scripted in such a way that it checks for empty string and does not let to save if string is empty, then not much may be done...

To summ up, since the engine is a "virtual machine" which executes scripts, in most cases it has no means to "understand" the meaning of script actions as we, users, see it and find the ways to override it.
Unless the overrides are programmed on per-game basis, that is.
#11946
Quote from: Frodo on Wed 08/05/2013 17:19:58
I'm sure the main guy had blonde hair, with a long black coat. 
Man in long coat in commercial game? Gemini Rue :).
Can't remember anything else at the moment, maybe someone else will.
#11947
Quote from: Frodo on Wed 08/05/2013 16:33:33
The game was quite dark in tone, and reminded me a lot of Gabriel Knight.  It wasn't a Gabriel Knight fan game - the characters and story were unique.  But it was obviously inspired by it.
The McCarthy Chronicles? :) well, just a random guess.
A bit more details maybe?
#11948
Some time ago I suggested that some kind of group be formed in AGS community to define AGS scripting standard (functions, etc).
I really hoped some of the older members (I mean, those who script a lot) would do that, but it seems no one wanted to (or maybe they just did not read my post :)).
Wyz made a good point there, that script changes (including adding new functions) should be treated with care, otherwise script library may become cluttered and cause confusion to people.


Regarding changing script to something, there was already C# plugins few years ago, but I have no idea how much they are useable:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=41465.0
http://www.adventuregamestudio.co.uk/forums/index.php?topic=41635.0

I am not sure you can make a plugin that will bind Java to C++ engine. for C# one may use C++/CLR wrapper, but does Java allow something like that? Unless you will work with it via pipe or something.
Also, now when we have ports, one should at least take other platforms into consideration.
#11949
The Rumpus Room / Re: Name the Game
Tue 07/05/2013 20:59:20
@kconan, is it "Mugsy"?
#11950
Quote from: Phemar on Tue 07/05/2013 08:31:26
Is there anyway to call a function from a module that's below?

No.
This is one of the banes of ags script.
You will have to reorganize your functions or program logic somehow.
#11951
OMG, I just discovered that in Resonance you may actually use car's mirror at any place on the alley, and what you see there will be real magnified reflection of any random part of background you are standing at right now. :D
#11952
Quote from: VVK on Mon 06/05/2013 19:47:39
Incidentally, the numbers in the image above create an interesting illusion that they're moving sideways when you scroll the screen up and down.
Hah. True :).
You just have to use smooth scroll, not step scroll, for distinct effect.
Ummm.... anyway....
#11953
You do not declare function parameter types properly, it should be:
Code: ags

function castspell(int spellname); // I guess spellname is integer?


The parameters should be declared like:
(type name, type name, type name).
#11954
Engine Development / New savedgame format
Mon 06/05/2013 22:44:15
While redesigning the engine (slowly) I got to the point when it would be highly beneficial to change savedgame format. While my primary concern is the amount and order of data, stored there (a lot of problems arise simply because some things could not be initialized before others were read), new format could be useful to improve extensibility and error detection... at least a little.

Does anyone have any ideas and suggestions on what it may look like?

I remember Nefasto once mentioned having savegame as (an encoded) XML, but I have certain doubts about this, because XML tends to increase size of data pretty much. Also it probably will load slower. Of course there's a strong temptation to have a data that you may both easily read from program and edit by hand. Plus it is... well, most extensible.

If that does not fit, I had an idea about simple binary format built of blocks in a (imaginary) form of a tree, with a table of contents placed at the beginning of the file. Well, actually, coded it last day. But still unsure what to choose.

//-------------------------------------------------------
UPD: What I mean is a file (or dedicated part of file) that has following information about its parts in the header:
- id (numeric or string)
- version/format tag (in case reader needs to know it)
- offset (related to header)
- length
- list of subparts (recursive)

Since there's a table of contents, the reader may search only for blocks it needs or knows how to read. This will ease random extraction of wanted data. Also, this will help backward compatibility, and provide minimal forward compatibility (meaning older versions of engine could still try to read data, skipping parts they don't know).
#11955
Quote from: Nanuaraq on Mon 06/05/2013 21:57:54
So a function can be defined as an integer?
You define function's return type by that. Return-type may be int, float, String, pointer to AGS types, like Character* for instance. That will let you return value of corresponding type from function.

For example:
Code: ags

Character *GetSomeCharacter()
{
   return character[0];
}

This will always return a pointer to first character in the list (with Id = 0).

Quote from: Nanuaraq on Mon 06/05/2013 21:57:54
Or rather, an integer may return a value created by a function?
No, and this makes no sense actually. Not sure what you call "integer" here - a type or variable - but neither can "return" anything.
#11956
Nanuaraq, I strongly recommend you to explicitly define your function's type depending on what value you are returning. What you wrote may work with integers, but it may cause problems with other types (not sure that will compile). Also it will prevent possible confusions in the future.

What I mean: instead of "function AdjustCharacteristicForExp" write "int AdjustCharacteristicForExp". The word before function name is function return-type.
By default AGS allows to return integer if you start function declarations with just "function" but I find this pretty non-obvious. Probably it was left for backwards compatibility.
#11957
A word of warning about recursion: AGS has a limit of 50 nested functions. Hopefully, that won't be a problem, but I thought I should mention this.
#11958
That's pretty strange, I made this script, and sprite's translucent areas are drawn properly:

Code: ags

function room_AfterFadeIn()
{
  DynamicSprite *spr = DynamicSprite.CreateFromExistingSprite(1, true);
  spr.Rotate(45);
  Overlay *o = Overlay.CreateGraphical(10, 10, spr.Graphic, true);
  Wait(100);
}

NOTE: it's interesting, it works right even if I create non-transparent overlay (Overlay.CreateGraphical's last parameter is false)

The game is 32-bit, sprite is imported from png with alpha channel.

Maybe we could compare our actions to find out what did you do different?

Using AGS 3.2.1 btw.
#11959
Just out of curiosity, what this module is supposed to do? Is this about drawing digits with lines, or displaying digits with sprites, or?
#11960
I think 3 is
Spoiler
The clock (with pendulum)
[close]
SMF spam blocked by CleanTalk