le-doux / bitsy Goto Github PK
View Code? Open in Web Editor NEWa little engine for little games, worlds, and stories
Home Page: https://bitsy.org
License: MIT License
a little engine for little games, worlds, and stories
Home Page: https://bitsy.org
License: MIT License
Hey, found a little bug in key-handling behaviour while working on some hack stuff.
Repro steps:
Result: avatar automatically walks in the direction pressed as if you were holding the key down
Poked around for a few minutes and cause of the bug seems to be that the "r" from the reset gets added to the key list, but the up event is missed (confirm dialog is open at that point; bug fixes itself if you press "r" again while game is running). Could probably be fixed by preventing the "r" from getting added and/or clearing the list on reset.
One of the most common problems we have to help people with is that bitsy stops functioning if you delete room 0. Despite that I just thought bitsy was broken for a few days before realising it happened to me.
I'm presuming that it would be a very small change to make Bitsy find an arbitrary room rather than specifically room 0, and it would help a lot of people
Similarly if you delete a sprite the sprite still exists in the Find Drawing window. Then, if you click on a deleted sprite in the Find Drawing window and then click the duplicate button, the deleted sprite is 'duplicated' instead of the sprite that is actually open in the Sprite window.
Would like to be able to change the colors of the editor in the Settings section and/or select from a couple of different themes.
dragging on the sprite editor causes page elements to be selected
after dragging from the sprite editor to outside it, then back inside, no more pixels will be placed
I'm surprised no one else has requested this. The number of times I accidentally move an exit instead of an entrance, or accidentally move the avatar into a different room. An undo button would be amazing.
I know that Bitsy is supposed to be an engine where the goal is to limit you and let creativity shine, but I can't help but feel it's missing a couple of really small features that would still fit with that goal.
The features would be:
These have been implemented as "hacks," but I feel like it's really difficult to make something interactive without them.
As a programmer who has already hacked into Bitsy quite a lot with my own games, I would happily work on these features myself (if possible, I haven't looked too deeply into the source yet) I just want to post here to make sure it fits with the future plans of Bitsy before I work on it.
Some may stumble across this before they stumble across it on Itch.io, it would be nice if it had a brief introduction or even just a link to Itch.io.
It came up in discussion that ‘shuffle’ lists now actually shuffle their list items instead of randomly selecting one. This is nice, makes dialogue a little more natural, and opens up new gameplay opportunities.
BUT many people were using the shuffle as a RNG in games, which it no longer works for, and there’s no really feasible way to add RNG back into Bitsy without hacks. It would great if there was a list type ‘random’ that had the old shuffle behavior, and just returned a random item.
I think a way to add a remove objects from dialog would be nice. An example use case would be a door where you have to find a key. The door would be a sprite, and have a conditional dialog where
if hasKey
{delete "keyDoor"}
else
"The door is locked, and seems to require a key"
or
if hasIngredients
{spawn "soup, 10, 5, roomName"}
I don't know if the GitHub is a good place ask this, but the discord seems more for the community and less for development so it's the best place I could find. If there is a better place, I will gladly post this there.
Basically I will happily program these features myself, but I want some feedback before I do so that I can implement them in a way that aligns with the goals of the developers.
Questions:
Using the latest version of Chrome on Windows 10. It isn't working at all. :( v4.2
Hmm.. say, 16x16 sprites, that would make porting old spectrum games for example to bitsy environment possible.
In version 6, when I load a game downloaded as .html in an earlier version (saved last week), I just see the default new game room, so the loading seems to have failed.
Looking at the javascript console, I see the following:
bitsy.js:2065 Uncaught TypeError: Cannot read property 'pal' of undefined
at drawRoom (bitsy.js:2065)
at RenderMarkerSelection (room_markers.js:175)
at SelectMarker (room_markers.js:30)
at ResetMarkerList (room_markers.js:142)
at RoomMarkerTool.SetRoom (room_markers.js:109)
at resetGameData (core.js:521)
at newGameDialog (core.js:486)
at HTMLButtonElement.onclick (index.html:167)
The same thing happens when I subsequently start a new game. If I refresh the browser, and then either loading from an .html file or starting a new game works fine.
hey adam! i noticed that 3ec59e3 removed the package.json
which was being used for some electron stuff. would it be possible to add one back in which has just the basic metadata? e.g.:
{
"name": "bitsy",
"version": "6.1.0",
"description": "make tiny games, worlds, and stories",
"author": "Adam Le Doux"
}
idk if there's any intent to publish bitsy as a module, but the presence of a package.json
with the bare minimum allows it to be used more easily with other tooling (e.g. you can use the npm CLI to install a github repository directly, but it still looks for the package.json
)
there is also a license
field, which would be an opportunity to address #5 if one is decided
pretty minor issue but may be confusing for folks who run into it: if you have a room defined in gamedata without a PAL
entry, or a PAL
defined that doesn't actually exist, bitsy will throw errors and fail to render (in both the editor and the exported game).
i noticed it while porting some old gamedata to a newer version of bitsy (guessing palette was optional in earlier versions?), but it can also happen if you're editing gamedata directly (which is currently the only way to delete palettes). it would probably be best to automatically assign the first palette to them in this case to avoid the error.
Swiping up or down will still scroll scroll the parent page before activating any Bitsy controls.
I do not have an Android device handy to test, but can confirm this is broken on iOS Chrome and Safari.
This is (AFAIK) because these browsers do not allow you to prevent the default touch event on the body element.
Borky's solution to this problem is to create a div in JS, inline-styled to be entire viewport and above the game canvas, and attach the eventListener to that. I'm sure there are other solutions too, ofc.
Link to video of current mobile behavior: Note the scrolling in the background and the 'popping' related to the top-bar.
https://www.dropbox.com/s/n0pwoyyti73wdpo/touch_controls.MP4?dl=0
additional notes: https://twitter.com/skodone/status/942019687550017542
When running Bitsy locally, the download game option exports only the game data that usually lives in the <script> section, rather than the fully functional HTML file required to actually run the game, as exported by the web version.
It's not clear whether this is a bug or a feature, however, or if there's a workaround or alternate setting that I've missed.
The data works perfectly when pasted into a game file created by the version on itch.io.
I'm running it in Chrome 65.0.3325.162 (Official Build) (64-bit) for Linux.
Hey, I noticed there's no license... =P
In addition to issue #14, visual editing of greater than or equal to and less than or equal seems to be broken in conditions.
If you create a condition such as "when variable a>=1", as soon as you edit a different sprite and come back to the previous sprite, the condition is changed to "when custom=1". See attached screenshot.
I believe what is happening is when ">=" is chosen, the dialog editor creates the code > =" rather than ">=", which later gets parsed back to a custom expression. For the above example, this is the log in the javascript console:
SERIALIZE ADVANCED DIALOG
editor.js:3555 SERIALIZE DIALOG SPR_0
script.js:1474 CREATE EXPRESSION --- a >= 1
script.js:1474 CREATE EXPRESSION --- a
script.js:1474 CREATE EXPRESSION --- = 1
script.js:1474 CREATE EXPRESSION --- 1
editor.js:3552 SERIALIZE ADVANCED DIALOG
editor.js:3555 SERIALIZE DIALOG SPR_0
and the code window shows:
I'm a cat{
When the code is parsed and the dialog editor repopulated upon changing sprites, the "> =" is not parsed as ">=", and the condition is shown as "custom".
Occasionally, Bitsy seems to be saving HTML files that run fine in the browser, but bug out the editor when imported back in.
Upon importing one of these files, the room window and paint windows show all black, and the game-data shows entirely blank. However, if you open up the html file, and copy the game-
data into the editor, the game is restored without any apparent issues. Saving the game after pasting in the game-data this way then creates a file with double closing script tag after the font-data script, however this new file still cannot be imported back into the editor.
Attached is an example of a bugged game file:
broken.html.zip
Sometimes the editor will add an extra letter to a tile within a room (typically a duplicate letter/number). The changed tile is usually one from the right side of the room.
Has happened both when exporting and when pasting game data into an html file. I've only tested it on chrome, so I'm not sure if it's an issue specific to that browser or not.
after deleting a tile?
Another minor thing:
open new Bitsy session;
paste existing source code into the "game data" window;
open the "find drawing" window;
the avatar displayed in "find drawing" is the default one, not what is defined in the game;
if you change the tab and come back, the right avatar appears.
This can't break anything, of course, but it might confuse some people.
if you have a lot of duplicates it's hard to keep track!
https://itch.io/t/152890/some-bugs-ux-annoyances
from becklespinax
In the map section, there could be a toggle to switch between two modes:
I'm using the editor on Itch.io with their fullscreen mode, so it being an alert forces me out of fullscreen mode. :(
https://itch.io/t/158872/bitsy-v40-bugs (check in thread for details)
When I click "next room" or "previous room" in the rooms panel, and the exits & endings panel is open, that panel doesn't update and still shows an exit from the previously open room. It seems to update properly when I then click "next" and "previous" in it though.
This was confusing to me because I hadn't learned that the exits & endings panel only showed exits and endings of that room instead of throughout the game. Related suggestion about that: it might be nice to put a line of text in the exits & endings panel like "2 exits/endings involving this room" to make that clear and avoid the confusion I had of "where did my exits go? why are they only showing up sometimes?"
Thanks for making Bitsy! I'm really enjoying making a game for the soup bitsy jam! :)
game html is linked in forum post
https://itch.io/t/180560/broken-item-variables-and-invisible-colors
new behavior in v6.1
seems like it should be a tool that can directly add an exit, when it only opens the exits panel
when using touch controls in chrome, an error is thrown every frame on which there is touch input:
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
. it doesn't seem to have any user-facing consequences since bitsy games are responsive and there's nothing to scroll, but it is pretty spammy.
you can fix it by adding touch-action: none;
to the #game
css, which tells it to ignore mobile gestures on the canvas (none of which bitsy uses afaik)
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.