Slice Types Discussion

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Slice Types Discussion

Post by SwordPlay »

I would like to see a new slice type which would revolve around interactivity.

It could be used for buttons, switches, dials, string input and more.

The main reason I would like something like this is to improve the UI especially for mobile platforms!
Slices are really versatile, and can be toggled invisible, aligned and anchored and more.
I find slices much more useful for creating touch/click interfaces than clunky on-screen controls, which are ugly, static and bulky.

I think being able to use slices to create menu interfaces via select slices is really handy!
I like clicking on a select slice to toggle the appearance of a menu. It's really fun!!!
Users can also move slices around if they are set up right. That is a really useful feature on the user-end! They could basically move them out of the way!
Not sure how it would work, either move them through alignment/anchor or switch between pre-set layouts. I use pre-set layouts otherwise the contents get messed up.
Pre-set layouts are much more effective, due to creator control.
I'd like to see tag conditionals for slice collections so that they could be displayed on screen without plotscripting.
Interactive slices could turn on/off tags as a simple function and therefore control slices without plotscripting (theoretically)

An interactive slice could be a graphical widget that will display an image depending on its state, such as button/switch, checkbox, dials and gauges.

On this note, I would like more panel slice options.
I would like to set it with arbitrary numbers and/or variables.
It is somewhat fiddly to manage 2 more slices... Can it not read it's own extra data, or have 2 fields for such a purpose? Is this actually already possible but I just don't realise?
I often operate CUSTOM in sleep deprived states so I often forget.
I would also like graphical effects for panel slices, such as different "skins" or "patterns".
Not sure how that would work...
I think displaying and positioning a backdrop, and making it visible only through the active child of the panel might work.
I was also thinking of showing discrete panel items, rather than a continuous bar.
Actually, a good idea might be to have a custom panel graphic, similar to Box Graphics so that users can design their own panels, and this way, they could create strange-shapes and even of discrete shapes rather than a continuous bar-thingy.

Can one search a grid slice for the content of a cell? For example, "slice(s) at col:5 row:3"

Back to interactive slices:
An interactive slice would not only have interactive function, but could visually display or indicate its current state.

I would like it if it could be tied to the menu editor similar to textboxes, so that such a slice could be used with the keyboard via a command from a custom menu.
Actually, I'd like slices to have tag conditionals and have interactive features a lot more.
It would be cool to call a slice instead of a portrait graphic, or to call a slice from an invisible textbox, and when you close the textbox, the slice vanishes, and stuff like that...

Really, I would like to mess around with slices within CUSTOM a lot more, and reduce the need for plotscripting... Textboxes can already do practically anything to make a simple game, and slices and the slice editor should be streamlined to allow the same.
After all, if I'm editing slices, it would be much easier to do from within the slice editor, as opposed to changing lines of code.

It would be nice to have functionality such as hover over, click, long click, drag and more, but I'm not holding out for that. I know that this kind of thing can already be scripted fairly well, and that stuff is in the works.

I think being able to navigate and use slices with the keyboard would open up lots of avenues for gameplay and UI design.

Another thing I would like to see is the placing of slices directly in the map editor anchored to a layer for example, and being able to interact with those slices similar to NPCs.... Then we could use pixel movement and do away with grid/tile-based maps.
But the resolution would still be quite low, and pathing would have to be changed...
There are other problems too...

maybe I am asking quite a lot though... don't take it seriously! I know this is reasonably practical via plotscripting.

