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

#61
A while back I got some adventure pack bundle on Steam with a couple of Indiana Jones games and The Dig. Never played any of them growing up (honestly, I have played very relatively few games to have such a passion geared toward designing them), although now I certainly do wish I had.

The Dig to me is a very intriguing sort of game. There were some things that I didn't absolutely love, but the storyline was very engaging, and I truly enjoyed playing this game. I've only played it through once, but I really would like to take the time to give it another run-through.

If I had to rate it, I'd say probably 8/10 (-1 point for cheesy asteroid disaster theme, -1 for the other minor inconveniences and quirks I encountered (such as near-pixel hunts and occasionally unclear direction as a player)). Pretty much an instant favorite in my book...

Now then, why aren't there more adventure games like this? ;)
#62
Hi folks. Well, seeing as it's December 3rd (for a whole 18 minutes more in my timezone :P) I figured I'd better go ahead and release something. You know, coz it's December 3rd. International You May As Well Go Ahead And Release Something Day.

On somewhat of a whim I figured I'd see if I could mask the text in an AGS TextBox without utterly obliterating the existing text. From there I got a bit more ambitious, and after several hours trying to convert a rather simple C++ MD5 algorithm into AGS code, I decided to postpone the hashing portion of the module for now and just get some feedback on what I've done so far.

What I've done so far is this.

  • Created a struct called Password. You can create instances (as many as you want!) of this struct. Of course, unless they're linked to a TextBox control they're not really doing much for you.

    Password password;

  • Linkage between instances of the struct and the built-in AGS TextBox controls is done via Password.Control.

    password.Control = txtPassword;

    NOTE: You can only link a TextBox to one instance of the struct at any time (it is tracked internally, and is updated if the reference is removed). If you try to link the same TextBox to multiple Passwords (simultaneously, if one reference is removed you can link the TextBox to another Password), you will experience a fatal run-time error.


  • As soon as the control has been linked to an instance of the password struct, its text immediately becomes masked. All further input to the TextBox will also be masked.


  • You can specify an alternate character to mask the password (other than an asterisk) via Password.MaskChar.

    password.MaskChar = '~';

    This will make every character in the TextBox appear as a tilde instead of an asterisk.

  • You can read the actual text from the password field at any time thanks to Password.Text.

    if (password.Text == "SWORDFISH") Display("ACCESS GRANTED!");

  • If you need to set the password text from the script, you can do that by setting Password.Text directly, or by calling TextBox.SetPasswordText.

    password.Text = "SWOR";
    txtPassword.SetPasswordText("SWORF");

    NOTE: If you set the TextBox.Text of a control that is currently linked as a password, you will invalidate the internal cache of what has been typed in, and you will not be able to recover the entered text properly.

  • At any time if you want to unmask a TextBox, this can be done by simply setting Password.Control to null.

    password.Control = null;

I'll continue trying to figure out why my MD5 hashes are coming out as something utterly different to MD5 hashes, but I thought I'd go ahead and get this out there to see what people think.

Practical Usage Examples:

  • In-game password masking.
  • Password-protected save games (ask me how! :=)
  • Obfuscating the name of your players' save games, to make them really upset! 8)
  • Take over the world!
  • Something else!

Download

P.S. Sometimes BBCode can be a pain in the neck!
#63
The AGSteam plugin serves as an intermediary step between the Steamworks API and the AGS runtime engine. In short, what that means for you is that if you're working on integrating a game into Steam, you can now place Steam-related function calls directly in your AGS code!

Currently the plugin supports Steam achievements, int, float, average rate stats, global int and float stats, and leaderboards. If you need any other Steam features, let me know and I can explore options to get them working properly for you.

Update: I've determined that the usage of the Steamworks API does not violate the non-disclosure agreement with Valve. AGSteam is now open-source!

Note: This plugin will not make Valve accept your game for Steam integration. They still hold the sole hand in that decision. This plugin will not do you any good if your game has not already been accepted for the integration process.

-monkey

Download links
#64
Hi folks,

I was wondering, if anyone has the time, could you make sure I haven't overlooked any technical reasoning why Dialog.ShowTextParser is readonly at run-time? Specifically the reason I would want to change it would be so that I can create a Dialog.RunInteraction(int option) function that wouldn't break if the text parser was being used. The way I would accomplish that would be by storing the current user settings for the various options, turning off the text parser if it was in use, disabling the showing of a single dialog option, running the dialog, and then afterwards restoring the user settings. The text parser is currently the only thing in the way that would break this functionality, and then only if it was in use by the dialog in question.

Seeing as there's no branch in the SVN for the engine, I can't really check in any changes, and I don't see the point behind forking the engine any further for this particularly, but it's something I would be interested in changing (unless there's a specific reason why I shouldn't).

Edit: I've just been poking around, and there's a game.disable_dialog_parser that doesn't show up in the manual anywhere. Let's see if I can't use that then! :=

Edit: Ah, yes, I'd forgotten about this. There's no way to generically stop a dialog. The StopDialog function only works from within the dialog_request function. So I've got this RunInteraction function working great, except you have to put a random run-script call into every dialog option that you want it to work with. Or you could just make said options end the dialog at the end of their script. Neither is particularly friendly, but I guess either would be at least slightly more friendly than not being able to generically call into the dialog script...
#65
I've been perusing the engine source and looking to see what I can do to try and contribute here, and I have some questions on the technical side of this, specifically for the C++ programmers who know more about it than I do.

First off then, a bit of background on my own knowledge. The furthest I ever really got with C++ was in the book I had for "beginners" I got up to chapter 6, which included an exercise to write your own custom string class. I ended up getting stuck trying to figure out how to program a sprintf-style function because I couldn't for the life of me figure out a way of implicitly casting my type to a POD-type in order to pass it through "...". If you know, well good for you, but I don't even have the source files any more because that was like 5 years ago. :P

I also once did a Windows C++ tutorial which was in the style of designing an MDI text editor, with which I got as far as trying to figure out how to set a dirty flag for each document (which wasn't covered in the tutorial). I asked some questions on the appropriate events that should have been raised, and did actually much later get an answer, but amazingly enough my incredibly awesome text editor completely failed to see the light of day.

So, I do have experience in using C++, even above and beyond the call of duty given out by the tutorials and included exercises, but in my ambition I never really did much with it. AGS already existed, so what more did I need? :=

Anyway, enough back-story. I just wanted to establish that although I'm not well versed in it, I do have functional knowledge of how C++ works and how to program in it and such. But looking over the engine source, which as CJ himself put it, is "a mess", I have been wondering about some things:

- What, if anything, is the advantage of using char*s vs. the std::string class? Presumably it's a bit faster since there's less overhead and direct memory access and such, but is there actually sufficient overhead with the string class to make it non-viable for a project such as this? By that I mean, in refactoring and cleaning up the code, would one be totally remiss to try and replace the usage of char*s with the more user-friendly strings? If so, why?

- Is there any technical reasoning to the programming style that seems prevalent among C++ programmers? Having been working with the editor code and trying to develop a plugin (when I'm not working directly in AGScript for modules and things), I feel I've become a bit spoiled really. Regardless of how some people may feel about it, the OO-model is fantastic for organizational purposes. Is there any reasoning why refactoring the engine source into something more OO would be a bad thing? I don't necessarily mean that everything has to be bound inside of a class, but at least for the organization of grouping functions together, this would be a major step in making the code more readable. Not to mention the fact that for those who are accustomed to languages like C#, it would make the transition between looking into the editor code and the engine code much easier.

- A lot of static limits could be removed by using one of the classes provided such as std::vector, but some of the file structures are currently dependent on the static sizes for the way they encrypt and/or serialize their data. Is there an easy or "simple enough" way to go about rewriting these functions so as to essentially produce the same result without actually locking ourselves into static sizes? I believe the general consensus is that it would be in our best interests moving forward to start with a clean codebase versus a "compatible" one (in reference and relation to the prior versions of the engine), so non-compatibility with the existing functions isn't so much a problem, but presumably the basic gist of what's already being done would be preferable to just rewriting the thing entirely with something new.

Considering this is more about the technical side of programming in C++ than anything strictly specific to AGS directly, I thought that this would probably be the most appropriate forum. Feel free to disagree and move it around wherever you like if you want though. :=

In any case, that's pretty much all I have for now. I'm just trying to get a feel for how other people feel about this. I've done some work in refactoring some of the existing files into OO classes and trying to give it something of a feel more reminiscent of C#, but I'm not sure if everyone would consider that the best thing to do. So please contribute any feedback that would be appropriate as I'm trying to get a feel for how I should be going about all this. Admittedly, the engine source is kind of a huge undertaking, but if we could all reach an agreement on the technical provisions of coding style and conventions, then we could progress forward with making the necessary changes to clean up the code into a consistent state. ;)

Also something to consider is any implications that might be prevalent across various platforms. I have zero experience in cross-platform coding, so I'm not personally aware of any of the caveats or complications that may need to be handled to try and make porting the engine as simple as possible.

Thanks for any information or thoughts!
#66
Hey, I just wanted to share some information that I just found because I was having some trouble compiling the help file from the SVN using the provided run.cmd file. I was actually getting an error message, "HHC6003: The file itircl.dll has not been registered correctly."

A bit of Googling later and I came upon this page which explains why I was getting this error. The itircl.dll file was fine, but one of its dependencies, itcc.dll was completely missing on my system. In addition to the error message, this led to two problems in the compiled help file that was generated:

1) The index was not being sorted, so it was a complete and horrible mess!

2) The search feature was completely broken, and I was unable to use it for anything (any search returned no results).

