Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Bitsy Game Maker

Make little games, worlds, and stories! · By Adam Le Doux

Start text

A topic by doniguan created 69 days ago Views: 204 Replies: 14
Viewing posts 1 to 3
(+2)

Hi!

Sorry if this question already was here, didn't found something similar, but may be it's my own fault.


I can't understand how to create text in the very beginning of the game, which will appear after the name of game. I saw examples where this happening, but can't find a way to do it in my game.

And the second question - how is better to do lever\button which will open the closed door?


Thanks in advance to all for your help!

(1 edit) (+2)

I believe that the way to do that is to basically make a really long title for your game. You will need to space it accordingly. There may be some hacks to help with that.


For your second question, I like using hacks to move the sprite after the player uses the switch.

(1 edit) (+1)

>make a really long title for your game

Lol, i tried it before writing this post, but didn't work, and tried again after your reply, and on second time it happend just right. But it's taking quite a time to align all lines.

Thank you!


>using hacks to move the sprite after the player uses the switch.

And this I don't understand. How to move sprite? I was thinking about place a exit to similar room on the switch, where door is open, but it's look not very good.

(+2)

Check out the "move a sprite" section within this hack:
"move a sprite: (js "sprite['a'].x = 10;")"

'a' is the sprite's id and then you put where it should move to afterwards (x and y coordinates). I used it in my game Eggway Dreams.

https://github.com/seleb/bitsy-hacks/blob/master/dist/javascript-dialog.js

Deleted 67 days ago

Not sure I understood how it works - I added this function with moving a sprite into the dialog of sprite: (js "sprite['123'].x = 10;"), 

but I just seeing it's as a part of text in dialog itself.

(+1)

You do add the function to the dialogue as you have done, but have you added the hack to your game? You need to copy all of the code from that file and paste it in a <script> tag right before the </head> tag within the html file. You cannot do this within the Bitsy editor itself. I save my script file separately and then paste it in after downloading my data to test. If you test within the Bitsy editor with the hacks added, they will be removed.

An example:

<script>
the hack goes here
</script>
</head>

No,  don't seem it's  working - I am adding script code to the file of game, then creating item in which adding dialog with  code "(js "sprite['a'].x = 10;")", then adding sprite with name "a", launching - nothing happen,  item working as usual item, and  sprite staying at the place.

(+1)

The 'a' is the item's ID, not it's name. You can find the ID in the game data. It will be the top row. In this case, the ID is '0'.
It will look like this:

ITM 0
00000000
10000100
10000010
01111111
01101101
00111011
00000000
00000000
NAME goggles
DLG ITM_0

(+1)

Well, it's getting more clear, but still not working. I downloaded on computer file of game, added this hack and written in dialog this js function with  right ID, then uploaded updated file back in bitsy. Launched game - hack not working - downloaded file again, and saw that code of hack which I copied hadn't saved fully, only commented lines. Guess, it's might be a problem.

(1 edit) (+1)

You cannot run the file in the Bitsy editor. Once you download it and add the hack, you can just double-click the html file and run in Chrome/IE/Safari or any other browser. Bitsy removes extra code like hacks. I save the hacks as a separate file and add them whenever I do tests. Yhankfully, you can add the dialogue code stuff in the Bitsy editor before downloading.

(1 edit) (+1)

Aaaaaand... It's happen! Now it's working. Thank you very much, finally I understood how to do  it.


Btw, as I understood, this tool don't removing sprite from room? It's  only moving it?

And it's working  not only with sprites, but with tilesand items  too, right?

(+1)

Yes, it simply moves the sprite around the room.
I've never tried this code with tiles or items.

But sprites can't be walls, right? If so, how we can use this hack to create closed door which will open after using switch?