input/advice on a menu system
hegemonkhan
20 Feb 2018, 18:25(filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
about my code design for my massive/impossible ambitious RPG (lol):
I'm trying to do, OOD/OOP (Object Oriented Design / Object Oriented Programming) and Encapsulation (so, thus, will be using: Objects + Script Attributes + Delegates, instead of Functions and etc non-encapsulation stuff), to make it has human friendly (customizable-editable/scalable/compatible/etc) for others to be able to use it (to "eventually, lol" give back to wonderful quest community for all of its help), as much as possible, but I don't want it (as much as possible) to involve redundant coding (this might not be better designing from human friendly wise), as I personally like efficient coding (as much as possible), so that means it's going to 'jump/branch/call' from its encapsulation (origin object) to another encapsulation (handling object) for handling the redundant code.
also, all of my (inline/text/hyperlink + handling, no popup window menus) menus use/work-with numbers for inputs (thus, I use lists/dictionaries/iteration/etc), as I like this design approach, as it's fast and minimum clicking (reducing carpal tunnel syndrone and arthritis and etc) for the human user, hehe
for right now, I'm working with menu selections/handling (such as used by character creation, which I'm still working on currently, but will be applicable to other game features too, in future)
since, the 'return' type is specific, I just realized how conveniently are quest's Attributes (global VARIABLES), which also enables and works with using the 'menu object' encapsulation to store menu selections, which can be handled (viewing, getting, storing, deleting/removing, adding/concatenating, etc), and returned to the 'origin object' encapsulation via using its Attributes, as again, the 'return' type is specific, and using Attributes is a way around the limitation of using 'return' types (multiple scripting: script attributes + delegates)
I got a general/skeleton (still needs some refinement) of handling all of the direct menu stuff (display, selection handling + storing, etc other stuff), though it's probably not the best design, and-but, it has some things that I don't want to reveal yet publically, so I can't post it yet for you to see what I got, to see if you can design something better, meh... but, if you want to provide some ideas/code/help/advice/etc on this stuff (despite being in the dark as to what, I've got / am doing), I'd be very greatful for anything!
and here's just my very rough start of handling the 'getting' of the menu selection, just so you can take a look at it (remember this is just my starting of it... the design can be made a lot better, can probably use lists/iteration, string manipulation, and etc, or whatever you guys/girls can come up with, for a better design... I'm just basically getting my ideas down/coded right now with it, lol), so you can see into my design thinking/set-up, and maybe help with how to do it better (hehe):
<!--
attribute_parameter: this is the 'OBJECT.ATTRIBUTE' (origin Object's Attribute) is to be set/adjusted (storing the, effective: via scripting, 'return' value, from the menu handling)
integer_parameter: this is for determining what adjustment to do:
(I'm aware that for addition and multiplication, prefix vs suffix, doesn't matter, lol, unless I were to incorporate expression building and returning into it, which I'm probably not going to do... probably too complex/advance for me to try to do, lol)
(also, by handling addition and multiplication for both prefix and suffix, it also acts as 'error and exception handling', instead of having to convey to game maker about what parameter input combinations work and which don't, and also would need having error messages for them, lol)
(0) set: attribute_parameter = this.menu_selection_NAME_OF_ATTRIBUTE_TYPE_attribute
(1) suffix add/concatenate: attribute_parameter = attribute_parameter (add: +, or, concatenate: + " " +) this.menu_selection_NAME_OF_ATTRIBUTE_TYPE_attribute
(2) prefix add/concatenate: attribute_parameter = this.menu_selection_NAME_OF_ATTRIBUTE_TYPE_attribute (add: +, or, concatenate: + " " +) attribute_parameter
string_parameter: determining and handling what operation is done:
addition: "+"
subtraction: "-"
multiplication: "*"
division: "/"
modulus: "%"
-->
<delegate name="menu_get_selection_delegate" parameters="attribute_parameter,integer_parameter,string_parameter" />
<object name="menu_object">
<!--
menu displayment+handling and other stuff, script attribute(s) + delegate(s), that I don't want to share yet publically, lol, meh
-->
<attr name="menu_selection_string_attribute" type="string">unknown</attr>
<attr name="menu_selection_object_attribute" type="object">unknown</attr>
<attr name="menu_selection_boolean_attribute" type="string">false</attr>
<attr name="menu_selection_string_attribute" type="int">0</attr>
<attr name="menu_selection_double_attribute" type="double">0.0</attr>
<attr name="menu_selection_stringlist_attribute" type="stringlist">
<value>unknown</value>
</attr>
<attr name="menu_selection_objectlist_attribute" type="objectlist">
<value>unknown</value>
</attr>
<!--
etc Attributes (Dictionaries), I'm lazy... you get the idea...
-->
<attr name="menu_get_selection_script_attribute" type="menu_get_selection_delegate">
if (TypeOf (attribute_parameter) = "boolean") {
attribute_parameter = this.menu_selection_boolean_attribute
} else if (TypeOf (attribute_parameter) = "object") {
attribute_parameter = this.menu_selection_object_attribute
} else if (TypeOf (attribute_parameter) = "string") {
if (integer_parameter = 0) {
attribute_parameter = this.menu_selection_string_attribute
} else if (integer_parameter = 1) {
attribute_parameter = attribute_parameter + " " + this.menu_selection_string_attribute
} else if (integer_parameter = 2) {
attribute_parameter = this.menu_selection_string_attribute + " " + attribute_parameter
}
} else if (TypeOf (attribute_parameter) = "int") {
if (integer_parameter = 0) {
attribute_parameter = this.menu_selection_integer_attribute
} else if (integer_parameter = 1) {
if (string_parameter = "+") {
attribute_parameter = attribute_parameter + this.menu_selection_integer_attribute
} else if (string_parameter = "-") {
attribute_parameter = attribute_parameter - this.menu_selection_integer_attribute
} else if (string_parameter = "*") {
attribute_parameter = attribute_parameter * this.menu_selection_integer_attribute
} else if (string_parameter = "/") {
attribute_parameter = attribute_parameter / this.menu_selection_integer_attribute
} else if (string_parameter = "%") {
attribute_parameter = attribute_parameter % this.menu_selection_integer_attribute
}
} else if (integer_parameter = 2) {
if (string_parameter = "+") {
attribute_parameter = this.menu_selection_integer_attribute + attribute_parameter
} else if (string_parameter = "-") {
attribute_parameter = this.menu_selection_integer_attribute - attribute_parameter
} else if (string_parameter = "*") {
attribute_parameter = this.menu_selection_integer_attribute * attribute_parameter
} else if (string_parameter = "/") {
attribute_parameter = this.menu_selection_integer_attribute / attribute_parameter
} else if (string_parameter = "%") {
attribute_parameter = this.menu_selection_integer_attribute % attribute_parameter
}
}
}
</attr>
</object>
<!--
Notes and/or 'To Do' List:
1. I can more easily remove spaces within the concatenation string (so that's why the string/concatenation operation puts in a space), compared to adding in spaces afterwards into the concatenation
(data structure management/operations)
1. menu selection store/add/put
2. menu selection load/get
3. menu selection remove/delete/null
4. menu selection viewing/display
5. list/dictionary sorting operations
6. maybe create more true data structure design (trees, linked lists, mapping, dictionaries, iterators, etc), but not sure if it's needed at least for this menu system, but might be useful in other features of my RPG...
-->
so, if anyone, wants/can contribute any feedback, advice, help, ideas, etc on good coding designs/etc, would be great!
(for any aspect of this overall structural coding design system, it' doesn't have to be just for the 'get' design in the code above)
(and remember that my 'get' coding is just my initial start on it, I really don't want/need help with improving it, as that I can do myself, when I get to it, right now, I'm just getting my ideas of what I want/need to do with it down, and will later refine it)
(showing my 'get' coding, is just to hopefully give some insight into my overall structural design system)
(I know seeing my entire coding on this overall structural design system would help for you to see what I got, and so what can be done to improve it, but I'm hoping I can just get some help/ideas/advice/feedback on designs for this type of stuff)
a menu system is a big aspect of my RPG (as it is [capable of] handling a lot of game aspects)... once I get this done... I can finally have my character creation (for the most part) done (yeah, finally)! And, it can be used for other future aspects for my game too, when I get to them, lol.

K.V.
22 Feb 2018, 00:26I'm trying to come up with something for you, HK.
You appear to be beyond me when it comes to keeping up with all those stats and using delegates.
hegemonkhan
22 Feb 2018, 01:43don't worry about it... the thread is asking for a lot... help with designing (designs/structures/systems are a lot more difficult for a lot of people, including myself, then just scripting/coding, which is mostly procedural, which is probably easier for most people, as it uses logic and you can eventually figure out how to do something and then how to do it more efficiently, but designs/structures, I think are more difficult, at least for my brain anyways) a system (menu handling: selection/choices/decision handling, which is what the character creation is, lol, as well as lots of other stuff/events/etc in the game as well), lol. I was just hoping to get some input, as I try to get some menu system completed (I almost got something myself, but it's really "inelegant", as mrangel likes to say/use, lol, though I'm still struggling a bit with some parts of it, but I've made a lot of progress since I last tried working on it... just need to finish up some stuff and then refine it, and then eventually, make it more friendly for others to use too... though once I get the menu system down, I'll be able to nearly complete my character creation, aside from figuring out all of the in game stats/mechanics... but that's an entirely different matter... game design... and maybe... probably the coding will be a bit difficult for that... not sure... lol), but I'm finally making some sense of progress on my game, lol.
hegemonkhan
22 Feb 2018, 01:56I got a new question, on a design concept, just wanting/hoping for people's opinions and info/feedback on it:
would it be good to store your choices (and return/set your choices of course), or should you just return/set your choices, could there be a good use/need for storing your choices, to retrieve at a later time, and/or for whatever?
I've changed my code for the 'get', compared to what I posted above, so that I'm passing in the Attribute so I can store the choice-value into the Attribute (as an alternative to using the 'return' feature, as you have to specific/select a single return value type per Function/Delegate+Script_Attribute, and so this way, I don't need to have redundant Functions/Delegates+Script_Attributes), but I'm just wondering if I should also store the values into a separate 'storage' Object+Attribute (my 'menu' Object), as well... hmm...

K.V.
22 Feb 2018, 04:18I think you should save as much as possible if you're going to use Pixie's Save/Load system (and it sounds like a good idea).
With his system, you can update the game without the player having to start over. (Good for ever-expanding games.)
You, Anonynn, Pix, and mrangel know leaps and bounds more about this type of stuff than I do, though. So... I offer a grain of salt with my input.

Anonynn
22 Feb 2018, 19:49Anything I can help with :D? Glad to hear you almost have your new character creator system done too! Good job making progress on your game, HK! So you're wondering about choices? Or structure?
Anonynn.

Anonynn
22 Feb 2018, 19:49deleted

K.V.
22 Feb 2018, 20:09deleted
Theory:
This was either a fantastic idea, and Anonynn decided to keep it under wraps, or she noticed HK had already scripted it.
(Yep. I'm bored today!)
hegemonkhan
22 Feb 2018, 23:47@ Anonynn:
structure/design:
ways of handling choices/selections/decisions/setting-or-adjusting-stats, which is the character creation, as well as for any events/choices/decisions/selections/etc throughout the rest of the game too, hehe.
but I can always use ideas about choices/features and etc game design stuff too! what to do and/or have within a game, and even better, also how as well... lol
I don't have any set plans yet for my game, aside from being an RPG of fantasy/sci-fi or both
just, throwing/putting in real world stuff (as I'm not creative to be able to come up with my own unique world, lol, well, I'll try to do so as much as I can, but right now, I'm just using what's in the real world and common in rpgs --- I can always go back and make it into more original stuff later) and common rpg stuff, for right now, as I don't have a fleshed out game concept, I figure that will hopefully just naturally take more shape, as I slowly get various parts of my game working... I'm just trying to get the basics of an rpg in place/working... I'll worry about actual game design as it comes up, lol.
just hoping to get some feedback/ideas/help/advice on how to handle choices/decisions/setting-or-adjusting-stats/etc
well... there's still a bit more to do with my character creation, but getting the menu system working will enable the character creation to be functional (90% of the "bulk" of the character creation), with all that's left (once I get the menu system done)... is "only" to work on getting all the game stats/attributes/mechanics/etc (and then the descriptions of class/races and etc stuff) figured out, lol ... to fully complete the character creation, lol.

Anonynn
23 Feb 2018, 03:31WRONG KV! It was a double post :P Although you were right about me having a fantastic idea cause like that's what I do ^_~
If you would like, check out my new Character Creation, I even have a blank template for it you can use. Hell, if you want you can just use some of my questions if it helps to remove some of your burden. I can post the entire code if you want. Or email to you, or whatever helps!
I was inspired by RPG Character Creation from a while back...like...
Ogre Battle: March of the Black Queen- https://www.youtube.com/watch?v=UWRnErXIp3w
There are a couple of others too like MMORPG questions. It always got me thinking about the morality of the character.
What kind of questions do you have so far?
Anonynn.
hegemonkhan
23 Feb 2018, 06:33wow... that was one of my favorite games... Ogrebattle: March of the Black Queen (SNES), hehe :D
surprised at someone knowing of it nowadays, really awesome!
The Pixie
23 Feb 2018, 09:20I think Morrowind has a similar character creator - but also lets you just set stats, which is what I always did.
And they spelled decide wrong!

Forgewright
23 Feb 2018, 22:07All I can say is...Huh?

Forgewright
23 Feb 2018, 22:28Found Starcross from 1982.
Dos game plays in your browser. Just type in Starcross to start the game.
True blue text adventure if anyone is feeling nostalgic.
I realize this doesn't really belong here but thought I'd slide one through for old times sake....
jmnevil54
26 Feb 2018, 02:14Oblivion is my favorite game in terms of character creation. (I'd like the new look for the Imperials in Skyrim though. But I also absolutely hated the changes they made to Argonians and Khajiit.)
Also, I love Pokémon. In case you didn't know. (Gen 7 was the only game with clothes and hat choice/design/fashion.)