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

#261
I've been working on removing limits meanwhile, and I've met following problem.

At the moment the number of room hotspots/regions/walkable areas and walkbehinds (I'll call them simply "regions") is constant. User may set name and properties / write event handlers for them even if they are not yet drawn (and even if they never will be).
Interesting thing is, that this opens unusual possibility to have "hidden" (unpainted) regions and still call their interactions with script (e.g. hotspot[20].RunInteraction(eModeTalkTo) or whatever).

Now, assuming that the limit will be removed, or rather increased to technical maximum (which is 256, because the regions are defined with a 8-bit mask graphics), question arises: should their number be still a constant or a variable?
Of course 256 is not 2147483647 (maximal number to store in the "int" variable) nor 4294967295 (unsigned int), and it won't take that much extra memory (the mask bitmap is still only one for all regions, regardless of their count), but it still will take extra memory.
Also it might be pretty confusing for user: how many hotspots does he actually have: the 3 he painted over room or 256?

The actual problem with the variable number of regions is that the current Editor interface is not fit to handle them.
There's no means to define real number of regions (hotspots, etc) and there's no means to add/remove them. You may erase a region from the room background, but the element itself will stay (and may be referred from script, as noted above).

Furthermore, current interface is very inefficient to work with large amount of room elements, in my opinion. Except for using a graphical "picker" to select a region there is a combo box that will become really annoying if you will have, for example, 100 walkable areas.
Though, this issue is far minor relative to the first one.

Does anyone have good ideas how to change the editor interface to allow addition/removal of regions?
#262
Site & Forum Reports / Client stats
Thu 30/05/2013 10:25:04
AGS Editor tries to send user OS information to http://www.adventuregamestudio.co.uk/clientstats.php and fails.
When accessing this address, browser redirects to http://www.adventuregamestudio.co.uk/clientstats.php, which seem to exist, although I can't tell if it does anything.
Is there some database that keeps the info? Does it still work? Who can access it?
I am wondering if we should keep this functionality in the editor.
#263
Moderator gave me permission to start this :).

Winner is declared
It is this splash by abstauber:


Summary
We don't have an original splash graphic, I mean the one in layered format, only flattened bitmap, and it makes it difficult to make any changes to the text, such as version number.
We need either current image recreated with layers, or a totally new one, if anyone would like to try.

The current bitmap can be found in the Editor sources, e.g.:
https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Editor/Resources/splash.bmp
Also, the original 3.2 bitmap:
http://www.mediafire.com/view/psopo5xrqdsa74p/splash.bmp


Requirements and Restrictions:
1. Layered image of well-supported format, which would allow to change separate parts of image when needed (most importantly text and version numbers): Adobe Photoshop doc, Paint.NET doc, etc.
The flattened image format does not really matter ATM, because having layered one we may convert it to whatever format we need. Here you may display it as BMP or PNG.
2. Choose reasonable size for a splash. Keep in mind that some people may have low display resolutions (like around 1280x720), so don't go extreme. Original is 400x250 which is nice, I guess that 640x400 is a top limit.
3. Any color depth, transparency is allowed.
4. Content requirements:
- Blue Cup!
- Title should be "Adventure Game Studio".
- Should have version number. The number of digits may vary with design, X.Y is minimum, but you may leave space for three digits and more (for tags like "Alpha", "Beta", "RC" etc).
- Be creative, think of the ways to mark special releases (like Beta) by changing color of some shape or dedicated part of image.

Please post the splash with any version number as an example.

Deadline.
July 2013.
I think we could use this for next big release (like 3.4), but it is not yet known when that will happen.


The new splash will be chosen by public voting.
#264
I've had an exchange of PMs with Chris Jones lately and he told that he does not have the original source of editor splash screen. He mentioned that one person did these pics for him, but he forgot who it was.

Right now I have a splash background cleaned from version numbers, but I was unable to find a matching font, so I did AGS 3.3 splash by copying the "3" digit from "3.2" splash.

Unless someone else knows the author of original splash, perhaps there's a person who would like to draw a new one?
Maybe there are people who may invent concept art for a splash screen?

This is not urgent, but sooner or later we will need this.
#265
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).
#266
AGS 3.3.0 Release Candidate




3.3.0 RC was released 27th January 2014



--------------------------------------------------
General
--------------------------------------------------


- Increased maximal Font number from 15 to 30.
- Added "Translated" property to ListBox gui control, which forces engine to translate ListBox items. Default is True. Set to False if you are using ListBox for listing savegames. NOTE: when older projects are imported, it is set to False automatically.
- Proper alpha blender for blending two 32-bit sprites with alpha channels. Added new option for gui alpha blending which turns the proper blender on. Option is named "Multiplied Translucence, Blend Source Color" - because that's what it does (better name anyone?). The old "AdditiveOpacity" option is renamed to "Additive Opacity, Copy Source Color". The default for new projects is "Multiplied Translucence, Blend Source Color". For the use of the blender in general cases (such as DrawingSurface.DrawImage function) a new setting is added in "Visual" group, named "Sprite alpha rendering style", which may be set to "Improved".
Also fixed inventory items and cursor crosshair with alpha channel not being drawn properly.
- Added new property to the DialogOptionsRenderingInfo class:
Spoiler

Code: ags

/// Should the drawing surface have alpha channel
bool DialogOptionsRenderingInfo.HasAlphaChannel;

[close]
This property must be set it in "dialog_options_get_dimensions" function, the one where you normally define size and position of the drawing surface. Default is False.
- Added new function to the Dialog class:
Spoiler

Code: ags

/// Manually marks whether the option was chosen before or not.
void Dialog.SetHasOptionBeenChosen(int option, bool chosen);

[close]
- Added extra constant to enum eKeyCode:
Spoiler

Code: ags

eKeyNone // self-explanatory

[close]
- Added two more options for the Skip speech style: "skip by key only" and "skip by mouse only" (no timer).
- Introducing enum SkipSpeechStyle.
Defines how player may skip speech:
Spoiler

Code: ags

  eSkipKeyMouseTime ,
  eSkipKeyTime,
  eSkipTime,
  eSkipKeyMouse,
  eSkipMouseTime,
  eSkipKey,
  eSkipMouse

[close]
- Introducing class Speech:
Spoiler

Code: ags

  /// Stop speech animation this number of game loops before speech ends (text mode only)
  int  Speech.AnimationStopTimeMargin;
  /// Enables/disables the custom speech portrait placement.
  bool Speech.CustomPortraitPlacement;
  /// Gets/sets extra time the speech will always stay on screen after its common time runs out
  int  Speech.DisplayPostTimeMs;
  /// Gets/sets global speech animation delay (if using global setting).
  int  Speech.GlobalSpeechAnimationDelay;
  /// Gets/sets speech portrait x offset relative to screen side.
  int  Speech.PortraitXOffset;
  /// Gets/sets speech portrait y position.
  int  Speech.PortraitY;
  /// Gets/sets special key which can skip speech text.
  eKeyCode Speech.SkipKey;
  /// Gets/sets how the player can skip speech lines.
  SkipSpeechStyle Speech.SkipStyle;
  /// Gets/sets the style in which speech is displayed.
  eSpeechStyle Speech.Style;
  /// Gets/sets how text in message boxes and Sierra-style speech is aligned.
  Alignment Speech.TextAlignment;
  /// Gets/sets whether speech animation delay should use global setting (or Character setting).
  bool Speech.UseGlobalSpeechAnimationDelay;
  /// Gets/sets whether voice and/or text are used in the game.
  eVoiceMode Speech.VoiceMode;

[close]
- SetMusicMasterVolume() legacy script function now accepts volume values between -210 and 100 respectively (was between 0 and 100); this may be used as a workaround for guaranteed music mute if you imported old project and do not want to convert to new audio system;


** WARNING **
Following functions and variables are now deprecated. If you have any of them in script you will likely receive compilation errors.
Either turn Backwards Compatibility mode in Global Settings ("Enforce object-based scripting" setting), or consider using corresponding property from Speech class.
Spoiler

Code: ags

void SetVoiceMode(eVoiceMode);        // use Speech.VoiceMode
void SetSkipSpeech(int skipFlag);     // use Speech.SkipStyle
void SetSpeechStyle(eSpeechStyle);    // use Speech.Style

int game.close_mouth_end_speech_time; // use Speech.AnimationStopTimeMargin
int game.speech_text_align;           // use Speech.TextAlignment
int game.skip_speech_specific_key;    // use Speech.SkipKey
int game.talkanim_speed;              // use Speech.GlobalSpeechAnimationDelay

[close]

--------------------------------------------------
Editor
--------------------------------------------------


Docking Panels.
Every panel in the editor window (such as Project Tree, Property window, sprite editor and so forth) may now be dragged from their initial position and dropped on a new place, aligned to side of screen or other panels. Panels may be joined in tabbed groups, pinned to make them stay on screen, or unpinned to make them hide when they aren't used (leaving their tab visible).
There is a new "Window" menu to control all the windows.
The layout of the panels is saved when closing AGS (to Layout.xml file), and restored when opening AGS (not including the project's documents).

Video Tutorial on using Docking Panels

Folders:
You may now create folders for characters, dialogs, inventory items, guis, rooms, scripts and views.
Added new menu items for all folders to move up/down, and the ability to drag/drop files to be before other files.

For scripts:
- Script and header files are now combined into one and can be expanded/collapsed, similar to room settings & script.
- Removed the menu option to move files up/down, this can now be done with normal drag/drop (and not only for scripts).
- Removed the "exclude script" option.
- The order of the scripts (for script dependencies) is the same as it was before, a script can use all the scripts
above it.

For rooms:
- The "Sort room by number" now sorts within folders.

Find all usages:
Added a menu item to find all usages for characters, dialogs, views, inventory items and global variables.
It won't actually find scripts that use the character id (or dialog/view id), just scripts that use the actual script name of that specific object.


Navigate (in tree):
Added a menu item for almost all document tabs, to navigate to their node on the project tree (can be useful for large projects).


Goto Line:
In script editor, pressing Ctrl+G will now open the "Goto line" dialog, you can select a line number and the editor will jump to that line. Since "Ctrl+G" was already used as a shortcut to open the global script, that shortcut is replaced with Ctrl+Shift+G (and also replaced the shortcut to open the global header from Ctrl+H to Ctrl+Shift+H for consistency).


Reload sprite from source:
In Sprite Manager right-click on a sprite and choose "Replace sprite(s) from source" command. This will re-import all the selected sprites from their source images, given they are kept in their original location.

Minor additions:
- The "Old-style game-wide speech animation speed" game setting (in "Backwards compatibility" group) is replaced with two settings in "Dialog" group: "Use game-wide speech animation delay" (true/false) and "Game-wide speech animation delay" (value).
- Added a "browse" button to the "Create in folder" field in the Start New Game wizard.
- Sprite Import window is now resizable.
- Force the intellisense cache refresh before showing autocomplete list.

Editor Plugin API
- Added property for getting playable character.
- Added property for getting ScriptsAndHeaders collection.
- Added methods for refreshing project's tree.
- Added method for refreshing property grid.
- Added methods for controlling output panel.

Bug fixes:
- Editor no longer allows to create more game items than engine supports (fonts, cursors, dialogs and inventory items), which could result in crashes in Editor or running game.
- Fixed incorrect selection of a new sprite, imported while the "Select sprite" dialog is open.
- Fixed sprite lookup in folders, differing only by name case;
- Set last script's save time at the save end rather than before the save, in case file writing takes significant time.
- Fixed overlapping labels in the Editor Preferences dialog.
- Fixed "savegameindex[]" array was declared with incorrect size in script (20, while it must be 50).


--------------------------------------------------
Engine
--------------------------------------------------


Ports:
There are now following several engine ports. While they are not included with this package, they may be counted as a part of 3.3.0 release too. For more information on how to install them and play games please visit following forum threads:

Linux Version
Android Version
iOS Version
PSP Version

You may also check JJS's Daily builds here: http://jjs.at/daily/

WinSetup was changed:
- Removed "Replay" option, for it was unused for years.
- Moved all secondary options to "Advanced" section.

Backward Compatibility:
Engine is now able to run AGS games from version 2.50 and higher. This was done mainly for ports users, because they cannot run games in their original form, but Windows users may find this useful too. For example, you may now run many older games with new setup settings (such as Direct3D renderer and scaling filters).
How to do this:
1. Go to AGS program folder and find 'acwin.exe' file. This is a pure engine program (without any game attached).
2. Copy this acwin.exe to the game's folder (where you have corresponding game's *.exe).
3. You cannot use original winsetup.exe to run new setup, because that will run original game setup. Therefore you should run acwin.exe with "--setup" parameter. This may be done from command line. If you don't know how to use command line in Windows (and don't want to bother learning  :tongue:) download this batch file: http://www.mediafire.com/view/?66373m22i8pa6b8.
Simply put it to the same game folder and run every time you want to change new setup settings.
For the curios ones: the batch file is just a text with few Windows commands, it runs acwin.exe, sending it "--setup" parameter string.
4. Run acwin.exe to run the game on the new engine.
Most games allow to know the current engine version by pressing Ctrl+V. New engine is version 3.3.0.1150, if you see this in the version info, this means you did everything correctly. Also, new engine writes a log file when it runs a game (see below).

More scaling filters:
Added x5, x6, x7 and extreme one x8 nearest neighbour filters. Direct 3D renderer may use both normal and anti-aliased variants of those.
Added "Max nearest-neighbour filter" option to filter list in winsetup. If this option is selected, AGS will choose the maximal possible scaling filter your graphics driver supports.

Log output
Engine can now write down a log file when running the game. The feature has limited use currently, but the file may sometimes contain useful information if any errors or unexpected behavior happened in game.
Logging is enabled either by setup file, by putting this line under "[misc]" category:
Code: text
log=1

or "--log" to command line; also "--no-log" overrides setup file and disables logging.
Log file is called "ags.log" and it is saved in "Users<Name>Saved Games.ags" on Vista, Win7 and Win8, and in "Documents and Settings<Username>My DocumentsMy Saved Games.ags" on WinXP.
Other platforms have their respected paths, e.g. Linux will write to "$HOME/.ags".

Improvements
- Improved character walking at 60%-80% scaling.
- Game.ChangeTranslation() script function no longer causes game to quit if the translation file belongs to different game or has unknown format.
- The game automatically fallbacks to Software graphics driver if the Hardware one could not run or initialize gfx mode for any reason.
- Threaded audio support. This feature has both pros and drawbacks, and is not currently recommended to be used for your project on desktop platforms by default. You may enable it by manually adding an option in "sound" section of acsetup.cfg:
Code: text

[sound]
threaded = 1

Threaded audio may sometimes increase perfomance on low-end systems, but reportedly causes audio desync with the rest of the game on particular systems (such as WinXP): this also makes it not fully compatible with Pamela lip-sync feature at this moment.
- Added two "overriding" options for game config:
Code: text

[override]
multitasking=0/1
os=dos/win/linux/mac

* Multitasking - overrides game's multitasking mode. Useful if game has lengthy unskippable sequences. Keep in mind that this will lock game in the given mode and make it ignore script commands that change it.
* Os - overrides System.OperatingSystem return value. Useful for ports when game disables some feature for the system because it thinks it's not supported.
- For every "long" command line argument the traditional GNU form (--arg) is supported, for example "--windowed", "--letterbox", etc.
- Windows version of the engine will now write crash dump on "out of memory error" to help diagnose the situation if this occured due bug in the engine.

Bug fixes
- Fixed side-borders that were not applied properly at newer (larger) widescreen resolutions.
- Fixed crash that occured when ListBox.GetItemAtLocation() is called from repeatedly_execute_always() just before the list box is about to be drawn on screen for the first time.
- Fixed custom dialog options clickable area by correcting its horizontal coordinate range.
- Fixed error which took place when user restored a game saved with background music playing, in case the music is not found in resources anymore.
- Fixed audio behavior during cutscenes (error caused audio volume to reset to default). Also AudioChannel.Volume will now return correct value when called from skipped cutscene.
- Stopped play.close_mouth_end_speech_time variable from making effect in voice mode and Sierra-style speech (which it wasn't supposed to do).
- Fixed return value of the AudioChannel.PositionMs for MOD/XM clips;
- Fixed division by zero which occured if there was a 1px tall walkable area (a precisely straight horizontal line) with vector scaling applied.
- Fixed OGG speech ending prematurely if the audio file size is a multiple of 32 KB.

AGS Source code
All here: https://github.com/adventuregamestudio


Reporting bugs
Since this is still beta, please report any problems right in this thread.
When doing so, provide following information:
1. Version of AGS.
If you run engine port, the date of build, or date of last source change - if you were building engine yourself from the sources.
2. What OS do you run AGS on.
3. What game(s) you had problems with (if you were running a game with the new engine).
4. IMPORTANT. Please, explain what were you doing and what happened. Don't say "it does not work", say "I pressed this button and it did this instead of that", or "I run that game and it crashed in the first room", etc. Don't be afraid of being verbose, sometimes the answers are in little details.
5. If you had any error messages in the editor or running the game, please mention them by copying their text. On Windows - if a standard Windows message box appeared, it is still possible to copy the text to clipboard by hitting Ctrl+C (even though the text is not visibly selected, it should still able to copy - this is how it works for message boxes).
6. If you had any errors in game, which is available in public (i.e. not your project), please keep a saved game made somewhere close to the problematic moment, so that we could use it to see what you saw.
7. If you had a crash running Windows version of the engine, and there was a message box telling you - "An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums." - please find a CrashInfo***.dmp file in the game folder and keep it somewhere for a while (we may use it to know details of the crash).[/code]
#267
Okay, I am that desperate. :)
Trying to organize beta release for version 3.3.0, but the splash screen we have is a raw BMP file, and it is not easy to fix version numbers.
I am not a good specialist* in fixing such things. Maybe someone can help?
Here's one:
http://www.mediafire.com/view/?psopo5xrqdsa74p

Since it is first release made solely by contributors, maybe it makes sense to change something slightly in image too.

OR you may draw completely new one, if you dare!


*And, frankly I am just too lazy to try.
#268
AGA, how much power do you have to modify the issue tracker? There are couple of things I think would be beneficial:

1. Add "Category" filter option to the Search bar.
2. Add "Rejected" and "Duplicate" to the list of issue statuses.
ALSO:
3. Make options in "Category" list sorted in alphabetic order (when editing the issue).
#269
I have no idea if that's important, just thought I'll post this here.
If run under MSVS with "Managed Debugging Assistants" enabled (Debug -> Exceptions) the Editor invokes following warning every time it closes:

Quote
Managed Debugging Assistant 'AsynchronousThreadAbort' has detected a problem in '<...>\Editor\AGS.Editor\bin\Debug\AGSEditor.vshost.exe'.
Additional Information: User code running on thread XXXX has attempted to abort thread YYYY. This may result in a corrupt state or resource leaks if the thread being aborted was in the middle of an operation that modifies global state or uses native resources. Aborting threads other than the currently running thread is strongly discouraged.

Thread id are always different, ofc.
This happens with all versions of AGS I've tried (3.2.1, 3.2.2, github).

Callstack:
Quote
   mscorlib.dll!System.Threading.Thread.Abort() + 0x20 bytes   
   AGSEditor.exe!AGS.Editor.NamedPipesServer.Stop() Line 121 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.NamedPipesEngineCommunication.Dispose() Line 123 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.DebugController.EditorShutdown() Line 204 + 0xc bytes   C#
   AGSEditor.exe!AGS.Editor.AGSEditor.Dispose() Line 210 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.GUIController._mainForm_OnEditorShutdown() Line 1508 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.frmMain.frmMain_FormClosing(object sender = {AGS.Editor.frmMain}, System.Windows.Forms.FormClosingEventArgs e = {System.Windows.Forms.FormClosingEventArgs}) Line 408 + 0x17 bytes   C#
   System.Windows.Forms.dll!System.Windows.Forms.Form.OnFormClosing(System.Windows.Forms.FormClosingEventArgs e) + 0x77 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Form.RaiseFormClosingOnAppExit() + 0xf4 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.ExitInternal() + 0xe7 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.Exit(System.ComponentModel.CancelEventArgs e = null) + 0x4e bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.Exit() + 0x7 bytes   
   AGSEditor.exe!AGS.Editor.GUIController.ShowWelcomeScreen() Line 856 + 0x5 bytes   C#
   AGSEditor.exe!AGS.Editor.frmMain.frmMain_Shown(object sender = {AGS.Editor.frmMain}, System.EventArgs e = {System.EventArgs}) Line 435 + 0x12 bytes   C#
   System.Windows.Forms.dll!System.Windows.Forms.Form.OnShown(System.EventArgs e) + 0x7a bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Form.CallShownEvent() + 0x20 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme) + 0x76 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj) + 0x69 bytes   
   mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes   
   [Native to Managed Transition]   
   [Managed to Native Transition]   
   mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes   
   mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback(System.Windows.Forms.Control.ThreadMethodEntry tme) + 0x69 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks() + 0xc3 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x12f bytes   
   System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x2a bytes   
   System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m) + 0x40 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg = 0x0000c23f, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes   
   [Native to Managed Transition]   
   [Managed to Native Transition]   
   System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason = 0xffffffff, int pvLoopData = 0x00000000) + 0x24e bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = 0xffffffff, System.Windows.Forms.ApplicationContext context = {System.Windows.Forms.ApplicationContext}) + 0x177 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes   
   System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm) + 0x31 bytes   
   AGSEditor.exe!AGS.Editor.GUIController.StartGUI(string[] commandLineArguments = {string[0x00000000]}) Line 1369 + 0xb bytes   C#
   AGSEditor.exe!AGS.Editor.ApplicationController.StartGUI(string[] commandLineArguments = {string[0x00000000]}) Line 123 + 0x10 bytes   C#
   AGSEditor.exe!AGS.Editor.Program.RunApplication(string[] args = {string[0x00000000]}) Line 55 + 0x10 bytes   C#
   AGSEditor.exe!AGS.Editor.Program.Main(string[] args = {string[0x00000000]}) Line 23 + 0x8 bytes   C#
   [Native to Managed Transition]   
   [Managed to Native Transition]   
   mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x3a bytes   
   Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2b bytes   
   mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes   
   mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes   
   mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes   
#270
I had a short conversation with tzachs, first asking him if he is going to make a final 3.2.2 release, but he suggested we release our github version as a new Beta.

