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 - helios123

#21
This is great news!! Adventure: The Inside Job was a superbly made game, and I'm sure this one is going to be better.

Downloading now. Screen shots look nice, by the way.
#22
Great to hear that Part 4 of this awesome series is on it's way. I'm interested in how the story progresses.

Quote from: Technocrat on Tue 10/05/2011 16:18:32
Quote from: Ouxxey_games on Tue 10/05/2011 11:35:24
Quote from: Technocrat on Tue 10/05/2011 09:15:26
Maybe I should make a game of Sunshine, next?

If you mean "Sunshine", the movie, then you#ve GOT to let me be part of the project. :-)

Maybe detailing what happened to Icarus 1? Hmm...

*starts making notes*

Maybe you could also focus on what happened to Captain Pinbacker...   :)
#23
Hi all,

I have been experimenting with the AGS source code for the past couple of days, in order to understand the working/code structure better. I decided the best place to start was by attempting to merge code from plug-ins (this and that) I had written into the engine.
Spoiler

The idea here being that plug-in code gives you an idea of where to look in the engine's source code for a particular piece of code, which happens on certain occasion, e.g. Any function where plug-in's AGS_EngineOnEvent is fired by passing AGSE_SAVEGAME as one argument is the function (or is called by the function) where the save game is written to the disk.
[close]

Without further waste of time, here are the changes carried out:

The change in the editor end is merely update of the script header with the new script function declarations. The AGS manual source has also been updated and is included in the download.

