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

#6121
Critics' Lounge / Re: need critic on character
Fri 30/07/2004 08:47:27
Please don't repost other's pics (or include them in quotes) if there's nothing to do with it, or you're not asked for it, it will just clutter up threads, thank you.

Anyway the character's great, will there be a walkable character sprite apart from this closeup? :D
#6122
Did you declare the variable musicvolume first?

Put int musicvolume; on top of the script.
#6123
Heh yea, my fault for not testing the codes first. ;)
#6124
Competitions & Activities / Re: The ASCII game
Thu 29/07/2004 11:23:26
 _Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  _
/ \Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  / \
| |Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  | |
| |Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  | |_____
| |~~~=~~~----~~~==~~~==~~~------| |___Ã,  \
| | -Ã,  Ã,  Ã,  Ã,  Ã,  ~Ã,  Ã,  -Ã,  Ã, =Ã,  Ã,  Ã,  . | |Ã,  Ã, \Ã,  \
| |.Ã,  Ã,  Ã,  Ã,  ~Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, ~~Ã,  Ã,  Ã, | |Ã,  Ã, |Ã,  |
| |Ã,  Ã,  Ã,  -Ã,  Ã,  Ã,  Ã, ~Ã,  Ã,  -Ã,  Ã,  Ã,  Ã,  Ã,  | |Ã,  Ã, |Ã,  |
| |Ã,  Ã,  Ã, .Ã,  Ã,  Ã,  Ã,  Ã,  =Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, | |Ã,  Ã, |Ã,  |
| |Ã,  Ã,  Ã,  Ã,  Ã,  Ã, ~Ã,  Ã,  Ã,  Ã, ~Ã,  Ã,  Ã,  .Ã,  Ã, | |___/Ã,  /
| |Ã,  Ã, .Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  -Ã,  Ã,  Ã,  Ã,  Ã,  Ã,   | |_____/
| \______________________________/ |
|Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  |
\__________________________________/


Is it large enough?

Next: Bow and arrows.
#6125
Critics' Lounge / Re: Anti-aliasing problem
Thu 29/07/2004 10:51:47
Read Eric's tutorial also. :D
#6126
Critics' Lounge / Re: Background
Thu 29/07/2004 10:37:51
Quick paint over to show how some of the original was off perspective:

#6127
Critics' Lounge / Re: Background
Thu 29/07/2004 09:50:35
Not bad I'll say, but the perspective of the doorway is obviously off, since you mentioned you may draw it on the other way, try to bear that in mind.

And making only the corners darker (while all other places are flat with same colours) is a bit strange, but as your pic is still WIP (ie you may add some more shadings), I'll pass on that one.
#6128
Strange, works for me.
#6129
Quote from: Kinoko on Thu 29/07/2004 07:41:57
A new problem is that the game is keeping track of time constantly and now I can't move my character (keyboard controlled movement based around code contained in repeatedly_execute as well).
Why not? you can always do more than one thing in a function, eg.

function repeatedly_execute() {
  //stuff1 bla bla bla
  //stuff2 blah bla
}

Quote
Should I put the time code into repeatedly_execute_always or something?
It wouldn't make "much" difference according to how that code was scripted, except that putting it in "always" may make it a bit more accurate (for example, if the timer expires when a blocking script is being executed, second wouldn't advance until the script was finished if you didn't put it in "always").
#6130
General Discussion / Re: I, Robot
Thu 29/07/2004 07:33:47
Quote from: [lgm] on Thu 29/07/2004 06:22:49
"Arguing over the internet is like running in the Special Olympics. Even if you win, you're still retarded."

* Gilbot V7000a is proud that HK won many gold medals in the Special Olympics recently, whereas it won only one from the "Normal" Olympics in history.

But then, "Arguing over the internet about a crappy movie called I, Robot leads to nowhere. No matter who wins, that movie is crap."
#6131
I think the GlobalInt(4) is a bit suspicious, if that part of code you posted was in repeatedly execute and that GlobalInt(4) was indeeed set to 1, the timer will be restarted EVERY gameloop. So, to prevent this, try:

