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

#881
If you make an array locally in a function then it seems to cause a stack overflow if you set the size to ~1000.  If you create one globally, AGS doesn't seem to have a problem allocating a 20 million int array, I don't know what the limit is, but you'd probably hit the limits of system memory first (the 20 million int array made my game use 118mb ram, but it ran fine).
#882
Advanced Technical Forum / Re: Sub Scripts?
Mon 06/06/2005 09:25:17
It's true goto statements are rarely used in modern languages, they do exist but are often considered bad programming.

Does sound like you do just want a function, they are like gotos but a lot more useful.
Say you wanted to make the character walk 100 pixels to the right and say something, but you wanted to use this all over the place in the script, in different functions - at the top of your room script you'd make one like:

Code: ags

function walkEastAndTalk() {
// inside the curly braces goes your code:
cEGO.Walk(cEGO.x + 100, cEGO.y, 1, 0);
cEGO.Say("I'm here.");
}


then you can call it from other places in the room script just by using the command walkEastAndTalk(); Ã, it will enter that function, excecute the commands and return to the place where it was called.
Ã,  Ã, You can also make your function take parameters, to change what it does. Ã, For example if we wanted to be able to tell that function how far to walk, instead of it always walking 100 pixels then you could change it to this:

Code: ags

function walkEastAndTalk(int howfar) {
// inside the curly braces goes your code:
cEGO.Walk(cEGO.x + howfar, cEGO.y, 1, 0);
cEGO.Say("I'm here.");
}


now you have to specify a distance when you call it like walkEastAndTalk(250); would make him walk 250 units instead.
Ã,  Ã, Another thing you can do with functions is to return a value. Ã, For example, if you want a function to check if the character was standing in a particular rectangle on the screen you could do this:

Code: ags

function characterIsInRectangle(int x1, int y1, int x2, int y2) {
// check if they are inside these coordinates
if(cEgo.x>x1 && cEgo.y>y1 && cEgo.x<x2 && xEgo.y<y2) return 1; // return 1 if they are
else return 0; // otherwise return 0
}


then you could use the returned value to make decisions when you call it, like

Code: ags

if(characterIsInRectangle(200,200,400,300) == 1) { 
doStuffBecauseTheyAreInRectangle(); 
} else { 
doOtherStuff; 
}


Now, if you want a function to be callable in more than one room, you need to write it in the global script, and make sure that the room scripts are aware of it by adding an import command to the Script Header (press ctrl+H to edit the header). Ã, For example, for the previous function to be usable in room scripts you'd write the following in the script header:

Code: ags

import function characterIsInRectangle(int, int, int, int);


this tells all the scripts name of the function, and the TYPES of the parameters that it takes, so you can call it anywhere in the game.
#883
Wonderful release!Ã,  Been waiting for sprite compression forever...
I got this error on starting the editor but it continued to work fine after I pressed ok...

---------------------------
AGS Editor Error
---------------------------
The dynamic link library 'accomole.dll' was not found, but it is required in order for the AGS Editor to run. Make sure you have installed AGS correctly.
---------------------------
OKÃ,  Ã, 
---------------------------

Edit: my game goes down from 15mb to 4.87mb, nice.
#884
Darkstalkey and I might Release Something... although three weeks probably won't be enough time to get it ready.
Hmm, AGA, want to Release the next part of our Something?
#885
If one exists, I wouldn't recommend using it, Flash is by far the best thing to make swfs in, and flash is a vector based animation system... Photoshop isn't so great for vectors.  You can of course save images from photoshop and import them into flash for animation... these could be bitmap images or vector images (bitmaps will bloat the filesize a lot, and aren't as animatable). Flash also has the ability to trace bitmaps, converting them into flash vector objects, but this can look terrible if your image isn't suited to it.
If you want to draw vectors in another program that is better for drawing than flash you could try something like Illustrator, just check what formats Flash MX can import, I don't have that version.
#886
Works for me... but I can't work out what to do.  He says you have to put it back the way it was? Well I did that and nothing... You say you have to listen? I get no sound...
#887
NOOOOOOOooooooooo!
</Darth Vader>

That's so sad.

I'm probably out too then, I'll save up for Mittens instead.
#888
Badbrain tried to get the rights to it from Lucasarts and failed, after suggesting that they would get it in public.  But apparently Lucasarts exclusive Sam & Max license ends soon, or has ended... so Steve could give anyone the franchise.  At least, that's what I think I remember hearing from people, including Ron Gilbert.
Currently though, it's dead, yes.  This bone thing looks like it could be kind of similar, I have never read the comic though.
#889
If you want something to impose limits to curtail the EU from turning into a "United States of Europe" (which is a rather paranoid thought, I think, but anyway...) then this would be the constitution to vote for.  It clearly sets out what the EU is for and its limits at the start, essentially setting the status quo down in stone.  If it comes to a vote here in the UK it'll get rejected, because it's from the EU, and people here don't have to read it to believe that it's all part of the plot to take over (even sensible people like CJ).
I'd vote yes, but it would be a waste of my time.
#890
It's not to do with age at all, or English ability, it's not even to do with if you can make interesting or useful posts; you can get on fine here without any of that. Ã, But when your posts are locked, even if you disagree that they should have been, attacking moderators will only make things worse for you. Ã, We don't lock posts because we are assholes as your PMs insinuate, we do it because thats one of the reasons this forum stays as nice and friendly as it is... how many other amateur game developing communities meet up in real life twice a year, know most of the other members on a first name basis, have never banned anyone and so on? Ã, It might not make sense to you, what were your posts doing to harm that? Ã, Basically we need to keep a certain level of maturity and post quality throughout the forums, if we didn't we'd have hundreds of (probably younger) members starting threads like "Post your fone" which don't foster any discussion and it ends up becoming a communityless general chat forum where nobody reads one anothers posts and no good games are ever made, see the Game Maker forums.
You might not get it, but you have to live with it. Ã, What I'd recommend is working on your game and getting that released, people tend to be more accomodating to people who have produced things with AGS, and to try to write topics you start as best you can, it's easy to overlook the sensible question in a thread that is written like yours have been.
#891
If you want to, use the username: anon and the password: cowudder to commit changes but we really haven't decided properly what we're going to do with the IrcBot part, basically we want to make a fixed and tidied clone of the Roger #ags bot that we have already, plus a working user authing system for messages etc.  TortoiseSVN does invade explorer a bit, it's slightly nicer than using the command line though.
#892
I forgot to say, thanks, your compiler options work, and I can compile on linux now (even though it doesn't seem to have a problem running .net binaries compiled on windows, which is nice).  I'll look into delegates and stuff, although I think we'll be fine with interfaces and inheritance, the code doesn't look ugly to me.  If you want to see what we end up doing with it (and you use subversion) the source is available from svn://217.172.186.14/roger
Nothing much has changed yet, but we have plans.
#893
Currently the flights from London are about £180, that's up from £130 when I last checked, so if possible, people should book soon.
#894
I'll be there if I possibly can be, which is probably (it's just a simple matter of getting the money).  I don't mind what the dates are but cheaper is better.
The site looks very nice indeed.
#895
No, we were going to remove the form.  CJ put it in but we'd be administering it through the console remotely anyway.  Thanks, I'll try it :)
#896
Linux (or both, would be nice), we can compile on Windows with Visual Studio, but we have a linux server to run it on.
#897
Could you tell me how to compile something on mono then? I have an ircbot framework (intended to replace the old AGS Roger bot code) which CJ developed in Visual Studio, and I can't for the life of me work out how to get it to compile on mono.Ã,  There is no documentation anywhere.Ã,  I'm almost ready to port it back to Java (I disagree with most of your criticism, actually, I think it's just a case of which one you're more familiar with, most stuff you don't like in Java makes perfect sense to me, just like Java looks prettier to me.  Not really interested in arguing over which languages are best though, they're all so similar.)
There's a VS project to makefile converter, but how I use the makefile that comes out, I have no idea.Ã,  Compiling the .cs files one by one with mcs doesn't seem to work at all.
http://www.adventuregamestudio.co.uk/ircbot.zip code here, if you feel like taking a look...
#898
It really doesn't matter, imo, they're virtually identical as far as I'm concerned, if you can code one you can code the other.  Someone will probably post with a huge list of differences, but honestly I didn't have to read a thing when starting to mess with C#, I just do a quick google now when something unfamiliar pops up.  C# seems a slightly nicer language, possibly, they're about the same as far as ease of learning goes.
#899
Guest posting was disabled a few days ago, when a guess when on a spamming spree.  Might be ok to allow it again now.
This server won't have any restrictions on you :) We own it ourselves, #ags is the only channel.
#900
So everyone knows, yesterday morning we decided to move the #ags channel away from Quakenet, which has always been a bit unstable and slow due to its size, to the smaller and more development focussed Freenode network.Ã,  Then this morning we decided to move it again because we are addicted to moving or something.Ã,  You should now connect to irc.adventuregamestudio.co.uk.Ã,  Sorry for the inconvenience.

Those of you who have never been to #ags are welcome to come by, the channel has existed for a few years now and is quite active, it's a great place to get to know other AGS people better.Ã,  Just get yourself an IRC client, such as mIRC, connect to irc.adventuregamestudio.co.uk, and "/join #ags".
SMF spam blocked by CleanTalk