henck / trizbort Goto Github PK
View Code? Open in Web Editor NEWThis is a browser implementation of the Trizbort adventure game mapping and code generation software.
License: MIT License
This is a browser implementation of the Trizbort adventure game mapping and code generation software.
License: MIT License
Trizbort has a few "standard" keyboard shortcuts with the Ctrl key:
On macOS, these keyboard shortcuts are normally bound to the Cmd key ⌘; it would be great if I could use those there instead.
Hello,
I just found this tools and I think its fantastic. The only downside to use it (with quest) is that it will not support gridborder orientation (or I didnt found how to create them)
Should I create it in quest after ? And if I do that it will be quite impossible to change the map after having made the change (because I don't want to use all my time to redo the same modification)
I'm quite new with quest and trizbort, so maybe it's very basic information.
If I'm not missing an existing functionnality, do you want that I research how to implement it ?
With new code generators added, the main menu is threatening to get quite long. It would be better to add expandable groups.
https://github.com/henck%2Ftrizbort
Your social.html escapes the /, breaking your setting. Needs to be just your username, or drop the escaping from social.html
Line 26 in 71a2fd5
Really great project, btw. I helped test Informer for OmniGraffle back in the 00s, and have recently been thinking about a project just like this.
Create a room. Use shift-up to create a room to the north.
Actual: The original room is selected. There's no way (that I can see) to use the keyboard to select the room you just created
Desired: At the very least, pressing the tab key should support selecting rooms. It would be nifty if there were a keyboard shortcut (tab + up?) to navigate to the room to the north.
Currently, the sample maps are part of the main code body. They should be moved to separate JSON files and downloaded by Trizbort.io as necessary.
This isn't a bug report or a feature request. More of a general inquiry or an RFC (in fact, I'd love to debate some implementation details).
I was wondering what your stance on i18n (internationalization. In this instance, a focus on localization specifically) was.
Is this something you'd like to see supported in the foreseeable future?
I currently work on a set of simple i18n libraries for both Go and TypeScript (aptly dubbed Rosetta-Go and Rosetta-TS, respectively).
Both libraries follow the Chrome i18n API (just the basics, so far. No placeholder support, yet).
In its most basic incarnation there's a locales
directory. Inside that locales
directory are folders named for language shortcodes (en
, fr
, de
, etc. So far, no support for country-specific shortcodes). Inside each of these folders is a messages.json
file that adheres to the following basic pattern (where "new_map_title" and "new_map_text" are unique keys, and the contents of the "message" fields the language-specific display text):
{
"new_map_title": {
"message": "New map"
},
"new_map_text": {
"message": "This will erase all editor contents. Proceed?"
}
}
To quickly switch between languages in the browser, the user may provide a lang
argument (i. e. www.trizbort.io/app/index.html?lang=fr
— or www.trizbort.io/app/index.html?map=hobbit&lang=fr
, to load a new map while also switching the language to French).
If a language code is not recognized, the application will launch with the default fallback language (English, for Trizbort) instead. Although here one may also consider checking the browser language (window.navigator.language
) against the array of supported languages.
Both i18n libraries will provide a GetMessage(key: string)
method to place a translation.
The translation specific code for the screenshots below looks as follows:
actionNewMap() {
new Window(i18n.getMessage("new_map_title"), i18n.getMessage("new_map_text"), () => {
// OK
App.map = new Map();
Dispatcher.notify(AppEvent.Load, null);
}, () => {
// Cancel
});
}
The beauty of utilizing Chrome i18n lies in its simplicity, as well as the compatibility with most online translation providers like Transifex or Crowdin.
Screenshots: A first WIP implementation running in my fork.
The Trizbort App allows to export as PDF.
It would be very useful to have this option in trizbort.io
This creates a smaller file than png.
It also prevents the text from blurring when zooming in or printing
TextAdventure.js cartridges allow for (portable) items and fixed scenery. Trizbort.io has a switch for actors, items and scenery. The TextAdventure.js code generator must export objects as appropriate. At the moment, all objects are exported as portable items.
Furthermore, the TextAdventure.js code generator only exports the top-level items in the object hierarchy in each room. TextAdventure.js appears to allow for multiple levels of items, and the code generator should export accordingly.
The dark room flag is exported for:
Dark room flag is not exported for:
Dark rooms must be exported for all languages.
Currently panning is done by holding down the mouse wheel. Not every mouse has a clickable mouse wheel.
Create a room and click on it. The room popup will appear. Press the delete key to delete it, and the room will go away.
Actual:
The room popup remains on screen; you have to click something else to make it go away
Expected:
Deleting a room should hide its popup
When adding an object / scene / description the value remains not retained in the field. It actually even vanished immediately when adding a new object. The values ARE though in an exported JSON file
To make it easier for other applications to consume Trizbort.io map data, a YAML export is useful (beyond the default JSON format used to save maps).
To reproduce:
Actual:
The popup appears on mousedown, but disappears on drag.
Expected:
Tested on Chrome 81 and Firefox 76 on macOS Catalina 10.15.4
In Chrome 81 for Android 10 and in Safari for iOS 13.4, there's no way to get the room connector circles to appear. They appear on hover, but mobile doesn't have hover.
When you tap on a room, you see the resize squares, but not the room connectors.
I can think of two ways to address this.
Trizbort.io must offer ZIL code generation. ZIL specification: https://archive.org/details/Learning_ZIL_Steven_Eric_Meretzky_1995/page/n1
You can use shift-arrow to create a room in a direction. But there's no shortcut to create a room up or down from the current room.
Perhaps shift-U or shift-D?
If you refresh or navigate away, the current map is lost. (There's a beforeunload
handler to protect you, which helps somewhat.)
It would be better if the current map state were stored in IndexedDB or local storage. Then you could refresh the page or navigate away and come back later, and the map would still be there waiting for you.
Curious.
Do you currently accept PRs for Trizbort.io?
I found a couple bugs I fixed/am fixing in my fork.
It is currently possible to (inadvertently) close the Trizbort window or tab, losing unsaved work. Trizbort.io should ask for confirmation before closing the tab, but only where there is unsaved work.
Ink is a free platform to create interactive story.
The way to go is totally different than the one I knew before, as it has a philosophy of no graph of choice but more a multitude of choice with conditions.
It is exported in json. I don't have a json (as I am at work) but the understandable way (in Inky the editor)
PSEUDO CODE, I am not sure at all of what I write
CONST locationA = "Super Location A"
CONST locationB = "loc b"
VAR currentLocation = locationA
->locationA
===Map
The map is here: you can see you can go
{ currentLocation:
- locationA:
+ East (to {locationB}) ->locationBKnot
- locationB:
+ West (to {locationA}) ->locationAKnot
}
+ Stay at {currentLocation}
=== locationAKnot
~ currentLocation = locationA
Location A text and special feature that the writer can edit as he wants
+ See the map -> Map
=== locationBKnot
~ currentLocation = locationB
Location B text and special feature that the writer can edit as he wants
+ See the map -> Map
I will add the json directly responsible for seeing this in the editor when I will have time
It will display something like
Location A text and special feature that the writer can edit as he wants
CHOICE : See the map
Click
The map is here: you can see you can go
CHOICE: East (to loc b)
Click
Location B text and special feature that the writer can edit as he wants
CHOICE : See the map
Click
The map is here: you can see you can go
CHOICE: West (to Super Location A)
Click
Location A text and special feature that the writer can edit as he wants
In quest, we can let the player see the map. But with the current export, it does not show sufficient information
<attr name="grid_label">Toaddaz</attr>
put the name of the room to display to the player.
(Like the other two, i create separated issue to keep clear between functionnality, and I would be glad to do the functionnality, if it is not something I overlooked)
Create a room, click on it, and press backspace. (On macOS keyboards, this key is labeled "delete," but it's still keyCode 8, not the delete keyCode 46, which you can type by holding the "fn" key while you press "delete".)
Desired: Backspace should delete the selected room
Actual: On Firefox 76 for macOS Catalina 10.15.4, the backspace key navigates back; you see the beforeunload
popup. (On Chrome 81, nothing happens when you press backspace.)
A user reports that dragging and dropping objects to create containment relationships does not work on Chrome.
"[...] saving a map gives me a .json file that won’t open again. It shows up in the load dialog but is not selectable. I’m on Mac btw." See forum thread.
Supported formats must be PNG, JPG, SVG
"I can’t seem to export to Inform 7. Also saving a map gives me a .json file that won’t open again. It shows up in the load dialog but is not selectable. I’m on Mac btw."
Users should be able to select a custom font from a pre-built list. This is especially important for maps in the hand-drawn style.
I have been thinking about developing an adventuring system based on the 1984 game Zyll's user interface. Zyll requires no typing, and still delivers a fun adventuring experience, albeit with some D&D features added:
It's a WIP called "MiniZyll" as it would offer "mini" adventures that could be dropped into a larger website. On the other hand, it might also be a full-screen thing. There would be multiple adventures implemented as resources to be loaded into the base system.
Trizbort may be a nice tool to create resources files for "MiniZyll": It allows map creation, connections, and objects. The original Zyll is heavy on locked doors, so these will need to be added to Trizbort. There are also several monsters, so Trizbort would have to add features for that. The idea here is not to change Trizbort too much - it should not be a tool geared towards use with MiniZyll - but to add a couple of extra fields in the .trizbort files that MiniZyll could interpret in its own way.
I also thought that I'd like to make MiniZyll reminiscent of the first text adventures with static graphics, like Level 9's "Jewels of Darkness" or Interplay's "Mindshadow" and "Tracer Saunction". For MiniZyll, screens would be drawn in SVG, with as few polygons as possible. I considered making an SVG draw routine that would draw the images as slowly as the original games, and visibly color them in, but that will probably get old fast. Still, to draw room images for a 100-room adventure would require keeping to images simple anyway. I thought about keeping a CGA color palette, but again, probably a bad idea. It turns out SVG files get big fast, so for detailed graphics, it would be better to convert them to PNG format after all.
Since Zyll requires no typing, just button-clicking, it is also a good candidate for localizable games. Making a text parser in anything beyond English is hard; translating room descriptions is simple.
Two parameters that are not taken into account in the export to quest.
Like the other issue, I can do it, if you think it's interesting. Else, I want to know why you're not interested.
To reproduce:
Zoom out a few times. Create a room near the edge of the screen. Zoom in a few times, so your room is no longer visible. Scroll with your touch pad or mouse wheel.
Expected:
The canvas should scroll.
Actual:
Scrolling with a touch pad or mouse wheel zooms in and out.
Here's an odd bug I spotted last weekend and have been unable to resolve thus far.
After successfully importing a Trizbort map for the first time, the Trizbort import option essentially becomes a no-op. The import dialog still pops up but upon confirming the import, nothing happens. No error is being logged either.
Given I call the same importMap(text: string)
method in my desktop app specific implementation, I don't think the method itself is where the issue originates from.
It remotely feels as if the inputImport
event listener is silently removed, but I cannot figure out why that would be the case. No such issue arises with inputLoad
.
Hello, I'm not familiar at all with JAMstack, but when I run grunt watch, and I open local index.html, it can't load any ressources. (svg, css, js/ts)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///mnt/myfilePath/trizbort/app. (Reason: CORS request not http).
Thanks !
Click on a room. Press Enter to open its detail panel, and type a new name for the room.
There's now no keyboard shortcut to close the detail panel and select the current room. I suggest that Esc could do that (though I see that Esc is currently used for "Unselect All").
This would be useful, together with #54, to allow you to create an entire map with just the keyboard.
You can use shift-arrow to create a room in the north/south/east/west directions, and you can use PgUp PgDn Home End to create rooms northeast/southeast/northwest/southwest.
My macOS keyboard doesn't have PgUp PgDn Home End keys; I can type Fn-Up for PgUp, Fn-Down for PgDn, Fn-Left for Home and Fn-Right for End.
But Shift-Fn-Right for Southwest is, uh, very confusing.
It would be great if there were an alternate keyboard shortcut for this. I suggest shift-N = north, shift-N-E = northeast, etc.
But even just using the numbers as they appear on a numeric keypad would be an improvement, e.g. shift-8 = north, shift-9 = northeast.
I wish there were a way to undo changes, e.g. deleting a room.
It is not likely that users are aware that it is actually possible to create a hierarchy of objects inside a room. A container can contain other objects, which can in turn be containers with objects inside, and so on. Whenever more than one object is created, any object box can be dragged and positioned in the object tree. Some of the code generators actually use the object tree to export code for complex object hierarchies.
There should be a mini help system in the "Objects" tab that explains this, or users will never know about this functionality.
Like for the gridborder parameter, I would like the up and down direction to be exported to Quest.
I saw how to specify it in trizbord, but when I exported, the cardinal indication was the thing exported (east / north / west / south)
Like for the other option, I could dig in the code to alter it and push a merge request, if you're interested.
New users are confronted with a blank map and no idea what to do. There should be a little toast at the bottom of the screen that suggests that they click the room icon to create their first room. Or even a more elaborate tutorial system.
Advanced users should be able to turn off the tutorial system, and their preference should be saved in the browser session.
Hi,
I've just stumbled across Trizbort and it's great - I really wanna use it to map out my next game.
However, it seems the current build has an issue where, after opening the properties side-bar pane - an additional "gap" appears.
CORRECTION: This only happens if you Double-Click an item (using the ellipse [...] button is ok)
Unfortunately, it's not just aesthetically annoying - as this gap also throws off the mouse position for clicking and using the editor (making it effectively unusable). 😥
(It's fine when it first loads - it only seems to happen after opening the properties pane)
Tested in: Brave, Edge "Chromium"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.