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

Topics - Crimson Wizard

#301
If you put a function inside #ifdef --- #endif block which technically makes her disabled, code-wise, editor still "thinks" it's active:
1) Typing its name will make a tip appear showing its full name and parameters.
2) Right clicking on the typed function call and selecting "Goto Definition" will make editor go to disabled function's body.
3) If the function was used as an event handler and is still typed into object's properties pane, double clicking on its name there makes editor go to function definition.

If you make second function with same name, and make it active, "go to definition" still goes to previous one.
#302
Simple: if you have an event handler function name assigned to the corresponding object's (gui, etc) property, but there's no real function (e.g. you deleted it), there will be no error or warning shown neigher during compilation or during game run (even when you interact with an object).
#303
Description
   The Struct Stream module defines and implements two types meant for
   user-friendly ways of writing custom structs or data chains to String
   and reading them back.
   
   Type Struct2String is used for writing, while type String2Struct is
   used for reading.

Purpose
   At the time this module is written AGS does not support nested custom
   types (structs), i.e. objects of custom type put inside another custom
   type. One of the most effective workaround known is storing nested
   structs as Strings. This simple module provides an easy and generalized
   way to write and read such structs to/from Strings.
   
   In terms of containers Struct Stream implements FIFO method and may be
   considered as a FIXED-SIZED QUEUE.


Requires AGS 3.0+
Optionally requires monkey_05_06's Stack module v. 1.0 or better to enable two functions supporting StackData type.

Download
Download mirror


Example of usage
  Consider following custom structures:
 
Code: ags
    struct TypeHumanBody
    {
      int Weight;
      int Height;
      String Hands[2];
    };

    struct TypeHand
    {
      bool IsLeft;
      int Length;
      int Strength;
      String Fingers[5];
    };

    struct TypeFinger
    {
      int Length;
      int Agility;
    };

   
  Type HumanBody should contain two instances of type Hand, while each of the
  Hand objects should contain five instances of type Finger. Since we cannot
  make variables of custom types be members of another custom types, we use
  Strings to store nested structures.
 
  Example of initializing Human Body variable:
 
Code: ags
    TypeHumanBody Body;
    
    ...
    
    #define HAND_TYPE 1
    #define FINGER_TYPE 2
    
    function SomeFunc()
    {
      Struct2String writer;
      String fingers[10]; 
      
      Body.Weight = 10;
      Body.Height = 20;
  
      // Writing all 10 fingers to the temporary array
      int i;
      while (i < 10)
      {
        writer.Open(FINGER_TYPE, S2S_DEFAULT_DELIMETER);
        writer.WriteInt((i + 1) % 5 + 1); // finger length
        writer.WriteInt(2);               // finger agility
        fingers[i] = writer.Finalize();
        i++;
      }
  
      // Writing right hand data
      writer.Open(HAND_TYPE, S2S_DEFAULT_DELIMETER);
      writer.WriteBool(false);
      writer.WriteInt(10);    // hand length
      writer.WriteInt(12);    // hand strength
      i = 0;
      while (i < 5)
      {
        writer.Write(fingers[i]);
        i++;
      }
      Body.Hands[0] = writer.Finalize();
  
      writer.Open(HAND_TYPE, S2S_DEFAULT_DELIMETER);
      writer.WriteBool(true);
      writer.WriteInt(10);    // hand length
      writer.WriteInt(6);     // hand strength
      while (i < 10)
      {
        writer.Write(fingers[i]);
        i++;
      }
      Body.Hands[1] = writer.Finalize();
    }

   
  Now, assuming we need to get information about 3rd finger on the second hand:
 
