game menus and alternating sprites

Started by Dsmccurdy92, Tue 20/11/2012 20:53:33

Previous topic - Next topic

Dsmccurdy92

I have two questions not sure if you would consider them begginer questions or not if so please move this to the begginers question thread. First of all do we have any tutorials for making game menus like where you see the title of your game and you can choose new game, load, etc. Also if i was doing a game where a character needed to use a boat (lets say to go from one island to the next), how would i script the game for my sprite to disapear and take control of the boat sprite. Sorta how chrono chross used the boat and chrono trigger used the epoch

Crimson Wizard

Regarding game menu, there are many ways to do this, and I believe this was discussed few times in this forums.

To put this simply, main menu may be made either of GUI, or also of anything you are making rooms. In this aspect they are not different from other room with objects and hotspots.
In most simple case you may draw a title and options on room background, set up hotspots over options and make them react on "any click".
Other way is to place a transparent GUI over some background, and put buttons on that GUI.
But more exotic solutions are also viable. For example, you can make a room with decorations and animated objects, like signs, doors, even characters, which represent options. Create them as you usually do, in any other rooms, it does not make much difference for the game engine.

If you are interested rather in certain details, please, specify your question.


Regarding boat question. I have this suggestion: make boat as a Character too. When player takes control of a boat, you hide his initial character and give player control over Boat Character.
Hide character by one of those:
1. Make him 100% transparent.
Code: ags

cEgo.Transparency = 100;

2. Assign him a view, which consist of one 1x1 pixel transparent frame.
3. Move him out of the room borders (like X = -1000)
4. Move him to different room; but do this only after you make player control the boat, or player will be transited to another room too!
Setting control over Boat Character is done simply like:
Code: ags

cBoat.SetAsPlayer();

When player lands on another shore, put everything back: make normal character visible and set control over him.

MurrayL

Quote from: Crimson Wizard on Tue 20/11/2012 21:40:40
Regarding boat question. I have this suggestion: make boat as a Character too. When player takes control of a boat, you hide his initial character and give player control over Boat Character.
Hide character by one of those:
...

I find the best/cleanest way is definitely to do:
Code: AGS

cBoat.SetAsPlayer();
cEgo.ChangeRoom(0);

Dsmccurdy92

These suggestions sound great thank you guys. When i switch from the character to the boat is there a script for switching the walkable area so i dont have the boat moving on islands and the character walking on water when i switch back. I know how to create the walkable areas but can i specificly assign it to sprites like when the character gets in the boat the walkable area becomes the water and vice versa. Also with the menu i would just assign the hotspots to run scripts like start new game or load game right? Sorry still noobish and only have mobile internet on an older phone so looking things up is a little rough.

Crimson Wizard

#4
General yes for both of your questions.

You probably should read more from the manual, because switching walkable areas is a very basic AGS functionality. More you know, more cool stuff you may put to your game (and more effecient way).
This is the related article (but you have the same in the manual that comes with AGS): http://www.adventuregamestudio.co.uk/wiki/?title=Room_functions#RemoveWalkableArea

The New game option from your menu may simply transfer your playeable character to the first playable room, hence starting actual the game.
For load game, check this: http://www.adventuregamestudio.co.uk/wiki/?title=Game_/_Global_functions#RestoreGameDialog
That's the default (and simpliest) way to load a game, but later you may create something more advanced, if you like.

Dsmccurdy92

thank you very much for your help ill look both of these up. At least i know who to bug when i have questions

SMF spam blocked by CleanTalk