The following changes have been made:


  • Support for setting Custom Properties at runtime. The user set values are saved to the save game file when the game is saved and read back from the save game file when the game is restored.
         
    For rooms having room number greater than 300 (i.e. the non state-saving rooms), custom properties for hotspots, objects and room are reset to their initial values once the player character leaves the room.
         
    A call to the ResetRoom function will also reset the custom properties of the room as well as the objects and hotspots in that room.



  • GetRoomProperty has been renamed to Room.GetProperty. The old name has been retained for backward compatibility, but it won't show up in the editor's autocomplete list.


  • The method signature and behaviour of SetTimer has been changed slightly. The new declaration of SetTimer is:
         
    int SetTimer(int timer_id, int timeout);
           
    The behaviour is as below:
         
    Attempts to start timer TIMER_ID ticking. If timer TIMER_ID is not available, then it attempts to start a timer which is free.
    Returns the id of the timer actually started, or -1 if no timer is available.
         
    The main reason for this change is to allow the use of SetTimer in module scripts without any side-effects. For example, if the module script contins a statement like SetTimer(10, 100) and some other (room or global) script also contains a call to SetTimer setting the same timer id, e.g. SetTimer(10, 20), then the behaviour of both scripts becomes unpredictable (Although this scenario seems like a rare case, it is certainly possible in large games where the call to SetTimer itself depends upon some event whose exact time of occurrence can't be predicted, e.g. when a randomy wandering NPC enters the room).
         
    The suggested usage of this new SetTimer is as below:
    #define TIMEOUT 100
    int timer_id = 10;
         
    //initialization code
    timer_id = SetTimer(timer_id, TIMEOUT);
         
    //in repeatedly_execute or repeatedly_execute_always
    if(IsTimerExpired(timer_id)) {
     //do whatever is required to be done
      timer_id = SetTimer(timer_id, TIMEOUT);
    }
         
    function UpdateTimeout(int timeout)
    {
      UpdateTimer(timer_id, timeout); //see below
    }


  • A new method named UpdateTimer has been added. This method updates the timeout value of any running timer to a new value. A brief description follows.
         
    bool UpdateTimer (int timer_id, int timeout)
         
    Attempts to update the TIMEOUT value of the TIMER_ID. If TIMER_ID refers to an OFF timer, or timeout is not positive, then it does nothing.
    Returns true if the TIMEOUT for TIMER_ID was successfully updated, else returns false.
         
    The timer denoted by TIMER_ID must be a running timer (i.e. it must have been started by calling the SetTimer function) and its TIMEOUT should not have elapsed (no call to IsTimerExpired should not have returned true).
         
    TIMEOUT should be a positive value.

Update (July 19, 2011): Following changes also done:


  • AudioClip has two new static members for iterating over all the AudioClips in the game.
          These are:
          01. Count, which returns the number of AudioClips in the game, and
          02. GetAtIndex, which returns the AudioClip at a specified index.


  • Each AudioClip object also has a ChannelID property. This will be the id of the channel on which the AudioClip is playing. If the AudioClip is not playing, then ChannelID will be -1. This can be used in conjunction with System.AudioChnnels array to obtain the channel of any clip which is playing.


  • The 'Print dialog options upwards' in the game's General Settings dialog works as expected.


  • EXPERIMENTAL: The Import Font dialog can now load OpenType fonts (*.otf) as well. The same code which imports TrueType Fonts is used for this.


  • SOURCE ONLY: Some data mangling in save games is now possible. Define MANGLED_SAVE_GAMES whle compiling. See restore_game_data and save_game_data in ac.cpp.

See also the ReadMe included in the downoad.

Comments, criticisms and suggestions are most welcome.

Download links:
#24
Like many other people, I have also been busy experimenting with the source for the last couple of days. Here are a few things that I found out:



  • I am using Code::Blocks, as the development environment, with the Visual C++ 2008 compiler. Code::Blocks supports importing Visual Studio solution files, so setting up  the project is comparatively easy. We only have to add the lib files in the linker's configuration.

  • CJ's original post mentions that DirectX SDK is required. But I found that this is not required if you have Windows SDK installed, as it includes the DirectX headers and libs.

  • Quote from: PumamanYou will need Visual C++ Express 2008 (this is a free download from MS). Do NOT use the 2010 version, this will probably not work and let's not complicate things at this stage by trying to use it.
    In spite of this, I tried (out of curiosity, and the fact that support for Visual C++ 2008 Express is likely to be dropped sometime in the near future) to compile the engine using Visual C++ 2010 Compiler (it's bundled in the Windows SDK) using Code::Blocks as the IDE (Note that Code::Blocks does not detect Visual C++ 2010 compiler automatically. We have to manually configure it through Settings -> Compiler and Debugger).

    The code compiled (only a single change of typecasting in a call to the abs function had to be made), but the linker complained that it could not resolve a reference to _hypot function in alleg_s_crt.lib. After a little find in files and examining the contents of the allegro 5 dll using objdump (I'm afraid I don't know the MSVC equivalent), I found that the function _hypot is present in msvcrt.dll (which is not being linked, but is probably referred by alleg_s_crt.lib). But it is also in libcmt.lib (which is being linked).

    The puzzling thing here (at least to me), is that the same thing works in Visual C++ 2008, while it does not work in Visual C++ 2010.
    Is this the reason why use of Visual C++ 2010 was discouraged, or am I doing something wrong, or is this due to something else?
#25
Quote from: lan on Tue 05/04/2011 14:58:04
RON is cool...and the template looks great.

But there seems to be a problem with a 640x480-resolution: when the player's character is moved via script (e.g. after stepping ont a hotspot) with following script-code
Code: ags
player.Move(20, 240, eBlock, eAnywhere);
the character finally stops near the upper left corner of the room (i.e. at position (10,480)).

or is the RON-template intended only to work in 320x200 resolution?



I'll look into that and let you know.

Ok. I've found out the problem. The solution is as below:

Open the General Settings tab (where the Game name, resolution, etc. are displayed), and set Use low-resolution co-ordinates in script to False. Since, most RoN games are made with the default 320 x 240 resolution, this setting does not create any problems. It is only for higher resolutions that we have to set this to False. Also see Upgrading to AGS 3.1 in the AGS manual.
#26
Quote from: Pumaman on Sun 17/04/2011 15:52:18
Are there actually any Windows PC's set up to deny access to the HKEY_CURRENT_USER branch of the registry?

AGS doesn't try to write to the LOCAL_MACHINE key, and CURRENT_USER should always succeed, unless the sysadmin has gone crazy with their permission restrictions...


:o That is not the reason for writing this code change.

The idea is that if you are working from a USB drive, removable harddisk, etc., the user settings, i.e. Recent games list, image editor, etc. may not always be available if the settings are read from HKEY_CURRENT_USER branch of the registry, as the data will reside on the machine and not on the removable drive.

If, on the other hand, the settings are stored on the removable device itself, then it does away with the need to set up the editor preferences if you plug your removable drive into a different machine. Also, the code change is such that paths on the removable drive can be reconstructed whenever required.

For example, let us say that when the Portable  (no install) version is run for the first time, there will be no settings.xml, and the editor will start with the default settings. Now the user configures the editor as required. Also, most of the times, the image editor and games folders will also reside on the removable drive.
While saving the settings, the drive letter (along with the colon) will be replaced with a placeholder, and while reading, it will be replaced with the drive letter which Windows has assigned to the removable drive, thus ensuring that the paths stay valid on any machine.


To make this point more clearer, please take a look at the below example, given in more detail (this is also briefly explained in the Readme available in the download archive):
Spoiler

Let drive letter of the removable drive is say J:.
User is running the editor for the first time. The preferences are entered and the game folder is J:\Projects\TheGame. The image editor path is J:\editors\imageedit.exe.
When the preferences are saved, the paths will be saved as {*_XMLRegistry_Drive_Replacement_String_*}\Projects\TheGame and {*_XMLRegistry_Drive_Replacement_String_*}\editors\imageedit.exe respectively.

Now suppose a different machine is used the next time, and Windows assigns K: as the drive letter to the removable drive. Then while reading from the XML, {*_XMLRegistry_Drive_Replacement_String_*} will be replaced by K:, resulting in paths which are valid on the new machine. This means that the editor will show the game folder in the 'Continue a recently edited game' dialog, as well as launch the image editor when the user wants to edit any sprites from within the editor.

Both these things cannot be possible if the settings are stored in the Windows registry under HKEY_CURRENT_USER. Also, even if the removable drive is plugged into the same machine always, there is no guarantee that it will be assigned the same drive letter all the times (e.g. a new hard disk was added, and hence the letter earlier assigned to the drive is now used for a hard disk partition, or multiple USB drives are plugged into the machine, etc.).
[close]
#27
For lightning effects, the animating room background feature can also be used.  Just draw the lightning on the required background frames and adjust the animation speed. You can find it in the AGS manual under Animating background scenes.
#28
This is an attempt to make a portable version of the AGS Editor, where access to Windows Registry will be kept to a minimum. Conditional compilation is used to ensure that the same code can be used to make both the normal as well as the portable versions.

Changes made:
A new file which defines Registry and RegistryKey classes is created. The classes defined in this file mimic the methods provided by classes with the same name in the Microsoft.Win32 namespace. These classes will either access the Windows registry, or read/write from an xml file on the disc, depending upon the version (normal or portable) being built.

See the Readme for details.

The download includes only the modified files and Readme.

Note:The details about obtaining the source code of the AGS editor can be found here. The /dev folder is the
one which should be checked out.

Download here.

Comments, suggestions and criticisms are always welcome.

Edit: Apr 14, 2011: It appears that the word portable in the subject is getting interpreted as cross-platform. Hence, updated the subject line to make the nature of the code change more clear.
Please note that this is still a Windows only version of the editor, the only difference being that it has reduced dependence on the Windows Registry, enabling it to be run from removable (flash, USB, etc.) drives.

Update: Apr 30, 2011: Added null checks in code.
#29
Is this an Easter egg, or something else (a bug, or some leftover code)?  ???

Spoiler
In one of the forest screens (go to forest from Mika's notepad, first select the path with red flowers, and then the path with purple flowers), there is a log of wood lying around. On this log, there is a hotspot named Hotspot 5. If you look at this hotspot, Mika will say: Mika's log, Stardate 2011.03.
[close]

On the whole, a very very good game. I enjoyed playing it.
#30
Hi all,

I have released a new updated version. The following changes have been made:

  • Max now walks faster in the town square.
  • Slight change in dialogue with Phil.
  • The Yahtzeebrand puzzle has been modified slightly.
  • Fixed a bug which led to Max being stuck between his Office and Manor.
  • Fixed a bug in dialogue between Max and Tijn.
  • Some other bug fixes which were pointed out in the forum.
  • Krysis style sprites for Punk Allen and Baron Wolfgang (provided by Renegade Implementor).

For download link see the first post, or click here.

Comments, criticisms and suggestions are always welcome.
#31
RI has sent me a list of bugs. I am working on them. I will probably release an update in the next one-two days.
#32
Quote from: ProgZmax on Wed 30/03/2011 06:22:20
Kind of weird...On day 2 after the Baron's big cutscene with Malone it goes to day 3 and Max is invisible in his office and going back to the Baron's repeats the cutscene again.  Should the game have ended there?

Thanks. I will look into it.

Quote from: Renegade Implementor on Tue 29/03/2011 19:42:40
Great stuff.  Had a look and enjoyed it.  I'll pm you soon with a couple of things I noticed that will need bug-zapping.

Thanks.
#33
Quote from: Kweepa on Tue 29/03/2011 00:29:06
My main beef so far is the walk speed of Max is way too slow, particularly in the town square. It takes forever to get to the map from the back alley. When I wrote a RotN game, I made Mika walk faster and faster in the town square as the game progressed.

Thanks for the feedback. I will update the script to give Max a faster walk speed when he is in the town square.
By the way, you can also walk off the bottom edge to reach the map from the town square.
#34
Hello Everybody,

Finally, my first RON (and AGS) game is complete. This is a short game with Max Griff as the player character.

The game is set in the years 2010-2011, so I don't think there will be any continuity issues.


The storyline is as below:

One fine day in February 2011, the Town Weirdo comes to Max Griff's office claiming that he is being spied upon. Max, thinking it to be another one of the town weirdo's multiple personalities acting itself out, does not take it seriously.

The weirdo is attacked shortly afterwards. Circumstances force Max to take up the weirdo's case and as the investigation progresses, Max learns that things are not what they seem to be...


The puzzles are pretty simple and should not be much of a problem (Hopefully, my puzzle making skills will improve with time).

Though I have tested the game a few times, it is quite possible that some bugs, UI issues, etc. might have escaped my notice. Please take some time to play the game and let me know about bugs, if any. Also, if possible, please let me know whether I have got the characters right (by this I mean their style of talking), so that I may not make the same mistakes in any future RON games I make.

If all is well, then I will email the Powers That Be to upload my game on the RON website.

Comments, criticisms and suggestions are always welcome.

You can download the game here.

Note: Since I work on this game in my spare time, it may be some time before I am able to release an update. Also, as I am not online everyday, there may be some delays in replying to your mails/queries.
#35
Reality-on-the-Norm / Re: Resource depot
Sat 19/03/2011 17:52:14
I had made an updated version of the RON AGS template a few months back. You can read more about it here.
#36
Reality-on-the-Norm / Re: Is the site down?
Fri 25/02/2011 19:07:51
Some earlier RON (and other AGS) games can be found here. For RON games just enter the RON sub directory.
#37
Also below excerpt from the AGS plugin API documentation should be kept in mind:

"The text script currently supports char, short and int types. These are 1, 2 and 4 byte integers respectively. Text script strings are implemented as standard C-style char* pointers, but with preallocated buffers of 200 bytes per string. Therefore, if you write a function which takes a string from the text script, make sure that if you add anything to it you don't write past 200 characters, or problems will result."

So I think we can safely declare and use character arrays of about 205 characters for passing strings between engine and plugin.
#38
Thanks for the quick reply. I'll check out the code and have a look.   :)
#39
QuoteThis is something that is on my list to change when the engine is OSed though.

For what it's worth, I have already done something of this nature through a plug-in. The result can be found here. Writing/Reading custom properties to/from save games is also supported.
#40
Looking at the forum posts, I see posts indicating that the source code is now in a subversion repository.

Is this repository open for all, or only for a select few developers, as I cannot seem to find the repository url in the forums (using the search feature)? Are anonymous checkouts allowed?  ???

And as far as SVN support in IDE is considered, I suggest those interested should give SharpDevelop a try, as it has built-in support for TortoiseSVN and can read/write Visual Studio solution files.

SMF spam blocked by CleanTalk