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

#41
Once again we see the perils of not testing EVERYTHING after each little change.  ;)

In my own defense, I was coding that part at about 1:45 in the morning.

HoN
#42
Okay, I've uploaded a quick demo game showing how to use it. Please note that (to keep down file sizes) I have only included the gane files, not the compiled game itself. It needs 2.71 to be compiled.

HoN.
#43
You could also mess around with Character.Tint, though that will tint the entire character, not just specific parts of it.

HoN
#44
Seeing all the modules SSH has been releasing made me feel like I was slacking, so...

I present the Icon Based Dialog System script module!!

This module (well, modules, really) allows you to easily add a complete icon-based dialog system to your game, similar to the one used in Discworld and... other... games, I think.
Anyway, all you have to do is create your GUI. Make it look however you like, just be sure to add some buttons to it. Then import the IconDialog modules, and use the functions to hook into your GUI and buttons.

Some of the neato features:
* Simple API that'll get you speaking in pictures in no time!
* Highly customizable, and easily (I hope) extensible.
* The ability to automatically reposition the icons, and
  resize the GUI match. (Or not, whichver you like!)
* No practical limit on the number of dialog topics and
  options, each with its own icon associated with it.
* The ability to run dialogs as usual, or jump straight
  to a specific option.
* Cross-platform compatible

Download here (Requires AGS 2.71!)
Mirror

Edit: And here is a short demo game showing how to use it:

Get the demo

HoN

Edit: P.S. I do, of course, welcome any bug reports or suggestions for additional features.

* Side note, isn't it amazing how quickly you come to depend on new features without noticing it? While I was writing this, I thought it would be compatible with plain AGS 2.7, as I didn't use any of the new String or DynamicSprite stuff. Then I looked through the code, and the lists of updates, and realized that a fair amount of the code depends on lazy eval, introduced in 2.71 beta 5. And I can't even claim that I'm just used to C++, cause I'm not. When I'm coding in C++ I have to remember that I'm NOT coding in AGS, not the other way around.  ;D
#45
That is a 32-bit integer, the same type as used in AGS.  Each of those four numbers output by a hex-editor is a single byte, with four bytes (32 bits) per variable. I could mention endianness as well, but from the looks of those numbers it should not be necessary. Just use File.ReadRawInt and it should read them correctly.

HoN

#46
Try static function SaveLoad::DecisionGUI_Open (DecisionQuestion thisDecision)
or somesuch. Bear in mind, enum is not itself a type like int or char, its more like a typedef. The way AGS sees it, DecisionQuestion is the type, and must be used in the header on its own. When the function is defined, you have to use the type (DecisionQuest) AND an instance of the type (like thisDecision), just like how you would have, say:

struct MyStruct {
    function One (int);
}

function MyStruct::One (int thisInt) {
...
}

See what I mean?

HoN
#47
...on a scripting language.
To wit, I am in the very early stages of writing a program to simplify Dialog-tree writing. Something like ca0mgr's editor, but with more functionality, and more generic. I plan to use XML files as the main save/load format, but with Import/Export scripting for other file formats. That way, for example, a user could import an AGS .dlg file, edit it in the program, and export it as an XML file, as a .dlg, or as plain-text code ready to use with the Scrolling-Dialog module.

My question is this: does anyone have any suggestions on which would be the best scripting language for this purpose? I'm looking for something that can manipulate variables fairly robustly, and can interface with C++ without too much difficulty. I'm equally ignorant of Lua, Ruby, Perl, Python, etc, that none of them would be any more difficult to learn for me than any other, but do you have any opinions also on which would be easier to use for AGS coders (or WME or AGAST; I said it's going to be generic)? Finally, do you know which would be the easiest to embed/use in my program code?

Any opinions/help on this greatly appreciated.

HoN
#48
General Discussion / Re: Scheme ?
Mon 24/10/2005 01:51:04
Quote from: Edmundo on Mon 24/10/2005 00:38:39
I think most gaming people use the brazilian language Lua ... and someone was working on an adventure game engine with it.

You mean LucasArts?   :)
They used Lua as the scripting language for Grim Fandango (I think Monkey Island 4, as well, but I'm not sure about that one.)
I've given a (rather cursory) glance at the various scripting languages around, and from what I've seen, Lua is pretty much considered the most suitable. GameMonkey is also pretty high up the list (similar features to Lua, with a C-style syntax and grammar). Python and Ruby come as distand third and fourth, and I think AngelScript was the only other one even in the running.
Forget about Perl. Different intentions altogether.
Any of these would be far better, I think, than Scheme.

Just my (likely poorly informed) opinion...

HoN

P.S. Bear in mind that all of these are very GENERAL languages, and none of them will already have all the features you need, or even necesarrily MOST of the features you need. If I'm not mistaken, that's the main reason C.J. wrote his own script from scratch for AGS.

Edit: Added links to the above languages.
Also, I forgot about Tcl. Not used very much any more for games, but it has been before. I personally could never make heads or tails of it.
#49
Quote from: SSH on Mon 17/10/2005 10:29:15
Indeed, people who know about cryptography never call anything "nearly impossible" to break.

Yeah, I know, but I'm working on my salesman skills.   ;)
Obviously nothing this simple could be that hard to crack with a concerted effort, but it should be enough to deter any Joe Gameplayer with a hex editor who wants to give himself 10,000 experience points.

Quote from: Pablo on Mon 17/10/2005 05:37:37
Does this include video files too?

Well, the included encrypter WILL encrypt video files, but said encrypter would have to be used to decrypt them as well. They would not be usable in a game.
#50
Hey folks, I've got yet another script module for your consumption.  Are any of you making a game using the File I/O functions, perhaps for a player-generated character, or some other use? Were you perhaps worried that some unscrupulous player could hack the file and change the character's stats on a whim? Or perhaps you are using text files for some of the game's content, but don't want players to be able to change what's been written? Well, worry no more!  ;D

Ahem, anyway, this module adds an EncryptedFile class that is intended to be a drop-in replacement for the standard File objects already used. It uses a simple (but nearly impossible to break) Exclusive-Or encryption to secure your external files, so no one can read them but you. It also includes a small EXE for encrypting plain text/binary files so they can be read by the program (source code included).

Download here (Requires AGS v2.71!) (Thanks Neole!)
Mirror 1 (Thanks Colxfile!)
Mirror 2 (Thanks Candle!)

Please note that this is still a beta version (I'd love to hear about any bugs/issues/suggestions for the sucker), and that it requires AGS 2.71 or higher.

I hope you find it useful.
HoN
#51
To clarify, it is true that the player character exists in any room that you can see. In order to have a room without the player visible, you have to go into the room settings and check the "Hide player character" option. That's the general way to do Intro/title/menu screens.

HoN
#52
Coupla string things. Not sure if these are bugs, deliberate, or just too hard to bother with... (or if I'm the only one having these problems)

First, say I have this code:
Code: ags

function MyFunction(String mystring) {
  //blah blah
}

//later

MyFunction("This is some text");


In this case, the game aborts with the error message "Cannot convert const string to String" I kinda understand why that would be, but it is rather inconvenient. It does work if I assign to a seperate String, and pass THAT String to the function.

Second, would it be possible to have Strings auto-initiallized to "", or would that just mess this up for people too much? Right now it's not very intuitive that I can declare a String, but that I cannot perform, eg. an Append function on it (because it is a null pointer, nothing to append to).

Anyway, these are work-around-able, but these seem like things that SHOULD work.

HoN
#53
Jethro Tull? Who's he?    ;D

(Yes, that was a joke. I wonder how many will get it.)

On topic, I have VERY eclectic tastes in music, and will listen to bloody near anything except disco and country. Unless Eagles counts as country. I'm not really embarassed by anything I listen to except...well...okay, maybe a little about all those Disney movie soundtracks. <hides>

HoN
#54
AGS only supports pointers to built-in classes, so this won't work with other variables. The way to do it with the example you gave is by returning the new value, like so:

Code: ags

function MyFunction(int par)
{
    par=1;
    return par;
}


and then call it like so:

Code: ags

int X;

//later...

x = MyFunction(X);


This is all pretty basic stuff and works almost exactly as in C/C++
#55
General Discussion / Re: Horror
Thu 29/09/2005 01:20:04
I'm pretty sure that means "Dead Cthulhu the Deathless ." (edit: Just flipped through the story again) I don't speak it, or anything, I've just been reading a bunch of Lovecraft recently. And no, it's not latin. It's a bunch of nonsense Lovecraft made up because he thought it would look neat, like an ancient language. Even HE didn't know how to pronounce any of it.

For a somewhat different take on Cthulhu, I highly recommend Neil Gaiman's story "I, Cthulhu." Any of his other Lovecraftian stories are good, too, but that one's free.

HoN
#56
Quote from: King_Nipper on Sun 25/09/2005 03:59:53
Obscure is fine... but... none of us know who the hell Winowill is, so it doesn't really contribute to our discussion here.  could you explain a little?

Winnowill is the main villainess of the ElfQuest comic book series, seen here:



And hey, she can't be THAT obscure. She's got her own entry on Wiki!

HoN
#57
Winnowill!!

(How's that for obscure comic-book villains?)  :D

HoN
#58
Oh. I had the same idea, trying to figure out how to add lighting effects to the textured walls. With the current state of the RawDraw functions, about the only way I can think of to do this is to have a 1 X 1 pixel sprite and RawDrawImageTransparent that sucker all across the screen. Rather unwieldy.

The best solution(s), in my opinion, would be for CJ to add RawDrawImageResizedTransparent, and/or to add a transparency setting to the regular RawDraw functions. Personally, I vote for the latter, as it could be useful for other applications than this.

HoN
#59
Quote from: YakSpit on Mon 19/09/2005 05:01:44
So can the rawdraw function be used for transparent shapes as well?

Not sure quite what you mean by this. If you mean textures with transparent sections, no problem. I alread have one of those in the example. Textures with alpha channels would probably work too, though I haven't tried it. If you mean translucent SOLID shapes--like say a glass sphere--then no, the rawdraw functions can't do it right now. (as far as I know)

HoN
#60
Yeah, I know about that error. That one, at least, is almost certainly just a mistake on my part, I just have to find it.

As for floor/ceiling textures... This sort of texture-mapping is done by taking 'slices' of each texture and rendering them sequentially, scaled up or down. Up till now, floor textures have been impossible because floors could be seen at any angle, not just head-on like the walls (that's why mouse-look is disabled). However, now that CJ has added sprite-cropping, this combined with sprite rotation MIGHT make floor textures a possibility. I'm looking into it.

HoN
SMF spam blocked by CleanTalk