Hero6 http://hero6.org/forum/ |
|
Options Menu {IMPLEMENTED} http://hero6.org/forum/viewtopic.php?f=17&t=7 |
Page 1 of 2 |
Author: | ChamberOfFear [ Tue, 28 Jan 2014 18:31 ] | ||
Post subject: | Options Menu {IMPLEMENTED} | ||
So I have implemented an options menu, but it is marked as work in progress until I'm sure of some details. Options should be accessed from two places in the game the way it is designed now, the title screen and in game. However some of the actions available doesn't make much sense to access from the Title Screen, load and quit game you could already do without the options menu, and why would anyone want to save at the title screen? The code of Hero6 is already packed full of bools and tons of if-statements, clogging up the code heavily and making it difficult to read, far from impossible, but also far from optimal. To avoid more of this I've decided on making a new GUI interface, gTitleOptions, which is pretty much a duplicate of gOptions - four buttons, and I'm pretty satisfied with how neat the code turned out. However, I did decide on using a simple bool render for accessing the Options in game because as far as I could tell from the code surrounding it, it was the simplest option. The options are right now accessible through the character sheet through a placeholder button(missing graphics). The question is, should I make up a new GUI? Separating the character creator sheet and the in game character sheet. This is some more work than than the four buttons on the options screen to say the least, BUT, it would not only allow for simple code to implement, this also allows me to remove a bundle of space hogging code that is already there. Also it would be great if someone knew if the options buttons existed somewhere. I saw it in the MAD-demo so it might still exists somewhere, unless it already is in the AGS-build an I'm blind.
|
Author: | ChamberOfFear [ Thu, 30 Jan 2014 16:34 ] | ||||
Post subject: | Re: Options Menu {WORK IN PROGRESS} | ||||
I was pretty much able to answer my own question when I got an light bulb idea. Analyzing how the original MAD engine source code and referencing to the documents on the web site, I was able to figure out how to decompress and unpack all the code, music, sound and graphics existing in the MAD demo. This show me that the in game character screen is fully drawn with buttons and text, so it seems to me that the simplest thing would be to make a new GUI. Answering my dilemma from previous post, I'll get to work on this and post the result when I'm done. I'll post the resources I retrieved from the MAD demo if anyone is interested. I've included two full screen character dialogue portraits, they look pretty neat.
|
Author: | robertkety [ Thu, 30 Jan 2014 23:57 ] |
Post subject: | Re: Options Menu {WORK IN PROGRESS} |
I would definitely appreciate a link to the resources so I can host them. Thanks Chamber! |
Author: | deltamatrix [ Sat, 01 Feb 2014 12:51 ] |
Post subject: | Re: Options Menu {WORK IN PROGRESS} |
We dropped support for the full screen talking animations as AGS don't support them very well. It basically expects a full 320x240 size animation where only the mouth moves. The MAD engine supported the full screen stuff better but it was also tedious to write and maintain and we also decided that the smaller talkie boxes just looked better. I would be against any attempt to return to the fullscreen talking for the sake of time and effort. |
Author: | ChamberOfFear [ Sat, 01 Feb 2014 16:56 ] |
Post subject: | Re: Options Menu {WORK IN PROGRESS} |
So I'm done I think, I'll mark the thread as yet to be implemented untill I recieve some feedback if my changes has been successfully implemented. https://dl.dropboxusercontent.com/u/402 ... ources.zip Import the CharacterScreen sprite attached Delete gOptions and import the new gOptions.guf attached Import gTitleOptions.guf and gCharSheetIngam.guf that is attached Remove gOptions_OnClick in GlobalScript.asc Replace the following functions in GlobalScript.asc Code: function sliderVolume_Change(GUIControl *control) { System.Volume = sliderVolume.Value; } Add the following functions in GlobalScript.asc Code: function sliderVolume2_OnChange(GUIControl *control) { System.Volume = sliderVolume2.Value; } function btnGameSpeedSlider2_OnChange(GUIControl *control) { SetGameSpeed(btnGameSpeedSlider2.Value); } function btnOptions_OnClick(GUIControl *control, MouseButton button) { gOptions.Visible = true; } function btnOptions_OnClick(GUIControl *control, MouseButton button) { gCharsheetIngam.Visible = false; gOptions.Visible = true; } function btnInventory_OnClick(GUIControl *control, MouseButton button) { gCharsheetIngam.Visible = false; gInventory.Visible = true; } function btnResumeGame_OnClick(GUIControl *control, MouseButton button) { gCharsheetIngam.Visible = false; } function btnViewCharSheet_Click(GUIControl *control, MouseButton button) { gSubbar.Visible = false; gIconbar.Visible = true; gCharsheetIngam.Visible = true; Update_stats(); } Add the following lines in the following functions in room101.asc Code: function hotspot1_a() { imgClassInGame.NormalGraphic = 1570; imgClass.NormalGraphic = 1570; } function hotspot2_a() { imgClassInGame.NormalGraphic = 1571; imgClass.NormalGraphic = 1571; } function hotspot3_a() { imgClassInGame.NormalGraphic = 1572; imgClass.NormalGraphic = 1572; } Replace the following function in room101.asc Code: function room_Leave() { gTopbar.Visible = true; } Add the following functions IN THE TOP of Statistics.asc Code: function updateCharacterCreateScreen() { lblStr.Text = String.Format("%d", heroinfo.str); lblInt.Text = String.Format("%d", heroinfo.Int); lblAgi.Text = String.Format("%d", heroinfo.agi); lblVit.Text = String.Format("%d", heroinfo.vit); lblLuck.Text = String.Format("%d", heroinfo.luck); lblMagic.Text = String.Format("%d", heroinfo.magic); lblWeaponUse.Text = String.Format("%d", heroinfo.weaponuse); lblParry.Text = String.Format("%d", heroinfo.parry); lblDodge.Text = String.Format("%d", heroinfo.dodge); lblThrow.Text = String.Format("%d", heroinfo.throw); lblClimb.Text = String.Format("%d", heroinfo.climb); lblStealth.Text = String.Format("%d", heroinfo.stealth); lblLock.Text = String.Format("%d", heroinfo.lockpick); lblAllocate.Text = String.Format("%d", allocate); lblCharHealth.Text = String.Format("Health:%d/%d", heroinfo.hp, heroinfo.mhp); lblCharStamina.Text = String.Format("Stamina:%d/%d", heroinfo.sp, heroinfo.msp); lblCharMagic.Text = String.Format("Magic:%d/%d", heroinfo.mp, heroinfo.mmp); } function updateInGameCharacterScreen() { lblStrength.Text = String.Format("%d", heroinfo.str); lblIntelligence.Text = String.Format("%d", heroinfo.Int); lblAgility.Text = String.Format("%d", heroinfo.agi); lblVitality.Text = String.Format("%d", heroinfo.vit); lblLuckInGame.Text = String.Format("%d", heroinfo.luck); lblMagicInGame.Text = String.Format("%d", heroinfo.magic); lblWeaponUseInGame.Text = String.Format("%d", heroinfo.weaponuse); lblParryInGame.Text = String.Format("%d", heroinfo.parry); lblDodgeInGame.Text = String.Format("%d", heroinfo.dodge); lblThrowing.Text = String.Format("%d", heroinfo.throw); lblClimbing.Text = String.Format("%d", heroinfo.climb); lblStealthInGame.Text = String.Format("%d", heroinfo.stealth); lblLockPicking.Text = String.Format("%d", heroinfo.lockpick); lblCharInGameHealth.Text = String.Format("Health:%d/%d", heroinfo.hp, heroinfo.mhp); lblStamina.Text = String.Format("Stamina:%d/%d", heroinfo.sp, heroinfo.msp); lblMagicPool.Text = String.Format("Magic:%d/%d", heroinfo.mp, heroinfo.mmp); } Replace the following functions in Statistics.asc Code: function Update_stats() {
if(cEgo.Room == 101) { updateCharacterCreateScreen(); } else { updateInGameCharacterScreen(); } } |
Author: | robertkety [ Sat, 08 Feb 2014 18:38 ] |
Post subject: | Re: Options Menu {YET TO BE IMPLEMENTED} |
I took a look at your code. Good work, but the current AGS version already supports this. It's available here: http://www.hero6.org/?page_id=32 The character sheet is accessible much like the QfG system, as is the inventory. However, the options menu is only accessible through the use of the Escape Key during game play. During testing I continue to look for a Sierra-like icon along the top menu for options, but the Escape Key option is the only way. |
Author: | robertkety [ Sat, 08 Feb 2014 20:46 ] |
Post subject: | Re: Options Menu {YET TO BE IMPLEMENTED} |
The volume slider change was great too. I implemented that change in the update I've uploaded just now. It was a good excuse to make some much-needed touch-ups to a few GUIs. Thanks again! |
Author: | ChamberOfFear [ Sun, 09 Feb 2014 07:55 ] |
Post subject: | Re: Options Menu {YET TO BE IMPLEMENTED} |
robertkety wrote: I took a look at your code. Good work, but the current AGS version already supports this. It's available here: http://www.hero6.org/?page_id=32 The character sheet is accessible much like the QfG system, as is the inventory. However, the options menu is only accessible through the use of the Escape Key during game play. During testing I continue to look for a Sierra-like icon along the top menu for options, but the Escape Key option is the only way. Allready supports what? Can you be more specific? If you're referring to the extra implement of character sheet that I did, it wasn't because I found it missing, but because I found an old picture in the MAD demo which gave me an convenient Options button. The changes I did should have made Options availabe on the Title screen, and in-game via the Character Sheet, which they are not in the current AGS version, so your statement confuse me. |
Author: | robertkety [ Sun, 09 Feb 2014 12:17 ] |
Post subject: | Re: Options Menu {YET TO BE IMPLEMENTED} |
Sorry for being vague, I was also confused. I've never seen the MAD demo. The buttons your code implements are a duplication of existing features. The Options menu is available via the Escape Key (it's not the best implementation, but it's there). The Inventory will be available from the icon bar along the top of the screen, much like the Sierra interface. Your implementation looks great and mirrors the image you posted from the MAD demo, but duplicating features in a user interface can be confusing. I think the natural location for these features should be in the same place as the Sierra interface. We have something close to that now, I'm not sure if straying from that style of interface is the best way to go. As for the Options button on the Title Screen, the artwork was already there with no functionality. I don't think that the Title Screen version of that button should load the gOptions GUI, as that contains features like Save and Restart which shouldn't be available from that screen. The Sierra interface used the same options menu for the title screen and in-game, but the title screen version made the Save and Restart selections unavailable. Maybe we could do something like that. What do you think? |
Author: | ChamberOfFear [ Mon, 10 Feb 2014 00:39 ] |
Post subject: | Re: Options Menu {YET TO BE IMPLEMENTED} |
robertkety wrote: Sorry for being vague, I was also confused. I've never seen the MAD demo. The buttons your code implements are a duplication of existing features. The Options menu is available via the Escape Key (it's not the best implementation, but it's there). The Inventory will be available from the icon bar along the top of the screen, much like the Sierra interface. Your implementation looks great and mirrors the image you posted from the MAD demo, but duplicating features in a user interface can be confusing. I think the natural location for these features should be in the same place as the Sierra interface. We have something close to that now, I'm not sure if straying from that style of interface is the best way to go. As for the Options button on the Title Screen, the artwork was already there with no functionality. I don't think that the Title Screen version of that button should load the gOptions GUI, as that contains features like Save and Restart which shouldn't be available from that screen. The Sierra interface used the same options menu for the title screen and in-game, but the title screen version made the Save and Restart selections unavailable. Maybe we could do something like that. What do you think? You might be right, I only did it this way as a quickfix as there were no graphics or space availabe for an options button in the top bar. Could you perhaps rebuild the top bar to contain a placeholder button? We don't actually need the graphics for now. The changes I made should have adressed that the options from the Title screen didn't have restart and save, but I think maybe I can make some improved one-liner code to fix this later today, or worst case, during the week, I need to catch up with some school assignments. If you haven't tried the MAD demo you should give it a go, it's full of cool stuff like areas and persons that are unavailable in the AGS-demo. |
Page 1 of 2 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |