OHRRPGCE feature requests/suggestions

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

A graphical rehaul of the OHR makes me think about making a "launcher" type interface when you initially open custom. A lot of games, especially larger ones, have a launcher screen with updates and links to their websites 'n stuff. The OHR could have links to the wiki, forums like this, etc. and maybe a dev log of what's new in the latest version. Having a sort of hub with information directing to OHR resources might make the engine more appealing to new users. It would at least give it some kind of context and hint at the existence of the community around the OHR.
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 »

The wiki stuff is a bit outdated, and much left unfinished.
Sometime, we should really have a go at redoing and finishing some of the pages *volunteers*

How is it that select/cut/copy/pasting text is not supported for textboxes?
I would like a copy/paste board as suggested previously.
Being able to copy/paste from an external document, such as .txt file into textboxes would be cool.
Alternately, it would be nice to be able to import text from a file which would automatically create textboxes from it.


#EDIT
(I know you can already create textboxes with plotscripting, so its a bit redundant. Textboxes work mostly fine anyway.
I was more thinking about selecting text in CUSTOM in case you wanted to copy it to somewhere else, for example, re-ordering text etc. I think using a text editor to arrange text seems easier though)
I'd like NPC move types: walk in a direction (straight line) and maybe walk in a direction (meandering)?

EDIT
If a copy/paste board gets done for the sprite editor, please assign slots using number keys, much like how numbers can be used to pick palette colours, allow us to clone from the copy/paste board in a similar style.
The way I imagine this would work would be to press Shift+number to save a clone selection to that key, or something like that.
Last edited by SwordPlay on Mon Apr 10, 2017 1:18 am, edited 2 times in total.
"Imagination. Life is your creation."
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

the engine looks like it was made 20 jears ago and it hasn't been developed on ever since.
You're being grossly unfair to 90's software. The OHRRPGCE looks like it was made 30 years ago! It does still look exactly the same as its first release, though.

That's an impressive mockup! It's interesting that you're taking a different route to most other people who have started a rewrite or created a mockup (see below), who usually went for a more normal high-res GUI using GTK or native OS widgets or similar.
But a low-res icon-based slice-based GUI seems both less work and more suitable. I think making the main menu accessible anywhere by representing it as a row of icons could be a good idea. I do think that the main menu is one thing that could possibly be replaced with an alternative way to get between the different editors.
I agree that Custom doesn't look great, and was thinking of ways of making it look and feel better without actually rewriting menus, like window dressing, changes to font and colour (skinning), mouse support and UI improvements. (If I had time I would create a demo too.) Using lots of icons instead of text is an interesting alternative.
Adding mouse support to most of the menus in Custom is something that James has already done, but had to disable due to implementation problems. I hope that it can be reenabled soon.

It would be possible to support skins, including the traditional white-on-black menus if you really prefer DOS over Amiga.

Before anyone makes rash conclusions, adding a GUI to the OHRRPGCE does not mean dropping or reducing support for keyboard-based editing; we will never do that. Worst case, we can add menus (like the F9 menu) to access things that you can adjust with the mouse but which don't have a hotkey.

The OHR is not entirely limited to 320x200 anymore, though. Sometime soon I want to finally update gfx_directx so that it supports variable resolutions, and then I was thinking of making Custom default to something higher than 320x200. Maybe 480x320 or so. I agree, it's really hard to fit much on screen. I often struggle to fit a good description of a setting into 40 characters. (I was also thinking of switching to a variable-width font generally in Custom so that more text can fit on screen).
However, Custom is kind of stuck running at 2x or 3x zoom, because of all the sprites and maps it has to preview, and where we do have graphical stuff it's all written assuming that sort of zoom level. Conceivably we could just draw all graphics scaled up, and otherwise run at a high resolution (with a larger font).
When Custom runs at a higher resolution it will be possible to to add a persistent menu bar a the top or side of the screen. Otherwise, having a menu at the top which drops down only when you move the mouse has the advantage that it can be added to existing menus without increasing the resolution.