Is it possible to append to a Slice's lookup?
Is it possible to ask a specific digit/column from a value? I would like to be able to create bitmasks and that stuff (I'm learning about coding by myself)

If you guys wanna chat about stuff relating to CUSTOM, I'm really interested and would love to support you guys in some way or other... I don't really know coding well enough, but I understand some principles of programming. I can script a platformer and menus and stuff okay.

Is it possible to create a list populated dynamically through plotscripting?
For example, I was wanting to write path-finding stuff.
I want to be able to add, remove and search for entries, as well as comparing them...
Does something like that exist already?
Sorry, I'm just excited about trying and learning about hash tables and stuff like that.
I think it's really clever to store and use data in ingenious ways.

That's why I love CUSTOM! It is surprisingly versatile through plotscripting, it has extra-data fields and can display graphics, music, has a detailed system for map and battle creation... and since slices, things have been VERY impressive!

Now that CUSTOM can export to android, I think the possibilities for using it are more than at any time ever before! (not hyperbole)


SUMMARY
- interactive slices? something to improve UI, such as graphical widget thingummabobs?
- panel slices? custom graphics and/or setting options?
- calling slices from menus and tags?
Last edited by SwordPlay on Mon Apr 24, 2017 12:05 pm, edited 1 time in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I can post some example code later on for using selectslices as button widgets (can't right now, I am on my phone)
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

No, that's not quite what I'm asking...
I know that it can be done through scripting, but I feel it'd be much easier for users to manage it from within the engine using the slice editor.
I scripted a few buttons and expanding/closing menus, so I don't have any issue with figuring out slices, rather, the real issue is having an engine with a visual interface and having to type, search, modify, import, assign etc., scripts, which is somewhat unwieldy.
Maybe in the future when the engine gets an overhaul?
I would just like to be able to set conditions for a slice's properties/actions in the slice editor...
I realise that this is mostly pointless, because scripting is more versatile...
I would definitely like to see scripting more integrated with the engine, perhaps composed of logical blocks that can be constructed in the engine.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I am sure in the future there will be more script triggers, and the ability to attach such triggers to objects like slices.

None of this will happen until after the scripting overhaul that adds support for script fibres and script data types.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I don't see any reason we can't add script triggers now if we wished, rather than waiting for script fibres.

I also don't see what a script type system has to do with it? I think you were just assuming they would both be added at once.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

I'm working on making slice-based versions of all the special menus in CUSTOM.
Is there any point in my doing this?
Ostensibly, I'm doing it so games can have touch-based interfaces, and I'm happy to share the slice collections/scripts to public.
However, I might need some hints for design interface... Are there things I should know before I try this? Are there "easy" ways to do this?
I also want to make multiple layouts for each special menu, so users can choose one that fits their game.
Can scroll slices be operated through touch?

Right now, I'm working on displaying the inventory with slices.
I can see that it needs some buttons, at least 8 chars for the item name, and 2 digits for QTY.
I am going to use a select slice, with a grid. It will be laid out vertically, and I might try a horizontal arrangement afterwards.

As far as I can see, there is no way to autosort the inventory through scripting, is this correct?

EDIT:
How can I use the SPAM menu to do new menus? Is it reasonably complicated?
Last edited by SwordPlay on Tue Apr 25, 2017 6:34 am, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

From the sounds of it, when you say "CUSTOM" you actually mean ohrrpgce-game ("Game"/game.exe), not ohrrpgce-custom. CUSTOM definitely refers only to the editor program.

Slice based versions of the existing menus would be very useful! They don't have to be pixel-wise identical to the existing ones, but they should use the same colours and have at least the same amount of space available for text.

The spells, status and items menus already have been converted to slices. So if you want to work on something, create slice-based versions of the Equip menu, the Load/Save menu, and the Team menu.
As far as I can see, there is no way to autosort the inventory through scripting, is this correct?
There's no builtin command, but Gizmog wrote a script to do it. It's somewhere in a thread in the Q&A forum; I forgot to add it to the Script Dump. Of course, it would be easy for someone to implement a proper builtin command.
Last edited by TMC on Tue Apr 25, 2017 6:37 am, edited 2 times in total.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

Okay, I might have a go at doing those menus in slice format.

EDIT: Do scroll slices jump, or smoothly scroll?
I'm interested in using them to have scrolling menus, and even scrolling between different menu screens.
Last edited by SwordPlay on Tue Apr 25, 2017 6:39 am, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

By "new menus" do you mean plank menus in Custom? Those plank-menu editors are the same as the normal slice collection editor except that you can use special lookup codes. So if you;re slicifying the menus I mentioned above, don't use those editors.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

Not really sure tbh, I don't know what most of SPAM does.
So I should build it as a normal slice collection?
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

TMC wrote:By "new menus" do you mean plank menus in Custom? Those plank-menu editors are the same as the normal slice collection editor except that you can use special lookup codes. So if you;re slicifying the menus I mentioned above, don't use those editors.
Wait, if I use the slice editor in the spam menu, will it load those menus into the game instead of the default items, equip, etc.?
My pronouns are they/them
Ps. I love my wife
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

I think I would like to put "Empty" buttons beside each slot... yay or nay? It could be an icon rather than text

EDIT:
How shall I layout the equipment slots?
I'm hesitant to base it on the current design.

There is a field which tells you which equipment slot type you are changing.
Surely this should be a fixed field above or next to the relevant slot?

Portrait graphics? How about battle and weapon graphics?


EDIT:

Do I need to add anything except slices? You are just asking for the layout represented by slices, right?

EDIT:
How would I go about making the Team and Load/Save menus? Doesn't that involve creating a slice dynamically based on the number of entries? They are quite simple too.
Last edited by SwordPlay on Tue Apr 25, 2017 7:47 am, edited 4 times in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Yes, use the regular slice editor. There's nothing aside from the slices to provide.

The Team menu is probably not worthwhile creating right now, since it's so simple.

Unfortunately, you can't actually exactly recreate all the existing menus, because the slice system is missing an "expand to fit children" option (the opposite of Fill Parent)
There is a field which tells you which equipment slot type you are changing.
Surely this should be a fixed field above or next to the relevant slot?

Portrait graphics?
Listing the names of all equip slots could work. Is there enough room to put them to the side?

Portraits could work: you could make it look similar to the Status menu.
Weapon sprites would also be nice to include.

For menus, just create a single template menu item. Its parent should be a grid slice.

Use the same box styles as the existing menus. You can see them listed here: http://rpg.hamsterrepublic.com/ohrrpgce/Box_Styles
I think I would like to put "Empty" buttons beside each slot... yay or nay? It could be an icon rather than text
You could always add it to see how it looks.
kylekrack wrote:Wait, if I use the slice editor in the spam menu, will it load those menus into the game instead of the default items, equip, etc.?
Yes it will, but you have to set the correct special lookup codes on things for it to work. More importantly, I want to make some changes to the plankmenu system, so if you did replace the default menus, your menus would break. Please wait.
Last edited by TMC on Tue Apr 25, 2017 8:11 am, edited 1 time in total.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

This is what it looks like now...
There is enough room to put the name of the equipment slot (just about)

Everything is really squashed due to the box borders...
If a user creates a custom border which is larger than the default, it will overlap and spill.
Having lots of borders with boxes also makes it cramped.
(Personally, I like to use borders which are just 1 pixel thick)

I also wonder if users will easily be able to modify the layout?
I am in favour of having all the info displayed on a single rectangle, perhaps broken up with simple lines.

The equipment name field is now somewhat redundant.
If you wanted, you could probably fit in the hero battler graphic, like what is displayed on the hire screen, as well as a weapon graphic.

I am thinking of moving the graphic boxes below the equipment slots...
It's a relatively minor change, and I can hand it over to you now?
Do you want me to add slice lookup codes? It's tedious and I haven't done anything like that.
I'm surprised how easy it is to create a menu out of slices! Slices are neat-o and I love using them... I actually want to replicate the special screens for touch support... virtual pad is extremely clunky, covers the screen, and has odd effects on my devices (such as when the button is pressed, the graphic appears to be dragged by the cursor)

Is there any in-depth-ish guide to slices? I could write a FAQ or a wiki page, but I am not an expert by any means and would probably have to be assisted by devs. I also want to learn more about slices in general. You can make practically any type of game in CUSTOM using slices. They are neat!
I really want to be able to get data from the game and display it directly in a slice though, through the slice editor, for example.
You mentioned special lookup codes. How could one use them? I can see a list of special slices lookups in the plotscripting dictionary. Is there a list of special lookup codes too? Are they the same thing?


EDIT: One could move the hero name to the right side, and delete the box which shows the equipment type (there's room to display it next to the slot)
This is all relatively minor now. Should I turn it over to you for modifications? Any tedious thing you need me to do?

EDIT: How does the save/load screen work?
It shows slots and you can scroll. There is a "cancel" button.
When you start a new game there are 2 buttons, "new game" and "exit"
Is it okay just to create a select slice which extends off-screen, and then how will you guys handle that?
Could someone use plotscripting to populate it with the appropriate amount of slots?
Last edited by SwordPlay on Tue Apr 25, 2017 9:48 am, edited 5 times in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

TMC wrote:I don't see any reason we can't add script triggers now if we wished, rather than waiting for script fibres.

I also don't see what a script type system has to do with it? I think you were just assuming they would both be added at once.
Ah, I had assumed that both features would come at the same time, but if not, that is fine.

I do think it would probably be a good idea to have fibres working before adding a lot of new script triggers, but yes, you are right, no strict dependency there.

@expand-to-fit-children I think I started this once, but I don't remember why I didn't finish (I don't have any unfinished patch anymore) I think we will need the ability to selectively fit the x axis, y axis, or both.
Post Reply