Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - ZakMcKracken

Pages: [1]
1
Whoa, the graphics remind me so much of CMI.  Good job.
Hello Cluey,
we were inspired from Monkey Island saga, of course. Thank you for your comment!

Regards

2
Hello,

I'm here with my friend Vale.

Looks awesome. Are you distributing this to any environment protection organizations? And how long a game are you going for? The progress percentages promise quite a lot.
Thank you very much, ildu. Our intention is to distribute our game through environmental organization. If you want to watch, please visite our site (http://www.woaky.com), "Distribution" section.
The game is quite long, it has about 30 rooms and many puzzles, of different difficult to solve, and there are some nice cutscenes.

Please wait until we are able to release a playable demo (april - may 2006).

Regards

3
Here we are...

site of Woaky project open!

Please take a look on the story of this adventure in progress:
http://www.woaky.com

comments and suggestion are always welcome of course (even correction of english errors)!

Thank you
Woaky project staff

4
Vale,

when you programmed in C/C++, you never put brackets after a return :-)
It's a common rule!
You ashamed!  ;D

(me and Vale are friends, this is not a flame)

Thank you AGS crew!

5
Hello SSH,

thank you very much for your help. I downloaded source code of your game, you are great!
First of all, because you produced 2 distinct modules, and second... it works perfectly!

Thank you everybody.

Regards.

6
Thank you very much, Gilbot.

I defined a DynamicSprite* variable outside my functions, and used CreateFromScreenShot and CreateFromSaveGame to set and load screenshots.

Then I set that variable to null, so the allocated memory can be freed.

Now it works.

Well, I just test it and as soon as possible I'll make a tutorial, to create a Save/Load GUI with screenshots using AGS 2.7

Regards

7
Hello,

wow, Gilbot, what a speedy!! :D  I just came in to add further information to my case.

When I compile the original code with AGS 2.7, the game crashes when attempting to execute the following line:
Code: Adventure Game Studio
  1. if (sgs_struct[i].spr != SGS_EMPTY_SPRITE) DeleteSprite(sgs_struct[i].spr); //SGS_EMPTY_SPRITE is defined as 139, which is a sprite in the library with a picture saying "Empty slot"
  2.  
with the message "Attempted to free a static sprite that was not loaded by the script".
Same code, in AGS 2.62, works fine.


In conclusion, the differences betweeen 2.62 and 2.7 (executing the same code):

Code: Adventure Game Studio
  1. SaveGameSlot(100, "temp"); // Save current game in temp slot
  2. sgs_struct[0].spr=LoadSaveSlotScreenshot(100, SGS_WIDTH, SGS_HEIGHT); // load up screenshot
  3. DeleteSaveSlot(100); // Delete temporary slot
  4. ...
  5. SetButtonPic(SAVELOAD, button, 1, sgs_struct[0].spr); // change selected button to have current game screenshot
  6. ...
  7. int i=0;
  8. while(i<=6)
  9.   {
  10.   if (sgs_struct[i].spr != SGS_EMPTY_SPRITE) DeleteSprite(sgs_struct[i].spr);
  11.   i=i+1;
  12.   }
  13.  

...with AGS 2.62 everything is allright:
  • Loads a sprite number into sgs_struct[0].spr
  • Sets the image when I first click on the button
  • Deletes the sprite from sgs_struct[0].spr


...with AGS 2.7 something is wrong:
  • sgs_struct[0].spr is 0
  • There is no image in the button
  • When attempting to delete sgs_struct[0].spr (which value is 0), it crashes with the error "Attempted to free a static sprite that was not loaded by the script".


Hope this could be useful.

Thank you everybody!
Regards

8
Hello everybody,

Now I have understand, but there is just one more thing that puzzles me.

In AGS 2.62, the following lines...
Code: Adventure Game Studio
  1. SaveGameSlot(100, "temp"); // Save current game in temp slot
  2. sgs_struct[0].spr=LoadSaveSlotScreenshot(100, SGS_WIDTH, SGS_HEIGHT); // load up screenshot
  3. DeleteSaveSlot(100); // Delete temporary slot
  4.  
...work fine: in sgs_struct[0].spr there is a value.
In fact, the subsequent instruction:
Code: Adventure Game Studio
  1. SetButtonPic(SAVELOAD, button, 1, sgs_struct[0].spr); // change selected button to have current game screenshot
  2.  
works fine as well: in my button, I see the picture.

Same code, compiled with AGS 2.7: when I click on the button, it shows me anything, and the game crashes. It seems it can't load the sprite from the temporary saved game slot.
The option "Save screenshot in save game" is checked.