Did you create that mockup in HamsterSpeak, or is that made with PV8?
I have been wondering whether it would be a good idea to use HS or something else for creating menus and GUIs in Custom. I think they are just easier in a dynamically typed language. So whenever I finish turning HS into a dynamically typed language, I think I would prefer using it to FB, but right now it's not a good choice.
(The functions we currently have for defining menus are just terrible, so even writing a new menu system in FB could be the difference between night and day.)
And then there's the editor-editor, but that's only going to replace some existing menus.
A graphical rehaul of the OHR makes me think about making a "launcher" type interface when you initially open custom. A lot of games, especially larger ones, have a launcher screen with updates and links to their websites 'n stuff
Yeah, I think the initial NEW/LOAD/QUIT menu is really ugly (and it doesn't even support the F1 key!) and I would like to spruce it up, such as putting the OHRRPGCE logo there (other ideas?). But I'm not actually sure whether this really is the official logo or just a badly scaled-up placeholder because there isn't really one. (Wait a minute... I'm bike shedding.) Links is a good idea (we could add clickable URLs to Custom). I guess a 'check for updates' or function or recent news would be feasible too, but I wouldn't prioritise it.
I was also thinking about plotscripting. Could it be possible to do away with it by continuously running a main loop, and running subloops assigned at the appropriate places in the engine? (e.g. placing subloops on npcs, maps)
You're asking for script multi-tasking, aka separate script fibres. It's planned.
How is it that select/cut/copy/pasting text is not supported for textboxes?
By coincidence I started on it yesterday, then realised I didn't have time.
The wiki stuff is a bit outdated, and much left unfinished.
Sometime, we should really have a go at redoing and finishing some of the pages *volunteers*
If anyone wants to update articles on the wiki, yes please! James and I have no time for that. The fact that we have two HOWTOs is a mess, and I think the two should be just be merged. There's lots of much smaller tasks though.
Last edited by TMC on Mon Apr 10, 2017 6:48 am, edited 3 times in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Time for some history! (Sorry, most of this is irrelevant except for the link to Alieron.)

There have been many attempts over the years to rewrite the OHR or port it to a different language and only one succeeded (which is the FB version we use today). In fact, within weeks of the source being released, Mike began converting it to FreeBasic and David (NeoTA) tried to convert it to Python (writing a QB-to-Python translator for the task). You might be surprised to learn that both gave up (it was Simon who eventually successfully ported to FB) and both decided to rewrite from scratch instead. David's project was called Jormungand which would be really interesting to look at because it was a heavily icon-based rewrite of Custom. Unfortunately there's no screenshot or code easily available.

Fyrewulff created a mockup named 'Aileron' of what a modern GUI version of Custom might look like. (Don't bother looking for his next update, there isn't one).

Long ago, I once started writing gfx_wx, a wxWidgets-based graphics backend which would run existing editors in floating 320x200 windows inside a larger window, while allowing a modern GUI for creating new editors, very similar to 'Aileron' but allowing gradual rewriting. I got pretty far, I don't know why I stopped.

More recently, MHRPGCE was first an attempted port of the OHR to BlitzBasic and then an attempt to rewrite from scratch in Monkey. There's a web-based demo with a sprite editor, which is extremely unfinished.

Anyway, everyone that tried to rewrite or port the engine (except for FBOHR) failed for exactly same reason: rewrites of a big project always start out far worse than the original. Always rewrite incrementally. But I think you know that.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Increasing the resolution of custom, aside from just being a great prospect, made me think of something. In the map editor, the camera isn't centered the same way as when the game is actually running. I don't know how much others have encountered this issue, but sometimes you want to put something just out of the player's view on a map for one reason or another. In the map editor, it can be hard to tell without counting tiles whether something can be seen or not.

A nice feature would be to be able to "preview" the what the camera sees when the game is actually running. This could just be a dotted line that highlights a 320x200 space on the map editor, which would work better if the resolution of custom were higher. I guess this probably isn't a priority. Still, thought I'd throw it out there.
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 frankly thing CUSTOM is rather charming, and don't want to give up its current look.
Being mostly black is also easier on the eyes (i.e. looking at a white light is more tiring)

As for the wiki stuff...

Maybe it would be good to have the community draw up plans and submit wiki stuff, and perhaps a new logo, if so inclined?
(We might have a logo design contest of some kind, e.g.)
Even though I am fairly new, I understand and can write wiki stuff.
I don't want to do all the work, but I also think it is unfair to make other people do that kind of thing, especially if they have jobs, families etc. to attend to.
I also have some ideas for wiki stuff (maybe a new thread for that?)

For example, I want to focus more on slices and emphasise how one can show any information, create any kind of menu etc., and worry about traditional RPG/battle mechanics further down the line (CUSTOM has some faults, and is a bit unwieldy in that regard.. bitsets for example)
But as well as that, I think people don't appreciate how powerful CUSTOM is!
It can spawn NPCs, powerful zone usage, extra data everywhere and comparing positions of all sorts of objects.
(I want to emphasise how versatile CUSTOM can be in a more general sense)
"Imagination. Life is your creation."
Wendigo
Red Slime
Posts: 52
Joined: Tue Feb 28, 2017 1:15 pm

Post by Wendigo »