The above referenced help site actually provides the itcc.dll for download, for users such as myself where the file is just completely missing. Since I am on 64-bit Windows, I registered the file under both Windows\System32 and Windows\SysWOW64. This might not be necessary, but I figured it was the safest route (especially since itircl.dll existed in both locations).

Once that was done, I am now able to compile a fully functional help file. I just wanted to share this in case anyone is also missing the itcc.dll file. ;)
#67
Hey gang,

I'm running a limited-time competition whereby you, yes you, can win the once-in-a-lifetime opportunity of having a real-life AGS Celebrity come live in your home and mooch off of you while he tries to get back on his feet financially! Candidates probably must live in the U.S. (considering that's where I live and I have no passport! 8))

And just so you know this isn't a joke, it's been officially endorsed by our very own, strazer:

Quote from: strazer on Mon 18/07/2011 23:37:42
No worries! I'd gladly offer you a place to crash if I lived in the US...

You know as well as I do that there are great guys in the AGS community, so I suggest asking around here if you need a place to stay.

I hope everything works out for you! Keep your chin up!

Chris




In all actuality what's happened is that over the course of the last week, I've gotten my truck out of the shop only to have it break down three days later, my roommates who were helping me out with rides (with me paying their gas) decided 1) they will never give me a ride anywhere ever again and 2) they want me out of their house, and so as a result of these former reasons, I've also lost my job (because 32 miles (each way) is a hell of a walk).

I'd never even think of asking around here in this fashion, but strazer said I should, and I don't know any better than to blindly follow everything strazer tells me to do. :=