Code: ags
    function ProcessFingerData()
    {
      TypeFinger finger;
      String2Struct reader;
      
      reader.Open(Body.Hands[1], HAND_TYPE, S2S_DEFAULT_DELIMETER);
      // Skip basic hand data and first two fingers
      // Notice, that we shouldn't really bother what types of values are stored there
      reader.Read(); // IsLeft
      reader.Read(); // Length
      reader.Read(); // Strength
      reader.Read(); // First finger struct
      reader.Read(); // Second finger struct
      // Read third finger data
      reader.Open(reader.Read(), FINGER_TYPE, S2S_DEFAULT_DELIMETER);
      finger.Length = reader.ReadInt();
      finger.Agility = reader.ReadInt();
      
      // do something with acquired data...
    }


#304
Okay, here I am again, reporting a silly bug :P

Well, basically, if you have a script opened for editing, and you try to rename any of the renameable project tree items (like script module or View) by copy-pasting, clipboard contents will be pasted into script instead.
#305
Well, I had this idea for some time, but remembered to post this only now.

Idea is to give user (game creator) the more user-friendly way* to override default transitions. Possibly, good way to do this is supporting functions in Global Script like transition_execute(bool fadein, out bool finished) or something like that.

Well, thinking about it, "out" is not supported by AGS script, so it can have return value, or require to call some internal function, like "EndTransition".


* currently it is quite possible to set "instant transition" in Global Settings and call custom written transition function from every "after fade in" and "leave room" event handlers in any room. Yes, yes, that is possible, but I am talking about user-friendliness here ;) With this idea implemented user can have "general" custom transition in Global Script and "particular" transition scripts for certain rooms if wanted.
#306
This module adds a number of extender functions to AGS File class, allowing to read and write "precisely sized" integer values from/to the file (naturally).

For scripting weirdos only.

List of functions in the Version 1.0:

ReadInt8
ReadUInt8
ReadInt16
ReadUInt16
ReadInt32
ReadUInt32

SkipBytes
SkipInt8
SkipUInt8
SkipInt16
SkipUInt16
SkipInt32
SkipUInt32

WriteInt8
WriteUInt8
WriteInt16
WriteUInt16
WriteInt32
WriteUInt32


Supports both Little Endian and Big Endian byte order.

Requires AGS 3.0+

Download
Download mirror
#307
I have a feeling that this was already discussed, but I couldn't find anything using search so far.

No, I am not suggesting anything, I am merely asking.
I know it is possible to override extender function of the base struct for child struct in AGS. But is it possible to call base struct's function variant from child's class overriding function?

BTW, AGS documentation does not mention anything on this topic (hint hint).
#308
Example:

Code: ags

#define A 1
#define B A

int a[A];
int b[B];

function F()
{
   int aa = A;
   int bb = B;
}


Compiler will show 2 errors -
1) on line "int b[ B ];" error is "Array size must be constant value"
2) on line "int bb = B;" error is "undefined symbol 'A'"

#309
Umm..... yeah... so

I am currently looking for a way to implement some stuff, and checking all hypothetical possibilities. And I need an advice from those with deeper knowledge of AGS plugins.

Currently AGS has limitations to how can you organize custom data. For instance, you cannot put custom structs in custom structs, neither create dynamic arrays of custom types.

How optimal it would be to make AGS plugin solely (or primarily) for storing data of a complex structure? Literally, if I make a plugin that defines complex types and registers new script functions to allow work with these from game script, won't that be too much for a workaround?
I also read that plugins won't work in other OSes, like Linux. Is this a serious reason to not use plugins? (I am not aware of how much people use AGS on Linux) Won't be there any way to port same plugin to other OSes?

Lastly, I have a question about IAGSScriptManagedObject and related AGS API operations. Frankly, I don't quite get, what is it for and what can you do with this. Is it possible to, like, expose custom classes to the AGS script user, or something?
#310
 ;D

A "Queen's Quest":
http://us.blizzard.com/en-us/games/mobile/

Play infested Sarah Kerrigan, Queen of Blades:


#311
That's a weird one... but I can reproduce it all the time.

I have AGS 3.2 RC3 opened, and MTG Duel running. If there's a script opened in AGS, switching from AGS to MTG and back 2 times will cause following error:

Code: ags
Version: AGS 3.2.0.98