Wow I didn't know of all those attempts to create a new editor/gui. There are some really nice attempts.
Personally I like engines that have editors written in the engine itself (like godot). They do have the downside that you have to create all the widgets and their logic yourself but there are also many benefits. GUI Toolkits like wx are cross platform on paper but in reality one encounters quite a few platform specific inconsistencies due to rewrite to the native GUI toolkit (WinForms, GTK, etc) that happens in the background. A GUI Toolkit would add another construction site that we would have to maintain. With two and a half developers this would be a huge distraction from the more essential parts of the engine. Using widgets (slices) created by the engine itself ensures that everything looks consistent on every platform. Furthermore widgets made for Custom can also be added to Game and vice versa.
With the already available slices we have widgets for Frames, Labels, Buttons, GUI Layouts and with a little coding we could also get comboboxes made out of Grid+Select slices and other widgets.
I think enhancing the current GUI in Custom bit by bit would be the best way. Many of the existing config screens are already nice to use like the sprite/tileset/mapeditor. These would only need few improvements like mouse support or some pretty pixel art in the background like frames around the sprites and stuff.

The draft I made was just a quick sketch, neither the icons nor their position are final. In fact I would even like to involve the community in the process of creating the art since there are many people more skilled at it than I am, kind of what Virtuous Sword suggested for the logo (which is also a great idea).

Opening links from the GUI would be a nice addition so new users have it easier to find help from the community / wiki.

I haven't used VP8 at all, posted it just as an example of how a new GUI could look like. The logic of the mock up was created with the most ugly piece of Hamster Script I ever wrote, icons were made in Custom itself and the backdrop was assembled via Gimp. I haven't had a look at how the slices are handled in FreeBasic yet so I did it in HS.
Writing the code in HS feels nice but also a little limited since many useful variable types are missing in HS.

Concerning the New / Load / Exit Game screen I would replace it with the init screen from my mock up. So when you open Custom you are presented a list of games you already worked on plus the possibility to add / open a new one. I'm continuously switching between projects right now because I have one for testing in addition to my main game project. Having to exit the engine is very annoying to be honest. We could add the OHRRPGCE logo above the select project box + some icon-links to the forum/wiki at the side and we would have a decent looking welcome screen.

I also thought about using a more narrow pixel font for the GUI in custom. The current one is fairly wide. Using a font with a variable width shouldn't be that much of a problem in Custom (except textboxes) since labels and options in combo boxes should be quite static so writing code to determine the text length might nit be necessary.

Copy&Paste from the OS or a text import would really be a handy feature. While digging more into the engine I noticed that writing text into text boxes is also a pain with the German keyboard. For something like ":" I already need the special characters screen (CTRG+SPACE). I haven't yet found a way to add German "Umlaute" (Ää,Üü,Öö,ß) at all. An import feature would help a lot here even more if we had unicode support.
Adding a "read from text file" function in HS would also be a nice addition. That way one could bypass the whole textbox creation and implement multi language support oneself (via ini-file maybe). I have been thinken to implement it myself but haven't yet looked at how this is done in FB and how functions get passed to HS.
Last edited by Wendigo on Mon Apr 10, 2017 1:56 pm, edited 4 times in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

By my count there have been 11 projects to rewrite the OHRRPGCE or port it to a different language (not even counting MotherHamster, Mike's Java engine, or wxohr), plus a few to create libraries for reading the data!

Yes, looking back at my wxohr code, I'm surprised to see quite a few mac-specific #ifdefs to work around problems (I actually originally wrote it on a Mac). (And I'm also surprised how complicated it is... I had to subclass wxApp, wxThread, wxPanel, wxMDIParentFrame, and wxMDIChildThread.)