If anyone is capable and willing to help me out with my situation, that would be incredibly awesome and also incredibly unexpected (simply because we don't really know each other in "real" life). So, discuss. :=

By the way, I do have other familial-related options, but they are very limited (in resources, not in a desire to help me out). Just to let you know.
#68
Oceanspirit Dennis: My Very First AGS RPG Game Ever Made by Me and Square Enix:
Can Someone Please Tell Me How to Upload It So You Can All Play It: Episode VIIIXCMIICM:
The Legend of Zelda Edition 3DSX: Ocarina of Majora's Past: Cloud Strife's Precursor Story!!1:
PubMasterQuestPMQLEgeNDS: DON't post in MY THREAD if you don't like This Game Plxkthnz:
Oh, ALSO KINGDOM FINAL HEARTS FATNASY VIXYCCII:
ヤイエ德薩ル三振デサ襲擊

In this game you will explore the awesomitity that is Oceanspirit Dennis and get to see all sorts of stuff about how he came to be the Scourge of the Underworld. I hope you all love and enjoy this game. If you don't, please keep it to yourself!!1





DONWLAODD!!1

MIRRAR!! (Thanks Peder Johnsen!!)

SORES!11

P.S. IF YOU HAPPEN TO WIN THE GAEM, PM ME FOR DETAILS. YOU'LL SEE WHAT I MEAN.

P.P.S.P.S.S.P. I PARTIALLY FIXED THE ISSUE MENTIONED ABOVE. THERE IS ONE FILE MISSING. PM FOR DETAILS IF YOU'RE REALLY THAT DESPERATE. ^_^

P.S.S. The downlaod is 145 MB, so be prepared!

P.S.S.S.S.S.S.S. There's a buttt-load of special features in here that might go ENTIRELY UNNOTICED. If no one has discovered any of them I'll start leaking them in a week or two.
#69
Hi gang,

I was taking a look at some color values when I noticed that even for 32-bit games that RGB(255,255,255) is returning an AGS color value of 65535. That seemed a bit silly to me seeing as that's a 16-bit value. So just on a whim I wanted to see what would happen if I passed in 65536. Turns out that for 32-bit games that matches RGB(0,0,0). So I went up: 65537. That matched RGB(0,0,8). Not the palette replaced 0-31 AGS color value, but actually real RGB(0,0,8).

From there I did some more testing, and I came to the incredible conclusion that for 32-bit AGS games, you can get access to those 0-31 slots, and true-color RGB(255,0,255) magenta by simply offsetting the color value by 65536.

So, with that in mind I bring you the fastest produced module in my entire history, with one amazing function and another one that's simply incredible:

Code: ags
int color = GetColorFromTrueColorRGB(255,0,255);
surface.Clear(color); // clears the surface to magenta, but doesn't match AGS' transparent color! sweet!!
int rgb[] = GetTrueColorRGBFromColor(color); // returns RGB(248,0,248)
rgb = GetTrueColorRGBFromColor(color, true); // returns RGB(255,0,255)


Please note again:

THE "SPECIAL" COLOR VALUES RETURNED ONLY WORK FOR 32-BIT GAMES. If your game is 16-bit then the magenta color returned by this function will match the AGS transparent color!!

Download

Thanks For Downloading!

-monkey

10 July 2011

So the GetTrueColorRGBFromColor was completely broken in that it was returning the 0-31 value instead of the 0-255 value. I fixed that. := I also fixed the G value being completely wrong. := I also added a highBit parameter to the function to control whether the returned values should be the low- or high-end value in the range. The default is false, for which R31 will be converted to R248. If true, R31 will be converted to R255.

09 July 2011

Uploaded v2.0 with a fix for RGB(248,0,248) to RGB(254,0,254) (due to the precision of AGS color values, these are all treated the same as RGB(255,0,255)), and implemented the "reverse" function, to strip out the R, G, and B values from an AGS color value.
#70
In response to the overwhelming demand for me to release more modules ( ::) ), I've dug this one up from 2009. But don't worry, it's still entirely viable.

Download

For those of you who don't know what a finite state machine is, it's basically a way of looking at the relations between different states. For example, you could say that the grocery store is east of your house, so if you were at your house (state: "house"), and you went east (transition: "east"), then you would arrive at the grocery store (state: "store").

Another example would be to think of turn-based RPGs. The character could be in a number of different states. An FSM wouldn't really be the best option for storing say, the character's health, but you could use it to store other information. For example, their normal state could be Healthy (state: "Healthy"). If an enemy casts a spell on them, they might get poisoned (transition: "poison spell"). After the enemy cast the spell, their state would now be Poisoned (state: "poisoned").

This is where the FSM steps in. The "machine" lets you define what "states" exist:

Code: text
// pseudo-code
STATE:Healthy
STATE:Poisoned
STATE:Confused
STATE:Asleep


From there, you can define "transitions" which indicate the relation between different states. Each transition has a "from state" and a "to state", the "before" and "after":

Code: text
// pseudo-code
FROMSTATE:Healthy
TRANSITION:Poison Spell
TOSTATE:Poisoned
FROMSTATE:Poisoned
TRANSITION:Use Antidote
TOSTATE:Healthy


So now we have defined some of the relations between some of our states. The transitions are basically "what happens" that causes a shift or change from one state to another. For more information, there's some further examples in the StateMachine header file (.ash), which includes full documentation, and of course, Google is your friend too! :=

