Skip to content

Commit

Permalink
Version 8.8 (#246)
Browse files Browse the repository at this point in the history
* Add information for uploadToItch.md (#235)

* Add information for uploadToItch.md

* Update docs/docs/faq/uploadToItch.md

Co-authored-by: Sean S. LeBlanc <sean.s.leblanc@gmail.com>

* Fix typos in docs/docs/faq/uploadToItch.md

Co-authored-by: Sean S. LeBlanc <sean.s.leblanc@gmail.com>

* Add closing tag for <img> to uploadToItch.md

Fix React Syntax Error : Expected corresponding JSX closing tag for <img>

---------

Co-authored-by: Sean S. LeBlanc <sean.s.leblanc@gmail.com>

* fix ClearCache tile memory leak (#232)

* fix off-by-one allocating

given these blocks:

4: occupied
5: occupied
6: undefined

and this call:
`_allocate({ start: 4, max: 2 })`

you would expect the allocation to fail and return null.
before this commit, this situation instead would allocate block 6

I don't know if this had any adverse effects; I just noticed it while
working on related stuff

* make sure ClearCache() deletes tile memory

fixes #230

* fix: Duplicate room button does not copy everything #185 (#228)

* fix: Duplicate room button does not copy everything #185

* use copied items array instead of slice

---------

Co-authored-by: Adam Le Doux <adamrossledoux@gmail.com>

* brazilian portuguese translation

---------

Co-authored-by: vaasut <vaasut1@gmail.com>
Co-authored-by: Sean S. LeBlanc <sean.s.leblanc@gmail.com>
Co-authored-by: pancelor <pancelor@gmail.com>
Co-authored-by: fran <mojoz0101@gmail.com>
  • Loading branch information
5 people authored Dec 19, 2023
1 parent cf9a733 commit 8691e84
Show file tree
Hide file tree
Showing 18 changed files with 586 additions and 336 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 8.8

- added brazilian portuguese translations by marco
- add information to "upload to itch" documentation page
- hook up localization to tune and blip tools
- fix: copy room didn't copy everything
- fix: memory leak in cache clearing
- fix: localization was broken for room tool

## 8.7

- fix: Fix y-coordinate typo in createExitData (Pirijuamps)
Expand Down
10 changes: 10 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
- @david-c14 - Contributor
- Elkie - Contributor
- equa (@equaa) - Contributor
- @frojo - Contributor
- max - Contributor
- @pancelor - Contributor
- Pirijuamps - Contributor
- @ragzouken - Contributor
- Samuel Fine - Contributor
- Sean S. LeBlanc - Contributor
- @zachThePerson - Contributor

## Documentation

- Adam Le Doux
- Claire Morwood
- Sean S. Le Blanc
- @vaasut

## Icons

- Adam Le Doux
Expand All @@ -39,6 +48,7 @@
- Game Makers Iceland - Icelandic translation
- Kai Werder - German translation
- leonid.codes - Ukrainian translation
- Marco - Brazilian Portuguese translation
- Marina Díez - Spanish and Italian translation
- Mateusz Teklak - Polish translation
- Matthias Löwe - German translation
Expand Down
537 changes: 286 additions & 251 deletions dev/resources/localization.tsv

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions docs/docs/faq/uploadToItch.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
---
tags: [stub]
---

# Uploading a Bitsy game to Itch.io

:::info This page is a stub
You can improve the docs by [expanding it](../contributing).
:::
Before you upload your game to itch.io, make sure you have the following.

* An itch.io account
* Your bitsy game downloaded. If your bitsy game requires more than the html file, put all relevant files into a folder. Then rename the main html file to index.html, and zip the folder.
* A cover image
* Some screenshots of your game

1. Sign in to your [itch.io](https://itch.io) account.

2. Go to your [dashboard](https://itch.io/dashboard) and click on [Create New Project](https://itch.io/game/new).

3. Fill out the fields for your game, and upload your game file, cover image, and screenshots. Bitsy games are executable in the web browser, but you can also set it to be downloadable if you prefer. You can specify the viewport dimensions; 512x512px is a good option for many bitsy games.

4. Save the game as a draft and view the itch.io page for your game. You can make any style changes using the edit theme button. If you want to edit the html for the game page, you can do this back on your project dashboard.

5. There are many other options and settings to explore from your game's dashbaord. Familiarize yourself with these and make any necessary changes before uploading your game.
<img width="963" alt="editproject_tabs" src="https://github.com/le-doux/bitsy/assets/15849522/26750efe-2cc6-4cfe-aa01-a02e2b594842"/>

6. When you're ready, you can change the access settings for your game from a draft to public.
13 changes: 7 additions & 6 deletions editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<input type="checkbox" value="findPanel" id="findCheck" onclick="togglePanelAnimated(event);" autocomplete="off" />
<label title="show / hide find window" for="findCheck">
<span class="bitsy_icon icon_space_right">search</span>
<span>find</span> <!-- todo : localize -->
<span class="localize find_tool">find</span>
</label>

<input type="checkbox" value="inventoryPanel" id="inventoryCheck" onclick="togglePanelAnimated(event);" autocomplete="off" checked/>
Expand Down Expand Up @@ -637,7 +637,9 @@
<div class="bitsy-card-titlebar">
<span class="bitsy_icon">search</span>

<span class="bitsy-card-title" title="find window" onmousedown="grabCard(event);">find</span> <!-- todo : localize -->
<span class="bitsy-card-title" title="find window" onmousedown="grabCard(event);">
<span class="localize find_tool">find</span>
</span>

<button title="show about page for find" onclick="showAbout('./tools/find', 'findPanel');">
<span class="bitsy_icon">help</span>
Expand Down Expand Up @@ -1096,11 +1098,10 @@
</div>
<div style="margin-top: 5px;">
<span class="bitsy_icon">text_edit</span>
<!-- todo : localize -->
<span title="textbox graphics mode">text mode:</span>
<span title="textbox graphics mode" class="localize setting_text_mode">text mode</span>:
<select id="textModeSelect" title="select resolution of textbox pixels" onchange="onChangeTextMode(event);">
<option value="TXT_HIREZ" title="2x pixel resolution">default</option>
<option value="TXT_LOREZ" title="1x pixel resolution">chunky</option>
<option value="TXT_HIREZ" title="2x pixel resolution" class="localize setting_text_hirez">default</option>
<option value="TXT_LOREZ" title="1x pixel resolution" class="localize setting_text_lorez">chunky</option>
</select>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions editor/script/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ function makeToolCard(processName, initFunction) {

var titleSpan = document.createElement("span");
titleSpan.classList.add("bitsy-card-title");
titleSpan.innerText = card.name;
titleSpan.innerText = card.name();
titleSpan.onmousedown = function(event) {
grabCard(event);
};
titlebarDiv.appendChild(titleSpan);

titlebarDiv.appendChild(createButtonElement({
icon: "help",
description: "show about page for " + card.name,
description: "show about page for " + card.name(),
onclick: function() {
showAbout(card.aboutPage, cardDiv.id);
}
Expand All @@ -58,7 +58,7 @@ function makeToolCard(processName, initFunction) {
card.resetTitlebar = function() {
titleIconSpan.innerHTML = "";
titleIconSpan.appendChild(createIconElement(card.icon));
titleSpan.innerText = card.name;
titleSpan.innerText = card.name();
};

var mainDiv = document.createElement("div");
Expand Down Expand Up @@ -122,7 +122,7 @@ function makeToolCard(processName, initFunction) {
.insertBefore(
createToggleElement({
icon: card.icon,
text: card.name,
text: card.name(),
id: card.id + "Check",
value: card.id + "Panel",
style: "bitsy-tool-toggle",
Expand Down
21 changes: 20 additions & 1 deletion editor/script/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function reloadDialogUI() {
}

paintDialogWidget = dialogTool.CreateWidget(
"dialog",
localization.GetStringOrFallback("dialog_tool_name", "dialog"),
"paintPanel",
obj.dlg,
true,
Expand Down Expand Up @@ -3097,6 +3097,25 @@ function on_change_language_inner(language) {
paintTool.reloadDrawing(); // hacky to do this twice
}

// hack : manually update tool menus & titles
if (roomTool) {
roomTool.resetTitlebar();
roomTool.menu.update();
document.getElementById(roomTool.id + "CheckLabelText").innerText = roomTool.name();
}

if (blipTool) {
blipTool.resetTitlebar();
blipTool.menu.update();
document.getElementById(blipTool.id + "CheckLabelText").innerText = blipTool.name();
}

if (tuneTool) {
tuneTool.resetTitlebar();
tuneTool.menu.update();
document.getElementById(tuneTool.id + "CheckLabelText").innerText = tuneTool.name();
}

refreshGameData();
}

Expand Down
7 changes: 1 addition & 6 deletions editor/script/engine/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,7 @@ this.GetFrameCount = function(drawingId) {
// todo : forceReset option is hacky?
this.ClearCache = function(forceReset) {
if (forceReset === undefined || forceReset === true) {
for (var cacheId in drawingCache.render) {
var tiles = drawingCache.render[cacheId];
for (var i = 0; i < tiles.length; i++) {
bitsy.delete(tiles[i]);
}
}
bitsy.deleteAllTiles();
}

drawingCache.render = {};
Expand Down
2 changes: 1 addition & 1 deletion editor/script/engine/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// is this the right place for this to live?
var version = {
major: 8, // major changes
minor: 7, // smaller changes
minor: 8, // smaller changes
devBuildPhase: "RELEASE",
};
function getEngineVersion() {
Expand Down
10 changes: 5 additions & 5 deletions editor/script/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function FindTool(options) {
icon: "dialog",
getIdList: function() { return [titleDialogId].concat(sortedDialogIdList()); },
getCategoryName: function() {
return localization.GetStringOrFallback("dialog_label", "dialog");
return localization.GetStringOrFallback("dialog_tool_name", "dialog");
},
getItemName: function(id) {
return dialog[id].name;
Expand All @@ -204,7 +204,7 @@ function FindTool(options) {
return id;
}
else {
return localization.GetStringOrFallback("dialog_label", "dialog") + " " + id;
return localization.GetStringOrFallback("dialog_tool_name", "dialog") + " " + id;
}
},
isItemSelected: function(id) {
Expand All @@ -219,7 +219,7 @@ function FindTool(options) {
id: "TUNE",
icon: "tune",
getIdList: function() { return sortedBase36IdList(tune); },
getCategoryName: function() { return "tune"; },
getCategoryName: function() { return localization.GetStringOrFallback("tune_tool", "tune"); },
getItemName: function(id) { return (id && tune[id]) ? tune[id].name : ""; },
getItemDescription: function(id, short) {
if (short) {
Expand Down Expand Up @@ -248,7 +248,7 @@ function FindTool(options) {
id: "BLIP",
icon: "blip",
getIdList: function() { return sortedBase36IdList(blip); },
getCategoryName: function() { return "blip"; },
getCategoryName: function() { return localization.GetStringOrFallback("blip_sfx", "blip"); },
getItemName: function(id) { return (id && blip[id]) ? blip[id].name : ""; },
getItemDescription: function(id, short) {
if (short) {
Expand Down Expand Up @@ -300,7 +300,7 @@ function FindTool(options) {

var filterTabList = [
{
text: "all", // todo : localize
text: localization.GetStringOrFallback("find_all", "all"),
value: "ALL",
icon: "game_data",
},
Expand Down
8 changes: 4 additions & 4 deletions editor/script/generated/resources.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions editor/script/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function createLabelElement(options) {
if (options.text) {
var textSpan = document.createElement("span");
textSpan.innerText = options.text;

if (options.id) {
textSpan.id = options.id + "Text";
}

label.appendChild(textSpan);
}

Expand All @@ -40,6 +45,10 @@ function createLabelElement(options) {
label.setAttribute("for", options.for);
}

if (options.id) {
label.id = options.id;
}

return label;
}

Expand Down Expand Up @@ -201,6 +210,7 @@ function createToggleElement(options) {

var toggleLabel = createLabelElement({
icon: options.icon,
id: options.id + "Label",
text: options.text,
for: checkboxInput.id,
// style: "button",
Expand Down
11 changes: 10 additions & 1 deletion editor/script/system/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ function BitsySystem(name) {
count--;
}

if (memory.blocks[next] != undefined) {
if (count == 0) {
// couldn't find any available block
return null;
}
Expand Down Expand Up @@ -637,6 +637,15 @@ function BitsySystem(name) {
self._free(tile);
};

this.deleteAllTiles = function() {
if (tilePoolStart != null) {
for (var i = 0; i < tilePoolSize; i++) {
var tile = tilePoolStart + i;
this.delete(tile);
}
}
};

this.fill = function(block, value) {
var len = memory.blocks[block].length;
for (var i = 0; i < len; i++) {
Expand Down
17 changes: 11 additions & 6 deletions editor/script/tools/blip.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ function makeBlipTile(soundPlayer, blipId, invert) {
function makeBlipTool() {
return makeToolCard("blip", function(tool) {
tool.id = "blip";
tool.name = "blip-o-matic";

// todo : how do I feel about these being functions? should I rename the property?
tool.name = function() {
return localization.GetStringOrFallback("blip_tool", "blip-o-matic");
};

tool.icon = "blip";
tool.size = "s";
tool.data = "BLIP";
Expand Down Expand Up @@ -376,7 +381,7 @@ function makeBlipTool() {
tool.menu.push({
control: "button",
icon: "play",
text: "play",
text: localization.GetStringOrFallback("play_game", "play"),
description: "play blip",
onclick : function(e) {
tool.soundPlayer.playBlip(curBlip);
Expand All @@ -388,7 +393,7 @@ function makeBlipTool() {
tool.menu.push({
control: "label",
icon: "tune",
text: "pitch",
text: localization.GetStringOrFallback("blip_pitch", "pitch"),
description: "adjust the pitch"
});
tool.menu.push({
Expand Down Expand Up @@ -425,7 +430,7 @@ function makeBlipTool() {
tool.menu.push({
control: "label",
icon: "play",
text: "length",
text: localization.GetStringOrFallback("general_length", "length"),
description: "adjust the total play time (duration)"
});
tool.menu.push({
Expand Down Expand Up @@ -458,7 +463,7 @@ function makeBlipTool() {
tool.menu.push({
control: "label",
icon: "tempo_fast",
text: "speed",
text: localization.GetStringOrFallback("general_speed", "speed"),
description: "adjust the time between each pitch change"
});
tool.menu.push({
Expand Down Expand Up @@ -492,7 +497,7 @@ function makeBlipTool() {
tool.menu.push({
control: "label",
icon: "blip",
text: "generator",
text: localization.GetStringOrFallback("blip_generator", "generator"),
description: "type of sound to generate when adding blips (" + blipNames[curGenerator] + ": " + blipDescriptions[curGenerator] + ")"
});

Expand Down
Loading

0 comments on commit 8691e84

Please sign in to comment.