Well, I changed the above lines as follow:
Code: Adventure Game Studio
  1. SaveGameSlot(100, "temp"); // Save current game in temp slot
  2. DynamicSprite* spr = DynamicSprite.CreateFromSaveGame(100, SGS_WIDTH, SGS_HEIGHT);
  3. sgs_struct[0].spr=spr.Graphic;
  4. spr.Delete();
  5. DeleteSaveSlot(100); // Delete temporary slot
  6.  
...and when the code is executed in the game, it crashes with the error: "null pointer referenced", and the line number indicates the assignment: "sgs_struct[0].spr=spr.Graphic;".

I checked again the option "Save screenshot in save game"... and it's turned on.

I could suppose there is a bug in SaveGameSlot function, but I don't think so: if I run the game with the original lines of code (that is using LoadSaveSlotScreenshot), the game crashes the first time I try to save, but if I run the game again, and try to save, I see a picture in a slot. So, I assume that a sprite as been saved with the slot.

I don't know... it seems like the slot 100 is unpleasant to AGS :-)
Can someone try to see if SaveGameSlot(100, "temp") saves the screenshot correctly?

Thank you

9
Hello Monkey,

no, no, I am trying to translate into the new object-oriented style. So, every clue is welcome  :)

I use the old style just to better understand the concepts and logic, but my final goal is to make a game enterely object-based.

Regards

10
Hello Pumaman,

you are right, mistery solved. It was the "Enforce object-based scripting" option!

Thank you.

11
Hello monkey,

thank you for your support.
Unfortunately, the compiler says "ID is not a member of spr". I tryed to write it in lowercase, too.

Anyway, I attempted a workaround.
I loaded AGS 2.62 in a separate directory, and created the Save/Load GUI according to the tutorial.
Everything works fine  :=
So, I saved everything, then I loaded AGS 2.7, and loaded my game with the new GUI.

The room conversion has been applied, as usual, and when I look into the Global Script to see if something has changed, I surprisingly notice that everything was untouched!  :o
There are "LoadSaveSlotScreenshot" function calls, and... they works! The compiler compiles the game, and when I test it, it works. The screenshots appear.

I can't figure out why, yesterday, the compiler told me "undefined symbol LoadSaveSlotScreenshot'"...

Well, to be honest, there is a little thing that doesn't work: the very first time I save a game, it crashes indicating that I attempted to delete a sprite that was not allocated.
But the game saves correctly in its slot.
Then, every time I run the game, and save, everything is right.

Maybe it could be useful to change all obsolete functions into the new logic; if I succeed in, I'll post the changes.

Regards

12
Hello,

I'm creating a new Save/Load GUI with screenshots.
Since I haven't created one before, I looked for a good tutorial, and found this one:
http://www.twin-design.com/agsezine/9/tutorial.cfm
(this is Scripting Tutorial By Andrew McCormack)

It says the tutorial will present how to make a load/save game dialog that uses the new "save games with screenshots" feature of AGS v2.6 onward.

Well... I'm using AGS 2.7, I did the tutorial step-by-step, but when I save the game, the compiler stops with message "undefined symbol LoadSaveSlotScreenshot'":
Code: Adventure Game Studio
  1. function sgs_getslots()
  2. {
  3. int i=1;
  4. while(i<=6)
  5.         {
  6.         if (GetSaveSlotDescription(i, sgs_struct[i].t))
  7.                 {
  8.                 sgs_struct[i].spr=LoadSaveSlotScreenshot(i, SGS_WIDTH, SGS_HEIGHT);
  9.                 }
  10.         else
  11.                 {
  12.                 StrCopy(sgs_struct[i].t, "");
  13.                 sgs_struct[i].spr=SGS_EMPTY_SPRITE;
  14.                 }
  15.         SetLabelText(SAVELOAD, 6+i, sgs_struct[i].t);
  16.         SetLabelColor(SAVELOAD, 6+i, SGS_LABEL_COLOUR);
  17.         SetButtonPic(SAVELOAD, i, 1, sgs_struct[i].spr);
  18.         i=i+1;
  19.         }
  20. Wait(1);
  21. SaveGameSlot(100, "temp");
  22. sgs_struct[0].spr=LoadSaveSlotScreenshot(100, SGS_WIDTH, SGS_HEIGHT);
  23. DeleteSaveSlot(100);
  24. }
  25.  

Well, the help file says that LoadSaveSlotScreenshot is obsolete, and suggests to use DynamicSprite.CreateFromSaveGame

I tried, but with no success. I changed the int to DynamicSprite*, but it doesn't compile.

Can someone clarify the concepts?
I think the tutorial is very very good, maybe it could be more useful fix the tutorial to make it compatible with AGS 2.7

Thank you.

Pages: [1]