if (GetGlobalInt(4)==1) {
  SetTimer(1, 2400);
  SetGlobalInt(4,0);
  }

Also, try changing all those 2400 to 40. Under normal cases, 40 gameloops make 1 second (unless you changed it), so 2400 gameloops would be 60 seconds already (unless you really need to wait that long for second to advance by 1).
#6132
Screen blur? Hopefully it's not a virus.
Try updating DirectX and/or your graphic card driver and see if that helps.
#6133
Well it's very dependent on your computer I think, as I ALWAYS set both to NONE when I test a game at home, yet it still hung sometimes.
#6134
Quote from: Radiant on Wed 28/07/2004 15:18:44
a function like ObjectOn() can be used as a rvalue; it is unclear what, if anything, it returns
For simplicity's sake, I think ALL functions return int values (so there're no such useless evil things as void functions and you can't return other things), if a function was not supposed to return a value, the returned value can be just something meaningless, just ignore it.

Quote
the operators |=, &= etc don't work
I think they're never supposed to, are they really that useful?

Quote
If I select 'dont use inventory gfx as mouse cursors', instead the mouse cursor becomes the Blue Cup (tm) - even if none of my mouse cursors in the cursor menu have that graphic
Did cursor #4 (Use inv) exist in the list?

Quote
It seems to me that if you use a sequence like this:
Ã,  while (a < b) {
Ã,  Ã,  SetObjectPosition (2, 100, a);
Ã,  Ã,  Wait (2);
Ã,  Ã,  a++
Ã,  }
then the object will move halfway of what I specify, and then snap to its destination at once. Why?
Actually the same happens with moveobject().
I tried similar thing and it worked for me, did it gave the same problem changing the parameters?
Edit: you missed a ; after a++ but I think it's just a typo here, as it shouldn't compile anyway.

Quote
Using the following code...
Ã,  PlayMusic (1);
Ã,  StartCutscene (1);
Ã,  ...
Ã,  while (IsMusicPlaying ()) Wait (1);
Ã,  EndCutscene ();
If I press ESC to terminate the cutscene, the music is still playing.
When you skip a cutscene, actually the engine runs it as fast as possible (and making any Wait() functions to "wait" at no time), that makes the while loop looped MANY times and yet the music wasn't stopped yet (sorta equivalent to while(IsMusicPlaying()){}), which is like an infinite loop, to avoid this (hung up and more possibly overflows) the engine will stop a while loop automatically if it's looped for some LARGE number of times (how large I had forgotten), but of course when the loop was broken out the music was not ended yet, so the result. As a workaround you may add a StopMusic(); before the EndCutscene(); . (Though it's not a really good fix though, as it's dirty to let that break out from while loop happens, I think it'll even generate a warning in the log file).

Quote
This code gives an error message (incorrectly terminated char const?)
Ã,  int i, try;
Ã,  try = 'X';
(and try = 'Z' would work!)
Strange, didn't fail for me.
#6135
Quote from: Sinitrena on Mon 19/07/2004 21:09:15
QuoteQuote
- I checked the manuel, but I couldn't find something like "SetButtonFont" Did I just miss it?

This hasn't been requested before, so it hasn't been added. Would you find it useful?
Yes, I would find it useful. :) :) :)
And, thanks for the other information.

Actually SetButtonColour() can be quite useful too.
#6136
Advanced Technical Forum / Re: Walk on walls
Thu 29/07/2004 02:24:05
It's scaling not scrolling.
#6137
By errors in placement of braces I didn't just mean missing a brace or two, it can also be an structural error (like say:
if (a==1){
  //blah bla
  if (a==2) {
    //bla bla
  }
}

That teh (a==2) part will never be executed.)
Also, if you delete something the GUI buttons or GUI number may be rearranged, so you may need to fix the codes.