So I guess you're right that a slice-based GUI will look better, and will also mean we're improving the slice system instead of dealing with GTK or whatever. James does have plenty of experience with GTK (I don't), which is why using GTK seemed appealling. (And wxWidgets seems to be more difficult and far less consistent than GTK).

For an example of using slices in FB, see e.g. multiline_string_editor(). But in future, instead of creating a slice collection by hand, we should create .slice files with the slice collection editor and then load them.

Here are the Jormungand icons, and an example of how they were used (although, I seem to remember Jormungand looking very differently to this, with a bar at the top full of icons; I think Neo wanted to skin it. There's a lot of code in Jormungand which I haven't managed to figure out or run yet.)
Image
While digging more into the engine I noticed that writing text into text boxes is also a pain with the German keyboard. For something like ":" I already need the special characters screen (CTRG+SPACE). I haven't yet found a way to add German "Umlaute" (Ää,Üü,Öö,ß) at all.
I started on this. The problem is that when you type an ä, it's actually sent as two separate characters, the a, and the umlaute. The engine needs to glue these together into the one character which exists in Latin-1. I recently wrote a function to do that (partially_normalise_unicode() in unicode.c), but currently it can only used when the two characters are typed the same moment. Looking at the code, making it work when they're typed separately won't be hard, I'll probably implement it tonight.

Are you using gnu/linux? For unicode input to work, you have to run with "ohrrpgce --native-kbd". That's only the default on windows and mac because James had problems with keys getting stuck; which seemed to be an SDL bug :(
I'm continuously switching between projects right now because I have one for testing in addition to my main game project. Having to exit the engine is very annoying to be honest.
You don't know that you can run multiple copies of Custom, as long as they're editing different .rpg files? That was added in Callipygous.

Showing recent .rpg files to Custom's initial screen would be nice.
The current one is fairly wide. Using a font with a variable width shouldn't be that much of a problem in Custom (except textboxes) since labels and options in combo boxes should be quite static so writing code to determine the text length might nit be necessary.
We can use multiple fonts (that's already implemented, mostly). Textboxes and other things like item names would be shown with the game's default font while everything else uses the editor font. There could be an option to change the editor font if people prefer.
There are lots of places that assume each character is 8 pixels wide, but I have been fixing them recently.
Adding a "read from text file" function in HS would also be a nice addition. That way one could bypass the whole textbox creation and implement multi language support oneself (via ini-file maybe). I have been thinken to implement it myself but haven't yet looked at how this is done in FB and how functions get passed to HS.
I was planning a set of commands to read/write files a line at a time, but I haven't finished designing the functions, or shown them to James. James suggested allowing reading/writing binary files too. Just reading a whole file at once would be far simpler than what I was thinking of, which required tracking open file handles. But OK, I guess we should also have a command for just reading a whole text file at once. You could add that; adding script commands is very easy. However...

the main problem is that we should autodetect the file encoding, which is something that isn't built into FB. However, FB's compiler has code for autodetecting, so I was planning to borrow that. FB's file IO has builtin support for reading/writing utf8/utf16/utf32, but sadly it appears it will reject any file without a BOM, even UTF8 for which using a BOM is not recommended! However we can just read a utf8 file as 8-bit text and do our own UTF-8 decoding.

Of course, you can already import/export textboxes, but you need to format it as 38 characters per line, which is annoying. There's no reason that textbox import couldn't automatically wrap the lines to 38 characters; that would be easy.
Attachments
jormungand_heroedit_icons.png
jormungand_heroedit_icons.png (78.11 KiB) Viewed 2097 times
Last edited by TMC on Mon Apr 10, 2017 11:03 pm, edited 5 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 »

for NPCs I'd like to see pushing affect the facing of the walkabout.

"face direction when pushed (towards pusher)"
"face direction when pushed (in that direction)"
"Imagination. Life is your creation."
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

Speaking of pushable objects, would it be possible to have a sound effect associated with pushing? Either generic game-wide or unique to an NPC. I've got some movable objects that feel like they should make noise when pushed.

Or would scripting be a better idea there? Something like "while npc x is moving, play sound y?" Would that work?
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 »

That is a great idea for a built in sound trigger.

It also sounds like a relatively easy project
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

I would like it if buy menus showed how many items of that sort you have in stock, how many slots you have free, that kinda thing.
"Imagination. Life is your creation."
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

Bob the Hamster wrote:That is a great idea for a built in sound trigger.

It also sounds like a relatively easy project
Rad. Another pushable thing: Could an NPC's on use activation script be disabled while the object is being pushed? I've been able to (rarely) break NPC alignment by pushing an object while "talking" to the object if I time it properly. Maybe this is something best handled in a script too?
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Hmm, well you're meant to be able to activate NPCs while they're moving, and I don't see why NPCs moving because they're being pushed should be a special circumstance, so I'm going to say that's a bug in your script rather than an engine bug. (I assume that your script moves the NPC, which it shouldn't, causing it to misalign.)

(Of course, that NPCs can get misaligned by scripts at all is an engine bug).
Last edited by TMC on Tue Apr 11, 2017 11:00 pm, edited 2 times in total.
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

The script involved is a block sliding puzzle, so the player can push the block to move it normally or "use" it to pull it. If you mash the arrow key towards the pushable block while simultaneously hitting enter at just the right time, the NPC misaligns and can't be used or moved again.

It's not much of a script, just this repeated for each of the four directions:

Code: Select all

if (
hero direction(0)==east,and,hero is walking (0)==false
)
then
(walk hero(0,west,1)
set hero direction (0,east)
walk npc (npc id,west,1)
#play sound (9)
wait for all
)
Post Reply