I've included a script file FSM.asc. You can't import it directly into your games (it's not an exported module), but if you want to plug it in you can just open it in a text editor (Notepad) and copy it into a script that way. This script file is the source of the included demo, which is a simple Interactive-Fiction style implementation of an FSM. Some of it might look complicated, but don't be intimidated, using this module is actually quite simple. Once you've implemented a few states and transitions, you should be able to get the hang of it.

Download

NOTE: HeirOfNorton once released an FSM module that was a raging success at going largely unnoticed. := I've taken a slightly different approach to the implementation, and hopefully the demo and some of the examples will help exemplify what makes FSMs so powerful.
#71
In response to this totally awesome thread, I decided to make a module to handle music playlists! I'm aware of course that we already have AudioClip.PlayQueued, but that's a pretty basic and limiting function if you want to implement a full music player into your incredible AGS games!

I'm on a tight schedule to get out all of my Release Somethings, so I haven't typed up all of the documentation for this yet, but the call tips should be enough to get you started, and hopefully everything is intuitive enough that documentation isn't really completely necessary.

Download v1.1

For now, I'll explain a few things. First, an example:

Example:

Code: ags
// game_start
Playlist.AddClip(aMusic1); // add our clips to the playlist
Playlist.AddClip(aMusic2);
Playlist.AddClip(aMusic3);
// ..etc.
Playlist.Repeat = eRepeat; // set the playlist to repeat
Playlist.Shuffle = ePlaylistShuffleAll; // set the playlist to shuffle
Playlist.Play(); // starts the playlist playing!

// on_key_press
if (keycode == '[') Playlist.PlayPrevious(); // play the previous track
else if (keycode == ']') Playlist.PlayNext(); // play the next track
else if (keycode == ' ')
{ // spacebar
  if (Playlist.IsPaused) Playlist.UnPause(); // if the playlist was paused, unpause it
  else Playlist.Pause(); // otherwise, pause it
}


Okay, so I'm hoping this is straightforward enough, especially with the comments, so as to clarify what's going on. But I'll try to break it down. Please bear in mind that I plan to release a demo with resplendent GUI to exhibit this module, but since the majority of the codebase is (apparently) stable, I figured why not release it upon the world and let you help me debug? :=

06 February 2012

v1.1 is here! Changes include:

- New enum PlaylistRepeatStyle: eOnce and eRepeat are still valid, but this was needed to add ePlaylistRepeatOne, so that you can now repeatedly loop a single clip.

- Added functions Playlist.Save and Playlist.Load: This allows you to store multiple playlists. Since there is not currently a global array of AudioClips, this list can only be persisted in-game, and across save games. That is, you cannot save a playlist to a file and read it back.

- Added Playlist.PlayFrom, to allow you to play a specific clip in the playlist, by index. This will start the playlist playing if it is not.

- Added Playlist.Resume as a synonym for Playlist.UnPause.

- Added properties Playlist.Volume and Playlist.Mute. Playlist.Volume is a shortcut to Playlist.Channel.Volume, with the exception that it can be persisted even when Playlist.Channel is changed or is null. Playlist.Mute of course just temporarily sets the channel volume to 0, but this does not affect the Playlist.Volume.

- Added stopClipIfPlaying optional parameter to Playlist.Remove to allow you to override the default behaviour, which is to stop the current playing clip and skip to the next if it is the clip being removed from the playlist.

- Fixed Playlist.Clear resetting the Repeat and Shuffle styles.

- Fixed bug if an invalid clip was specified to Playlist.RemoveClip.

- Removed some debugging code that was inadvertently left in v1.0 of the module.

- Included documentation!! Yay! o/

Thanks guys, and hope you like the module!

Download v1.1

P.S. It improves your sex life! No, really! Kick some sexy audio tracks into your game and then hook this playlist functionality in and you sir will go "All night long, all night!" ;D
#72
For some reason in developing the EasyBake module I've found that if I create a large static array (specificially of 3086 members) of the type int and pass in static values to each index (accessing each one individually and statically, not via a loop), the game will hang. The thing is, it doesn't hang during the array allocation, or even during setting each of the indices to its respective value. The game will repeatedly hang after the array has been allocated, values assigned, and the array released.

The code looks like this:

Code: ags
void Bytes()
{
  int bytes[] = new int[3086];
  bytes[0] = VAL; bytes[1] = VAL; bytes[2] = VAL; bytes[3] = VAL; // VAL is different for every index, this is just an example
  // ...
  bytes[3082] = VAL; bytes[3083] = VAL; bytes[3084] = VAL; bytes[3085] = VAL;
  // use the array now that the values are all seeded in
  bytes = null;
}

function game_start()
{
  Bytes();
}


game_start finishes executing. The game hangs during room 1's fade-in process. I can upload the specific source that I'm experiencing this problem with if it's relevant.

So, I've actually inadvertently discovered that I can work around this. The way I'm doing that is by exploiting what would probably be considered another bug. If I allocate a char array 4 times the size of the int array I need (int is 4 bytes compared to char being 1 byte), then the game runs perfectly. So basically:

Code: ags
void Bytes()
{
  int bytes[] = new char[3086 * 4];
  bytes[0] = VAL; bytes[1] = VAL; bytes[2] = VAL; bytes[3] = VAL; // VAL is different for every index, this is just an example
  // ...
  bytes[3082] = VAL; bytes[3083] = VAL; bytes[3084] = VAL; bytes[3085] = VAL;
  // use the array now that the values are all seeded in
  bytes = null;
}

function game_start()
{
  Bytes();
}


This code works. As I said, this would probably be considered a bug as it's reminiscent of the C++-style *(pointer + index) type of logic (because I'm assigning 4-byte values into 4 indexes of a 1-byte array)..which is something that AGS tends to stray very much away from..but the fact of the matter is that it (presently) works perfectly. :=