Anyway, glad to hear your problem was fixed.
#6138
Actually checking the return value of GetSaveGameDescription() is the safest way, as it's official and is documented. Those "invalid..." descriptions weren't documented, and can change at any point of updates, furthermore, checking the content of a string is considered more troublesome than just checking an integer return value.
#6139
(Continued)
To retrieve the info back from a save game slot it's a bit tricky (as String functions for AGS are not quite complete at the moment).
Basically what you need is to:
Step 1: Get the description text into a temp string
Step 2: Get its first 16 characters as text
Step 3: Convert the next 6 characters into interger time
Step 4: Convert the next 4 characters into interger saves

Idea for codes:
int ii;
string tmpstr, tmpstr2;
if (GetSaveSlotDescription (slot, tmpstr)) {// if save game available, completes Step 1
Ã,  StrCopy(text, tmpstr);
Ã,  StrSetChar(text, 16, 0); //Truncates to 16 characters, completes Step 2
Ã,  ii=16;
Ã,  StrCopy(tmpstr2,"");
Ã,  while (ii<=21) { //extract character #16 to #21 into tmpstr2
Ã,  Ã,  StrFormat(tmpstr2,"%s%c",tmpstr2,StrGetCharAt(tmpstr,ii));
Ã,  Ã,  ii++;
Ã,  }
Ã,  time=StringToInt (tmpstr2); //Completes Step 3
Ã,  StrCopy(tmpstr2,"");
Ã,  while (ii<=25) { //extract character #22 to #25 into tmpstr2
Ã,  Ã,  StrFormat(tmpstr2,"%s%c",tmpstr2,StrGetCharAt(tmpstr,ii));
Ã,  Ã,  ii++;
Ã,  }
Ã,  saves=StringToInt (tmpstr2); //Completes Step 4
} else { //Save slot does not exists
Ã,  StrCopy(text, "EMPTY");
Ã,  time=0;
Ã,  saves=0;
}


This is just an idea, and the codes weren't tested, also, you may need to modify them to suit your own needs.


#6140
Well my codes already handles the part whether the save game is available, as for the if (GetSaveSlotDescription (1, saveslota))... condition.

Copied from manual:

GetSaveSlotDescription (int slot, string buffer)

Gets the text description of save game slot SLOT into the provided BUFFER. If the slot number provided does not exist this function returns 0, if successful it returns 1.

Quote from: Kinoko on Wed 28/07/2004 10:52:42
So, I guess my new concern is whether I can see if a saved file exists, and if it's possible to read certain variables from them. If it's possible, I'd like to have a couple of variables like time elapsed and level (save game specific stuff, anyway) displayed at the start of the game.

EDIT: Actually, I was thinking, if that sort of thing is too difficult...

Would it be possible to, at the time of saving a game, write the variables I want displayed to a seperate file that's pulled up every time this save game dialogue is pulled up? I'm sorry if the answer to this is obvious from the manual, but all the File functions are very new to me.

It's actually very possible, apart from using separate files to save the info (which is not that hard, but you have to be familiar with the file functions), you can actually do this by putting all the info. you need into the save game description text and retrieve them and analyze them using the Str... functions later.

For example, if you want to save and retrieve the following 3 data fields to and from savegame:
- Text (say all of them are of EXACTLY 16 characters)
- Time (say, in seconds, maxed to 999999)
- Number of savings (say, maxed to 9999 times)

You may design the description to be of this format:
16 characters of text, 6 characters to store time, 4 characters to store number of savings -- that adds up to 26 characters in length. So, for example the following string:
"FOUNTAIN        0012040005"
contains the text "FOUNTAIN        " (note that it's exactly 16 characters), Time=1204 seconds, Savings=5 times.

To do that is not that difficult, provided text is a string holding a text of EXACTLY 16 characters, time holds the time in second, saves holds the number of times you saved. The following line of code will format a string to the desired format as mentioned above:
StrFormat(tmpstr,"%s%06d%04d",text,time,saves);
Which you can use as save game description in your save games:
SaveGameSlot (slot, tmpstr);

(since it's getting long, I'll start a new post for the retrieving part)




SMF spam blocked by CleanTalk