System.AccessViolationException: Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена.
   в ScintillaWin.WndProc(ScintillaWin* , UInt32 iMessage, UInt32 wParam, Int32 lParam)
   в ScintillaWin.SWndProc(HWND__* hWnd, UInt32 iMessage, UInt32 wParam, Int32 lParam)
   в System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   в System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   в System.Windows.Forms.Control.DefWndProc(Message& m)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в Scintilla.ScintillaControl.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Is this AGS bug, or MTG bug? I never had similar troubles with switching to other windows. Currently have no clues what's so special about MTG Duel window.
#312
AGS Games in Production / Open Eyes
Mon 15/03/2010 22:19:02
This project was started as a desperate attempt to find a drawing style which will make my artistic flaws look like a feature of game's style :) At first I hoped it could participate in MAGS January "Early Classic Horror", but I realized really quick that backgrounds are taking too much time to even try. After a pause I am working on this again with most serious intentions.



Open Eyes

Length: Short game
Genre: Mystic horror
Parameters: 640x480, 32 or 16-bit colour*, grayscale**

* not sure yet
** except interface

STORY

Behold Briham, the fantasy manifestation of the XIX century city with a dark ancient history behind fashionable facade...
Women are being murdered in the districts along the Channel, a black fetid stream, running down from the industrial centre. Each time a body is found in the water or on the stream bank. Each time under or near the bridge.
Police is completely stuck, and Inspector Wittstamp asks his old friend private detective William Orthon to join him in the investigation.
Meanwhile, a young lady visits Detective and begs him to find her missing brother.
Orthon cannot suppose that these two cases will lead him to something far more sinister, than a serial killer, something he can't even imagine.

Screenshots:







The game is supposed to look a bit like a comix, with only static images. Animation (especially animating characters) is my weak spot, and that was first reason why I am using such gameplay style. There won't be any speech bubbles though, a common AGS-like speech.
Also it is possible that "Open Eyes" will be more of an interactive story than a game with lots of puzzles. I should underline that this is rather an experiment, which I make to practice my newly invented art style ;)

Regarding progress, I have a full story already, but it is difficult to say how fast I'll accomplish this. Backgrounds are big deal, at the moment I draw them quite slow, but I really hope speed will increase as I get fuly used to this style.
If I'll achieve that, I suppose game could be released somewhere in late spring/early summer.

There's possibly not so well-known AGS forums member, Bosa, who agreed to help me with music; hopefully he will write some eventually, he's got a very nice skill. :)
#313
Basically, if you change Room's ID, you won't be able to set it as character's starting room right away, because it won't be in the list. (re-)Saving room, closing all tabs, etc, does not seem to help. I had to close and relaunch AGS to make the rooms list update.
#314
I have a suggestion to make AGS create constants for rooms which would store room ID's, as it does for characters. I have a feeling it would be nicer to use them instead of plain numbers in such functions as ChangeRoom, or when checking character.Room property.
#315
Trying to automatically insert event handling function by clicking on "ellipsis" button at events pane, while game is run from the editor, causes unexpected behavior:
- A message appears, saying "You cannot edit scripts while the game is being tested. Close the game first.";
- When you click OK, that message is displayed again;
- When you click OK, a function name is being inserted in the events pane, and script window opened, however no actual function is created in the script.

EDIT: BTW, if you close the game before clicking on OK in the message box, the function will be created afterwards.
#316
Critics' Lounge / This lighting kills me...
Thu 11/02/2010 16:34:56
Allright, I was practicing drawing some random background. My initial idea was to make a room with crumbled wall. During painting process concept has changed slightly....

This was a simple palace (or whatever) hall:


Then, a cannonball flew threw the wall and smashed the floor:


Now I have to add lighting/shading, and THAT is a pain in the... well, you know.

Well, that's cool  :P but it looks rather random, and I am not sure it actually feels like realistic lighting, especially the one on pillars.