I haven't currently released any code exploiting this method, so if I shouldn't (because it's something likely to be "fixed"), then I will either have to wait until the former bug is diagnosed and corrected, or just stick to using the original char values instead of using the bitwise operators to smash 4 of the chars together and save space.

If it's relevant, I'm running Windows 7, 64-bit.
#73
You all demanded it, and your wish is my command. So, I proudly present to you: THE EASYBAKE MODULE - IT MAKES TOAST!

Download

It's really easy to use:

Example:

Code: ags
DynamicSprite *toast = player.Toast();
Overlay *overToast = Overlay.CreateGraphical(150, 200, toast.Graphic, true);
toast.Delete();


Spreads the player character on a delicious piece of toast, and then shows that delicious toast on an Overlay.

P.S. I know what you're thinking, and it doesn't require any additional setup. Just import the module and you're done! :)
#74
HIIIII!! :D :D ;D


I AM MAKING A NEW GAME FEATURING OCEANSPIRIT DENNIS! I REALLY HOPE YOU WILL ALL LOVE TO PLAY IT.

IT WILL FEATURE OCEANSPIRIT DENNIS AND OTHER CHARACTERS FROM OCEANSPIRIT DENNIS. IT WILL TELL ALL ABOUT HOW HE BECAME THE SCOURGE OF THE UNDERWORLD.

THIS IS AN ACTUAL SCREENSHOT FROM THE GAME:



I WILL POST MORE LATER WHEN I HAVE MORE INFO! ;D ;D ;D ;D

STAY POSTED!! :D :D :D ;)
#75
I've found that if I'm using an extender (a Character extender) method which calls Character.Say, that when I auto-number speech lines it works successfully, though does give errors for any instances of "this.Say" ("Unknown character this"). So seeing as the rest of the lines are numbered, that's fine. The problem comes in when creating the voice acting script. The same errors prevent the script from being generated.

I guess what the best way of handling this would be is for the editor to give a warning, "This command could not be automatically processed" or some such, seeing as obviously the editor can't be expected to insert multiple speech file numbers into the same string at the same place. :=

I can handle numbering those lines myself (for my present purposes they can actually be statically numbered), but the only problem is that I have to comment them out in order to generate the script.

Anyway, I'm not sure if this is a "bug" so much as..well, I don't know. I guess extender methods and voice acting don't play nicely together under these circumstances, but it could be a non-fatal error for the script generation, couldn't it?
#76
So, I just saw a commercial on TV, and Duke Nukem Forever is being released.

I'm somewhat scared. I don't know what's happening. I wasn't prepared for this. There hasn't been sufficient time.

Duke Nukem Forever was supposed to be the game that could never be made. A legend among gamers, of apocalyptic proportions.

I honestly don't know what's happening. My entire world view has just been shattered to pieces. :-\
#77
This one's pretty small for now, so I'll just put a list of the functions this module provides and a brief example of what they're for:

  • Mouse.DisableModeEvenOnRoomChange(CursorMode mode)

    This function was written specifically in response to the recent thread by Rocco about not being able to properly disable eModeWalkto. Turns out that eModeWalkto (and perhaps some other modes too!) are being automatically restored when the player changes rooms, even if previously disabled with Mouse.DisableMode. The solution is to disable the mode when the room is being loaded. This function will now handle that for you.

  • Mouse.IsModeEnabled(CursorMode mode)

    There's built-in functions to enable and disable cursor modes, but no built-in function to check the current setting. This function will now let you check that.

  • Mouse.IsModeStandard(CursorMode mode)

    This lets you check the editor setting for whether or not a specified cursor mode is standard. This is useful because by default the cursor cycling function(s) will only cycle through standard modes. You can't change this setting at run-time, but now you can check it with this function.

  • Mouse.SelectPreviousMode()

    This function will look through the cursor modes and try to find a previous, enabled, standard cursor mode. It does the opposite function of Mouse.SelectNextMode.

