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 - EnterTheStory (aka tolworthy)

#101
It's six years since I last did any real programming, so my apologies if this is something obvious. Here's my original code:

int typeUnderMouse;   
function repeatedlyCheckStatus()
{   typeUnderMouse =0;   
   if (GetLocationType(mouse.x,mouse.y) == eLocationHotspot) typeUnderMouse =1;
   if (GetLocationType(mouse.x,mouse.y) == eLocationCharacter) typeUnderMouse =2;
   if (GetLocationType(mouse.x,mouse.y) == eLocationObject) typeUnderMouse =3;
   SetGlobalInt(1,typeUnderMouse);
   if(typeUnderMouse ==1)      // line 24
   { // do stuff
   }

And here's the error message:

"There was an error compiling your script. The problem was: In: 'repeatedExecute' Error (line 24): must have an instance of the struct to access a non-static member"

Can someone remind me what "an instance of the struct to access a non-static member" actually means?

Also, is there any way to save a game before the compile bugs are fixed? When I try to save I get the "you have an error, your game was not saved" message. It was late at night so I had to just leave the computer on and hope nothing happens to lose the day's work (e.g. crazy pets / environmentally conscious "turn everything off" grandparents / normal winter power cuts in my village / etc., etc.)
#102
I'm sure I've read the answer here somewhere, but can't seem to find it...

The manual states, under "walk": "if you need to find out when the character has reached its destination, use the Moving property. See the variables section for more information."

Perhaps I'm being stupid here, but I couldn't find anything relevant in the manual, the fora, or the modules page. If I just put a loop that waits a frame and checks if ego is still moving, won't that hold up all the other scripts? Or should I make a "run always" function to work in the background? (If so, any tips?) Thanks for any pointers.
#103
I am converting a game from another engine (Sludge) to AGS. Many of my rooms use subtle light maps - room sized images that are light in some parts and dark in others, with gaussian blurs in between. Is there any way I can make use of these in AGS? The "light levels" option seems very crude in comparison. This is the first essential feature I have found that seems to be missing from AGS, but maybe I'm just not looking hard enough.

Also, the help file says "Light levels only work when the character's graphic is at the same colour depth as the background (ie. a 256-colour character in a hi-colour game won't get lightened)."

Is this still true? I have a high colour game and my sprites are all greyscale FLCs. Converting them to high color would add many megabytes to the file size and add an extra level of inconvenience. But perhaps I'm just being lazy.
#104
I don't know if this belongs in the beginner's forum (I'm a beginner) or the modules forum (it's from a module, but it's not of finished standard, and I can't see a "new thread" button) or general chat. Hopefully our friendly neighborhood mods will move it if necessary.

This is my first attempt at a module. Any ideas for improvement?

I like screens with plenty of hotspots. I like to look round and see the mouse responding to everything I see, even though really I won't want to click on everything, and if I do then I don't expect much more than ego saying "it's just an ordinary rock" or whatever. This code is designed to streamline common hotspots that only need a verbal string. Very common hotspots (like tree or house) have their strings in this code. Other hotspots have "say" or "use" responses added very quickly using custom "lookSay" and "useSay" properties. More complex hotspots of course have custom code.

// start script
Hotspot* myHotspot;
function generic_hotspots_click() {         // called from the global script mouse click
   myHotspot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
   if(mouse.Mode ==eModeLookat)
   {      character[EGO].Say(myHotspot.GetTextProperty("lookSay") ); # lookSay is a custom property
         common_hotspots_lookSay();
   }
   else if(mouse.Mode ==eModeInteract)
   {      character[EGO].Say(myHotspot.GetTextProperty("useSay") );
         common_hotspots_useSay();
   }
}
function common_hotspots_lookSay() {         // long list
   if (maySay("house","this looks like a house")) return; 
   if (maySay("tree","this looks like a tree")) return;      // etc., etc.
}
function common_hotspots_useSay() {      // like 'lookSay' but many objects never get used
   if (maySay("house","I don't think I'll disturb the people who live there.")) return;
   if (maySay("tree","I don't feel like climbing trees right now.")) return;
   
}
function maySay(String name, String response) {
   bool done =false;      // to stop looking when we find a match
   if(myHotspot.Name == name) { character[EGO].Say(response); done =true;}
   return done;
}
// end script


Question: is there an easy way to give alternate options in the same string? E.g. so I can quickly type ' character[EGO].Say("option1/option2/option3") ' ?
#105
AGS uses 16 color bitmaps for walkbehind areas, floors, hotspots, etc, but I have a large number of such files from a previous game, all in high color. Any suggestions for how to batch process them?

I normally use Irfanview for batch processing, but if colors are close together it will dither them (even though there are only 16 colors in the entire image). Many other programs CLAIM to batch convert, but I've tried almost a dozen and they all have problems on this particular task. The only one I've found that really understands palettes is Alchemy for DOS, but it costs a hundred dollars and upwards.

Any ideas?
#106
Hopefully this will be my last newbie question for a while... :) I've checked the manuals and the forums, and it appears that FLC files should run in Linux, whereas AVI raise more problems. But I am nervous to see how FLC and AVI are sometimes used in the same sentence. How reliable is FLC in Linux? Is it rock solid? Can I rely on it for complicated and essential scenes? Or is there the smallest chance that the FLC parts won't always work in some flavors of Linux? Any issues here?
#107
Can I make it so that if I click in the middle of the screen, ego walks there as normal, but if I click at the very bottom of the screen, ego walks further toward me so I only see him from the knees up?  Is that possible?