Can anyone give me some tips how to make it better?
#317
Allright, here, I am making a revamped version of my first complete AGS game ever and my first MAGS game ever, "The Deed".
Original version was made in a great haste (I believe I spent 1-2 days writing story and puzzles, then about 4 days scripting and drawing backgrounds as crazy), and it came out rather raw: there were bugs, there were language mistakes, there was default Sierra GUI and main character was represented by recoloured Roger sprites.

My initial MAGS September '09 entry: http://www.mediafire.com/file/ohm12xt1oko/TheDeed.zip

My current intent is to -
+ Improve the user interface;
+ Use original character art;
+ Slightly improve background art (just add more details perhaps);
+ Add some object animations (probably);
+ Add sounds? Not sure.
+ Fix 99% bugs;
+ Leave story and puzzles as they were;
+ Add russian translation (because why not).


Now, official stuff.....

-----------------------------------------------------------------------------------------

The Deed
1.1 (revamped version)

Length: Short game
Genre: Philosophic fairy tale
Parameters: 320x200, 32-bit colour

STORY

In this game you are playing a young brave knight, who was sent on a
quest to retrieve a magick flower from a faraway place. In fact, his
travel is left behind the curtains, and gameplay starts when he
arrives to his destination. All he needs is to pick up the flower.
But it appears to be not so easy...
Although game is very short, it features 2 endings. First is quite
obvious, second will require solving additional puzzles.

Screenshots:




Team:
Crimson Wizard: game creator
Vukul: character art

STATUS
- story: 100%
- puzzles 100%
- background art: 80% (need adding some details)
- character art: 5%
- inventory/objects art: 80% (need adding few animations)
- scripting 80% (considering UI changes and bug fixing needed)
- music 100%
- sounds 0%

Expected completion date: March 2010
#318
1. Open project;
2. Open any room;
3. Make a small edit in the room to make editor mark it having "unsaved changes";
4. Open any other tab, except other room, so that previous room is still open;
5. Right click on active tab and select "Close all other tabs"; when asked to close all other tabs, confirm;
6. You will be asked to save unsaved changes in opened room. Click "NO".

Following error occur:

Code: ags

Error: Коллекция была изменена; невозможно выполнить операцию перечисления.
Version: AGS 3.2.0.98

System.InvalidOperationException: Коллекция была изменена; невозможно выполнить операцию перечисления.
   в System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   в AGS.Editor.TabbedDocumentContainer.RemoveAllDocumentsExcept(ContentDocument pane)
   в AGS.Editor.TabbedDocumentContainer.TreeContextMenuEventHandler(Object sender, EventArgs e)
   в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   в System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   в System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   в System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   в System.Windows.Forms.ToolStrip.WndProc(Message& m)
   в System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Коллекция была изменена; невозможно выполнить операцию перечисления ~ Collection has changed, it is impossible to perform enumeration.
#319
Advanced Technical Forum / AGS Localization
Thu 28/01/2010 14:50:06
Okay, it's simple: people want to translate AGS 3 to russian language.

1. Is it legal?
2. Is it possible to do without hacking executable?

I am asking here in hurry, before they go usual way  8)
#320
Sorry, couldn't resist  :P


Seriously, I met this problem recently: I finally bought Grim Reaper's "Downfall" only to have my computer freeze forever as soon as I touch game executable: unpack it, run it, even check file's properties. I was about to think there's some curse that doesn't let me play this game, but then intuition told me to try running the game with anti-virus software disabled. It ran perfectly.

I have a vague guess that this may be caused by big executable size. Downfall.exe is 273 Megabytes (!) large, which is the largest AGS exe I ever seen (second to it was tsach's MAGS game, I think, which was about 100 MB).

If this guess is correct, whom should I blame? Stating this differently, should AGS somehow warn game creators that AV soft may cause problems if game exe is too large and suggest them to put resources into separate files (I know there's such option)?
Or maybe I should report this as a bug to company which made antivirus soft I am using?
Have anyone else ever experienced problem like this?
SMF spam blocked by CleanTalk