Like I said, it's not a lot of functions. :P It's not like this is the StringPlus module or something!

Anyway, maybe more functions will come later, or maybe not. Hopefully someone will find it useful either way. :) Besides, this is topic 43434..surely that's got to count for something? :=

Download
#78
Now that the engine has had its source opened up, it seems to me that it might be a good time to start getting an idea of what people most want to see updated in the engine. This means anything that has to do with the run-time component of your game. Design-time requests should go to the Editor Wishlist thread. ;)

There's a few that I would really like to see, but I haven't yet had a chance to look at the engine source at all. That with the fact that we've already been told that there are underlying complications for the ones that I will be suggesting might mean they still will require some time before they can be implemented. In any case, I think it's good for people to have a common place for this that we can post to so we can get an idea of what the most people want.

So:

  • Dynamic limits!!

    Specifically I'm thinking of things like inventory items and controls per GUI, and room objects. Room hotspots are based on a bitmap still, so that would require even more work, but these other items could presumably be looked at.

    Thoughts: For compatibility with existing scripts, we would still need some way for the user to easily get the "highest used amount of XXX". For example, many scripts that I'm aware of use the algorithm for mapping a GUI ID and GUIControl ID to a single array index. That algorithm is dependent on a static number of maximum GUIControls per GUI. If the user could still read the maximum number actually used by any GUI at run-time, then dynamic arrays would be sufficient. This is something that will have to be dealt with for compatibility, and simply for the usability of this algorithm in new scripts.

  • Dynamic Arrays..improvements

    Dynamic arrays are great, but they're rather limiting as of right now. We can't read back their current size, there are no standard functions for working with them (of course that's somewhat related to no support for type-casting), and we can't have dynamic arrays within a struct. These are improvements that I'd like to see. Also, some sort of constant should probably be defined like AGS_MAX_DYNAMIC_ARRAY_SIZE (the current value is 1000000).

  • Pointers to custom types

    It's already possible for the engine to create single, static pointers to custom types, as evidenced by member functions and extender methods (which use the 'this' pointer). Opening it up for users to create dynamically typed pointers and assign them values has been a concern for some time though, particularly in preserving the game state for save games. I'd like to propose that we take a look at the existing garbage collection (which works great) and see what can possibly be done to open up the possibility of pointers to user types.

  • Object-orientation

    It's true that not everyone is a fan of the OO programming model, but the majority of the functions/properties in AGS are object-oriented. I'd like to see what we can do to clean up some of the older properties/functions to bring them into conformity with this OO model, for consistency sake.

  • eEventEntersRoomAfterFadein and eEventQuitGame (or game_quit, game_end, etc.)

    These two event types have been proposed for inclusion in the EventType enum and to be fired off appropriately by on_event, but they haven't been implemented yet. They would certainly make things a bit simpler for us programmers!



I think that's about it for now. So if you have any ideas, feel free to submit them here, and show your support for the existing ones. Also, any C++ programmers with access to the source should chime in if they've managed to make some way in including any of the suggested items!


P.S. Don't forget to thank CJ for opening up AGS so we can all work together to make it even better!!
#79
I'm writing a plugin for the editor that needs to use some forms, but I don't want them to show up in the taskbar as separate windows, and would prefer them to remain within the main AGS window.

Since the editor plugin API doesn't presently expose the main editor form, I'm resorting to doing this in the component's constructor:

Code: ags
            using (ContentDocument pane = new ContentDocument(new EditorContentPanel(), null, this))
            {
                _editor.GUIController.AddOrShowPane(pane);
                _mainForm = pane.TopLevelControl;
                _editor.GUIController.RemovePaneIfExists(pane);
            }


This is working for me, but it's not exactly optimal really.

So this has got me wondering..would exposing the main editor form to the plugin API be worthwhile? I took a brief look, and from what I can tell, the editor code itself only publicly exposes it as the IntPtr handle.

Really, even just a method for adding a form as a child control would work for my needs, but that's why I'm creating this thread (to ask what people think the best route might be for something like this (or indeed whether it would even be considered worth adding to the plugin API)).

Edit: If anyone saw the code before..suffice it to say I'm not well versed in C#. :P
#80
Today is Jabberwocky! International Haddas Awareness Day. So, happy JIHAD everyone, but mostly Haddas!! :D
SMF spam blocked by CleanTalk