edit: I assume this would need character.z  I don't need the exact code (I can work that out later), I just need to know if it's possible in principle. Right now, before I learn the details of AGS coding, I'm adding 140 rooms from my old Sludge game. Many of those rooms rely on ego being able to move very close to the camera.
#108
When ego walks to the side, the scene scrolls (the background image is larger than the screen) but not at the 40 fps implied by SetGameSpeed. It seems to move at maybe 5 or 10 fps - is this normal? Is there a way to get the scrolling to look smoother? The sprites also move jerkily, but I'm guessing that's just because they don't have many frames per second and gliding is off.

Sorry for all these noob questions, but this is the beginner's technical board, and in my defense I did check the manual and the forums first. :)
#109
If smoothing is turned on, is it possible to flag most sprites to not be smoothed? I can't find any references to this in the manual.

On a related note, is it likely that smoothing will ever be applied to 16 bit or 8 bit games? My game has grayscale sprites in front of 16 bit backgrounds, so there's no reason why they shouldn't smooth in principle. It seems a shame to slow the game down to 32 bit color just to allow something that could be made to work in a lower color depth.
#110
Hi! I've been developing a game in SLUDGE for several years (lesmisgame.com), but recently discovered a serious memory leak. So I'm looking at AGS instead - the size of the AGS user base is very reassuring! But how is AGS for very large games? My first game only has 140 scenes, but I plan to add another 50 or more every six months after the first release. AGS looks pretty exciting, but does anyone know:

1. Is there an upper limit for rooms, and does this affect playback speed?
2. Are there any known memory leak issues?
3. Can I do anything to make my game run faster, apart from reducing the screen size?
4. I have several sprites that have over a thousand frames each. Could these be automatically imported, or would I need to add each frame manually?
5. the 150 character limit - is this per screen, or for the whole game?
6. Is it always possible to write custom functions to replace built in functions?

Thanks in advance for any advice!
#111
I asked a question on another forum, and was directed here. Clearly this is where the cool people hang out.
original message: http://forums.adventuregamers.com/showthread.php?p=139764&posted=1#post139764

I asked for advice about the Zak McKracken Movie project. AGA said "There are a couple of guys in the AGS community who make their own amateur movies. Maybe try asking there..."

Here is the original question:
Does anyone have experience making indie movies? I need advice.

I'm corresponding with a guy who wants to make a movie based on Zak McKracken. For copyright and practical reasons, I think this would only work as a super-low-budget production. But Zak was always character driven, not SFX driven, so I think this could succeed. But I have almost zero experience of independent film production. Does anyone here have any experience? I'm not asking for volunteers (though that would be nice!) just for advice.

I am encouraged by that British guy who shot a movie for 400 quid and was selected for this year's Cannes competition.

For the record, I think a successful Zak movie would be like a cross between Scorsese's Taxi Driver (strange loner with a vague purpose) and Blair Witch (super-low budget mystery excursion). For copyright purposes we could even avoid mentioning his name at all. I don't think a straight game-to-movie would work, but I do think the core story and characters are very strong if given a slightly darker edge.

What do you think?

#112
I am one year into creating a very large game in Sludge. (Three years if you include preparation) For several reasons I am now tempted to move over to the Dark Side (that is, AGS). I was told to ask my questions here. Are you sitting comfortably? Here goes:

1. I gather that the editor can list only 300 rooms, but AGS can use more than that. Is this true? My game currently has about 300 rooms, and will have about 1500 when complete. Would this be a problem?

2. I am told that there is effectively no limit to the number of strings. In one room I have the philosopher Plato, and the user can interact with his famous Dialogues. This might end up with a tree of more than a hundred choices and perhaps a thousand strings, just for that one character. Would this be a problem?

3. It appears that AVG is limited to 50 characters. Is there any way around this? My game will include 60-100 sub-games, each with at least five new characters, probably more. Is it possible to have a thousand characters, perhaps by reusing old characters with new costumes and new names?

4. I believe that there is a limit to hotspots on each room, but there are workarounds. Is this true?

5. How flexible is the scripting? Be honest. Can a determined scripter do just about anything? 

6. Is the speed of an AVG game affected by the size of the game? That is, does a thousand room game run slower than a ten room game? 

7. Is transparency processor intensive? Can I use full screen (640x480) transparency in an animation without seeing a performance hit?

8. I have heard that some things cannot be deleted completely (as a way to protect newbies from common errors). Would this be a problem in a large game where, by the end, there might be thousands of routine deletions while coding?

9. I understand that AGS compresses images. What is a typical file size? How does it compare to 16 bit compressed TGAs? (My game averages 50K per 16 bit 640x480 image, or half that when using lots of plain color.)

10. May game should be 600 meg when finished (i.e. it comfortably fits onto a CD). Would this cause any speed or memory problems?

11. Finally, one of the biggest attractions of AVG for me is the royalty free OGG sound for commercial use. This sounds too good to be true (the Sludge sound code has a ten thousand dollar charge for full scale commercial games). Are there any catches? If in ten years I make a ton of money (I can dream can't I) will I find someone saying "I own some of that code, pay me"?

Thanks for your patience.  :)
SMF spam blocked by CleanTalk