What is this AGS 3.3.0?
Editor remains the same since 3.2.2 beta. One of its internal components (we should refer it as "game compiler") underwent numerous changes in the process of engine rewrite (mainly because they share same source code), so it would be worth to test how games are compiled and run.
I think it is also valid to add minor features, that do not take much time to implement (recent Calin's addition, in particular).

Engine was partially rewritten, but should run all the same from game dev & player's perspective.
There are some pending changes by s_d, which are particulary important for Linux port, so we perhaps should wait for them.

Windows release should be accompanied by releases for each respective platform. JJS is building daily builds all the time, hopefully he will help here. I know that scotchchiefbaker was making a "universal" Linux distributive, perhaps we should add that too?

We should not forget to keep the PDB file for Windows release, for the reasons explained here.

Since the new engine can now run older games (to some degree), this should be mentioned, and probably some tests done as well. This is more important for ports, but Windows version may be used to test this too.

We need CHANGELOG....



Preliminary release (Windows only) as of 22th march 2013:
http://www.mediafire.com/?7tyq75kre5nzm0z

Preliminary release of 29th march 2013 (with some fixes):
http://www.mediafire.com/?9bqawlni21hkoo9
#271
Hi, I am new on these forums, so don't beat me if I do something wrong*.

*Actually, don't beat me in any case.

Project:
A silly RPG/joke game, made solely for fun. Please, take into account, that this is not a serious project. At least - not yet**.

**I am leaving myself a loophole

Details:
A party of random characters travels from one locations to another, fighting opposing groups of enemies. In-between fights they visit shops and buy stuff.
I am planning a free-of-obligations production, possibly adding more features over time. This may be thought as an exercise, or just a way to get a rest from serious work and have some fun. Also, see Deadline.
Target resolution is 640x400 (16 or 32 bit colors).

Positions Available:
Sprite artist & animator: someone who could draw character/monster sprites. Full animations are not obligatory, but it will be nice to have at least 2-5 frame sequences for major events (like attack and death). Walking animations are not required now.
I am looking for a brutal, gory, non-anime style of sprites in a medieval fantasy setting. The more brutal, the better. No chainmail bikinis!
The quality does not have to be professional, yet it should be distinctive (i.e. not complete crap). You can draw in MS Paint, if you like, but the images should be clear, consistent and recognizable (so that people don't break their heads, trying to understand what they are looking at).
For 640x400 resolution, normal characters could be around (40-70)x(40-70) pixels, I think. Larger creatures could be bigger, tiny creatures - smaller.

Background artist (could be the same person as sprite artist, if he/she thinks he/she can manage): I need several backgrounds of random locations in fantasy world. Anything you can think of: wilderness, cave, dungeon, a ruined village, etc.

UPD:
Regarding style; the game will have a strong element of absurd, therefore I am looking for more cartoonish look, but not "child" cartoonish, rather "dark" cartoonish.
Here are few pics, chosen of random in the webs, for the reference of what I mean:
(Don't mind the quality, I mean general feel and style)
http://emulyator.ucoz.ru/100_sega_RUS/Golden_Axe_3-2-.gif
http://www.leonineroar.com/wp-content/uploads/2012/03/DivinePower2.jpg
http://www.celestialgamer.simplepccomputing.com/wp-content/photos/heroes5_artwork/heroes-of-might-and-magic-v-20050810030548406.jpg
http://2.bp.blogspot.com/-SR1r4LEyW9c/T188fwg7sUI/AAAAAAAAAYs/LjGZ9EcLt_E/s1600/1280_wizard_fantasy_wallpaper.jpg


Deadline:
I am planning to release a "demo version" 1st April 2013 (sic). Hopefully, it will have enough features to cause some amusement, at least.
The plans for the further development are not certain (but everything's possible).

Comments:
Interested people can contact me via PM. I am checking forums almost every day.
Currently I have a almost playable combat sequence, although all the character stats are not customizable (random every time), and also they do not have any inventory. Regardless, I may send this test build, if you want to check what you are dealing with.





Oh, and I almost forgot...
Spoiler

:=  :P
[close]
#272
A game developer had issues with the Inventory items having alpha channel recently:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=47666.0

While testing that out, it was found that not only Inventory items, but Buttons with alpha channel do not seem to draw properly on solid GUI surface too.
These are two distinct problems (inventory items perhaps were simply not updated with the latest changes in GUI drawing). I am more interested in discussing a Button one.

Here are examples of how Buttons with alpha are drawn on GUI in AGS 3.2.1.1115:

Buttons with alpha on solid GUI with transparent (magic pink) areas:
[imgzoom]http://imageshack.us/a/img254/4863/agsguialphatestalphabtn.png[/imgzoom]
Buttons with alpha on GUI with alpha with translucent areas:
[imgzoom]http://imageshack.us/a/img7/4863/agsguialphatestalphabtn.png[/imgzoom]

The belnding algorythm used there is following:
1. Summ alpha amounts
2. Keep button color
3. Discard background color
Code:
Spoiler
Code: cpp
unsigned long _additive_alpha_blender(unsigned long x, unsigned long y, unsigned long n)
{
    unsigned long newAlpha = ((x & 0xff000000) >> 24) + ((y & 0xff000000) >> 24);

    if (newAlpha > 0xff) newAlpha = 0xff;

    return (newAlpha << 24) | (x & 0x00ffffff);
}
[close]


Here's a fix I was able to come with so far:

Buttons with alpha on solid GUI with transparent (magic pink) areas:
[imgzoom]http://imageshack.us/a/img17/4863/agsguialphatestalphabtn.png[/imgzoom]
Buttons with alpha on GUI with alpha with translucent areas:
[imgzoom]http://imageshack.us/a/img534/4863/agsguialphatestalphabtn.png[/imgzoom]

The blending algorythm:
1. Summ alpha amounts.
2. Get a color between button color and surface color; the button alpha defines a relative distance between those two limits.
Spoiler
Code: cpp

union
{
    struct
    {
        unsigned char r;
        unsigned char g;
        unsigned char b;
        unsigned char a;
    } rgba;
    unsigned long color;
} col_x, col_y, col_r;

unsigned long _test_translucent_blender(unsigned long x, unsigned long y, unsigned long n)
{
    if ((y & 0xff000000) == 0)
        return x;
    unsigned long x_alpha = (x & 0xff000000) >> 24;
    if (x_alpha == 0xff)
        return x;
    if (x_alpha == 0)
        return y;

    unsigned long newAlpha = (x_alpha) | ((y & 0xff000000) >> 24);
    col_r.rgba.a = newAlpha;
    col_x.color = x;
    col_y.color = y;
    col_r.rgba.r = col_x.rgba.r > col_y.rgba.r ?
                   col_y.rgba.r + (col_x.rgba.r - col_y.rgba.r) * x_alpha / 0xff :
                   col_y.rgba.r - (col_y.rgba.r - col_x.rgba.r) * x_alpha / 0xff;
    col_r.rgba.g = col_x.rgba.r > col_y.rgba.g ?
                   col_y.rgba.g + (col_x.rgba.r - col_y.rgba.g) * x_alpha / 0xff :
                   col_y.rgba.g - (col_y.rgba.g - col_x.rgba.g) * x_alpha / 0xff;
    col_r.rgba.b = col_x.rgba.r > col_y.rgba.b ?
                   col_y.rgba.b + (col_x.rgba.b - col_y.rgba.b) * x_alpha / 0xff :
                   col_y.rgba.b - (col_y.rgba.b - col_x.rgba.b) * x_alpha / 0xff;
    return col_r.color;
}
[close]


My questions:
1. What is the expected behavior in this case? Do I at least go in right direction?
2. Is my code okay, or could be simplified?
3. What to do with alpha-blending over magic pink areas? Should the really look like that?
#273
Engine Development / Engine versioning
Tue 05/02/2013 12:51:00
Here I want to discuss following questions:
1. How often (when, in which cases) should the version change?
2. Should the engine and editor versions strictly correspond? For example, if we change something in the engine, but nothing in editor, should we still increase editor's version? What about opposite situation (some editor features reworked, but engine stays the same)?


Some technical information to be considered.
AGS engine uses three built-in version string constants:
AC_VERSION_TEXT; currently = "3.21 ". Used only when printing startup information to console. The string looks like
QuoteAdventure Game Studio v3.21 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-20xx others
ACI version 3.21.1115
Notice, there are two version strings here, first being AC_VERSION_TEXT, and another ACI_VERSION_TEXT (explained below). It looks like AC_VERSION_TEXT is simply the "major" version string, without build number, used solely for informational purposes.

ACI_VERSION_TEXT; currently = "3.21.1115"SPECIAL_VERSION, where SPECIAL_VERSION may be empty string, or "NMP" for builds without MP3 support.
NOTE: editor uses AGS_VERSION = "3.2.0" string when compiles the game.
This is very important string, because it is tested against one stored in game data file, as well as savegames, to know if this engine is compatible with loaded data. On other hand, there's some strangeness in how it is done, and I think there's sense in revising it in future.
First of all, the game data file contains numeric id of the version too, which is simplier to compare. When game is loaded, first engine checks if its numeric version id is not lower than required. If this check fails, engine quits. Then, it compares ACI_VERSION_TEXT with the string, stored in game file. If the result of string comparison is > 0 (the required string is alphabetically 'higher'), engine displays a mere warning and continues execution. This purpose of this extra check is a mystery to me. Besides, it relies on string comparison, which may simply fail if the "required version" string has any extra characters attached to it. For example, if the engine version is "3.3.1200", and the one saved in data file is "3.3.1200NMP" (no-mp3 build), the test will fail, because "3.3.1200NMP" has higher alphabetical value.
This may not have big consequences for loading game data, but it will have consequences for loading saved games, where ACI_VERSION_TEXT check is the only and decisive version test.
When savegame is written, ACI_VERSION_TEXT is saved in there. When it's loaded, current ACI_VERSION_TEXT is compared with the one, read from savegame. If current ACI_VERSION_TEXT has 'lower' value, test fails. Personally, I see a problem here, because increase in version does not always mean breaking compatibility. I would suggest to save "lowest compatible version" to savegame instead. In such case the savegames made by newer engine build will load on (some) older ones, which is good both for testing and returning to previous interpreter in case new one introduced any play-blocking bugs.

LOWEST_SGVER_COMPAT; currently = "3.20.1103"SPECIAL_VERSION.
This string is used to test savegame for being saved by "too old" engine. If the engine version, stored in savegame, is alphabetically 'lower' than LOWEST_SGVER_COMPAT, the engine will refuse to restore the game.
#274
As many of you should know, we have a number of AGS ports now that let run AGS games on other platforms (linux, etc). Plugins remain a problem, because they were written as Windows dynamic libraries. JJS already rewrote couple of plugins, and Calin disclosed his AGSBlend and SpriteFont plugins, so that their code could be used to compile plugins for other systems too.

Are there anyone else who would like to disclose his/her plugin source to let the games, which used them, become fully portable? Perhaps someone may contact plugin authors that did not visit forums for a while?
Could there be a reason to not to disclose plugin source?

Additionally, I want to mention, that maybe it could be a good idea to state a rule, that AGS plugin should be made open source from the start (NOTE: "open-source" does not mean "free to use")? Aside from portability, this would also ensure that no one will put something unexpected, like malicious code in there.
#275
Engine Development / Script code optimization
Tue 25/12/2012 20:31:34
Seeing as my changes to script interpreter caused noticable slowdown on PSP port (don't know about others), I became interested in how much feasible is would be to optimize the script byte code at runtime.
I say runtime, because we deal with existing games. If this concept will prove useful, the optimization could be added to the editor too.

(I have other ideas on how to improve the speed a bit, but that's irrelevant in the context of this thread.)

Thing is that AGS byte code has lots of tiny assembler-like sub-operations for each basic operation, that may be logical from compiler's "point of view", but is somewhat excessive from the engine's "point of view". And if we keep in mind, that each instruction is associated with number of safety checks, address fixups, etc, this results in significant overhead.

But what if we parse the script at load, and "fix" it up to certain degree?

Please, correct me if I am wrong in my reasonings anywhere below.
Let's examine couple of code "snippets" (I chose them at random while debugging real game).

1. This is how a comparison of a variable value with literal value is done:
Code: "asm"

PUSHREG ax         <--- copy first value from Ax register to stack
LITTOREG ax, arg2  <--- copy second (literal) value to Ax register
POPREG bx          <--- copy first value from stack to Bx register
LESSTHAN bx, ax    <--- compare first value to second and store boolean result in Bx register
REGTOREG bx, ax    <--- copy result from Bx to Ax

What we basically do here, is comparing Ax with literal value and storing result in Ax. So, this is practically the same as:
Code: "asm"

LESSTHANLIT ax, arg2  <--- compare first value in Ax with to second (literal) and store boolean result in Ax register

Here I "invented" new LESSTHANLIT instruction that compares register with literal value.

2. Allocating a local variable on stack:
Code: "asm"

LITTOREG ax, arg2  <--- copy the literal number (initial value) to Ax register
REGTOREG sp, mar   <--- copy stack ptr address to memory address register (MAR)
MEMWRITE ax, mar   <--- write value from Ax register to where MAR points to (here - stack ptr)
ADD      sp, arg2  <--- advance stack ptr by N bytes (4, if that was integer), thus completing new local variable

This is practically the same as:
Code: "asm"

MEMWRITE arg1, sp  <--- write literal number at stack pointer
ADD      sp, arg2  <--- advance stack ptr by N bytes

Or, if we go further and invent new "allocate integer on stack" instruction, this may be done in one turn, something like:
Code: "asm"

PUSHINT32 arg1     <--- write integer at stack ptr and advance stack ptr by 4 bytes



And so forth.

Of course, this requires careful implementation, for we must correctly define which sequences produce full "meta-operation", otherwise we may screw up next instructions. Also, to what extent should we limit our optimization; like in second example, is it ok to create new instruction for such specific case as pushing integer to stack, or we should've stop at converting 4 instructions to 2?
#276
Like said in the topic title, AGS.Native fails to compile after tzachs' changes to folder classes. I discussed that with tzachs couple of months ago, now I want to tell this publicly FYI.

This is not tzachs' fault, but Microsoft's one. Seriously.
This is what I found:
http://connect.microsoft.com/VisualStudio/feedback/details/674944

Basically, if you have a generic class with constraints declared in C#, C++/CLI compiler does not understand it properly and will not let you use any class, based on that generic.
This is reproducible both in MSVS 2008 and 2010. Haven't tried 2012 yet.

I did not want to spend much time on this, so I made a simple workaround by creating a C# FolderHelper class in AGS.Types and moving some AGS.Native code there.
Here's my commit, if anyone's interested: https://github.com/adventuregamestudio/ags/commit/b924c8371ee6858e6034587c53154b35001647a3


One more thing, partially related to this. I noticed that IViewFolder interface defines SubFolders member of ViewFolder type (not IViewFolder!). I do not know why this was made so, but IMO putting objects of derived class to interface defeats the purpose of interface.
#277
When AGS crashes on Windows, it writes crash dump, but that is unusable unless you have an MSVS program database file (*.pdb) which timestamp matches engine executable.
This means even if you have engine source, you still won't be able to use crash dump written by games run on their own.

Since people still report crashes in AGS games made by official CJ's engine versions, I think it would be helpful to have those pdbs uploaded somewhere on the shared location.
Don't know if that violates AGS license somehow, hopefully not?
I PMed Pumaman about this, but perhaps there are people who may contact him faster?

This also relates to any future engine versions that will be released. For every "official" Windows release there should be corresponding *.pdb file stored somewhere.

NOTE: It is still possible to do this workaround:
Build engine on your own, send it to the user and ask him to repeat the crash with the new engine, get new crash dump and use it with your built engine's pdb.
This method has two drawbacks: it is inconvenient, and also it won't allow to reproduce behavior with 100% match (if the crash does not happen on the same moment, it does not mean problem was fixed).
#278
Since the AGS source code is open, there's no problem in writing a data decompiler. Probably it is possible to restore the project to the point where you can extract all the in-game resources (except original filenames of the imported material).

In this situation is there any sense in data encryption?
Does everyone realize that every game made before source is opened may be now decompiled?
May that prevent some people from using AGS in the future?
( Am I doing a wrong thing telling this to everyone?  (roll) )

Thinking further on encryption, I see only one way to make it more useful - is to change the encryption key in the data compiler/engine for each specific game. IDK how difficult that would be for experienced hackers to find an address of the key in default engine executable and then deduce its address and value in game's one. Maybe not so, unless the code has more changes, or compiled with different settings etc.
Any thoughts on this?
#279
Hi there, I am looking for games which have certain properties for testing AGS engine version that is currently in development.

At the moment I am very interested in finding any 8-bit (256 colors) game.
Also:
- games with excessive use of custom graphics: drawing over surfaces, using dynamic sprites, tinting, lightning, translucency.
- games which use AGSBlend plugin and(or) flashlight plugin.

Thanks in advance.
#280
Site & Forum Reports / Broken Game links
Fri 17/08/2012 08:22:08
I thought there's one topic about reporting these in older days of the forums? Should there be one? Sorry if I missed it.

Actually I want to point out the OpenQuest game:
http://www.adventuregamestudio.co.uk/Games.aspx/Detail/945

The link there was broken and I am holding the alternate download for couple of years already. Not sure if I am the only one, but people occasionally download the game from my storage.
Is there a better place the game could be moved to? Like AGS archives or something.

My DL link:
https://www.box.com/shared/o6l46lnho1
SMF spam blocked by CleanTalk