Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ghostlady on Sun 27/02/2005 19:30:17

Title: Creating Puzzles
Post by: Ghostlady on Sun 27/02/2005 19:30:17
Hello,

I am creating my first adventure game.Ã,  So far all the puzzles are inventory based.Ã,  Can I create other kinds of puzzles, for example, sliders or memory games, and how would I do that?

Another question I have is on ending the game.Ã,  Is this something that is done based on an inventory item?Ã,  I understand the point system but I really didn't want to go that way.

Any input would be appreciated.

Title: Re: Creating Puzzles
Post by: Goot on Sun 27/02/2005 21:32:00
You can pretty much make any kind of puzzle with AGS, but it could take a bunch of scripting to do some stuff. You probably want to start out simple and get more complex as you learn more scripting.
You can end the game however way you want. You porbably want to make a winning screen (room) and have the player go to it when they finish the game, however that happens. If you want them to win when they get a certain inventory item, put this script in the repeatedly execute function, in the global script.

if(character[GetPlayerCharacter()].inv
Title: Re: Creating Puzzles
Post by: Ghostlady on Sun 27/02/2005 22:21:33
Are there any examples I can look at?  I have been a programmer for 20 years, but on a mainframe (if anyone knows what that is anymore) so the logic is not a problem.  I am not familiar with the syntax of this kind of code.
Title: Re: Creating Puzzles
Post by: Goot on Sun 27/02/2005 22:56:50
I'm not sure of any specific examples. You pretty much make them in the same way you would make anything else, with hotspots and objects with interactions. What specific type of puzzle where you thinking of making?
Title: Re: Creating Puzzles
Post by: Ghostlady on Sun 27/02/2005 23:44:13
How about a memory/concentration puzzle as an example.
Title: Re: Creating Puzzles
Post by: RickJ on Mon 28/02/2005 08:36:05
Hmmm,

Probably the easiest thing to do is to use NPC characters for the puzzle elements.  Each character could use the same view.  Each frame in the view would contain a different pick.  Maybe frame 0 would contain the blank pic.

You would use SetCharacterFrame(CHARID, int view, int loop, int frame) to change the when the character recieved a click.  I would use a struct array to determine which pic is revealed.   I would have an initilization routine randomly populate the array with loop and frame ids so that only two characters would have the same pic.   When two pics are revealed you would only have to compare the loop and frame values of each character, if they match the pic matches. 

You could also do something similar using room objects or using hotspots and raw-draw commands.  I think using characters is a bit easier to do though.  Good luck.

P.S. Hehe, I programmed PDP8 commputers using the paddle switch and neon lamp interface, if anyone knows what that is....

Title: Re: Creating Puzzles
Post by: Ghostlady on Tue 01/03/2005 02:50:22
I am starting to piece this whole picture together.  Thanks for the help.

P.S. I can honestly say I've never heard of PDP8 computers....LOL.  When I first got into programming they were just getting rid of data entry cards.
Title: Re: Creating Puzzles
Post by: RickJ on Tue 01/03/2005 17:34:42
PDP-8 was a mini computer from Digital Equipment Company.  It was the predecessor of PDP-11 and VAX.   

If you have any more questions or if you need help with any of the above suggestions just let us know.