Tuesday, February 27, 2024

web browser

I've released the other games in itch.io to be playable in as many platforms as possible. This also gives people an easy way to test the game before downloading it. So, the stacker wasn't going to be different. This entry is about that step.

Why?
Because making an EXE means only Windows user can test it. However, making it html/browser playable lets any person with a computer or with a phone play it.

What is different? And what relation has with the blog?
The HTML zip is not runnable within browsers without extra programs. This helps to avoid people expecting to do so out of a lack of knowledge. The relation with the blog is like I explained before, for people to try before installing (besides exporting it for other system, deletes the preset of the
vita for said project, and you have to add it again. So, another heads up from this blog to you)

With that out of the way, let's start with the process. There are a few ways to do it:
* The official documentation is this https://docs.godotengine.org/en/3.5/tutorials/export/exporting_for_web.html
But after googling a bit, you can find three easier methods:

- Through Godot's web editor https://editor.godotengine.org/releases/latest/

- Through a program working as web server, example with PHP here: https://www.youtube.com/watch?v=foXI2uJMEhQ

- Through itch.io (it requires you to make an account, but as I said before, I happen to have one from the previous ones). I'm going to use this as an aid: https://www.youtube.com/watch?v=6DVJIlYr7QE

> I am going to put here a few pictures, and bullet points, about using godot to make the game playable throught itch.io website. Take this as a way to get visibility for the game if you need a greedy reason.

First, we need to export the game, obviously:

Be sure to go to "resources", and select "Export all resources in the project"


Be sure to go to "Script", and select "Compiled Bytecode (Faster Loading)".


Be sure to press the "Export all" button when you're ready, you don't want the folder missing important files of your game.


Now that you have a folder with your files, it should look like this:


Be sure to name your main HTML as "index.html" or it won't run.

After that, zip the whole folder, and go to itch.io for the upload (don't forget to do it with the "playable in browser" option).


Don't forget to update your project's "viewport dimensions" (with the vita's resolution, in our case).

Let the orientation as "default" (In our case being 'rotated' from source it could mess up with some automatic rotation in phones and tablets).

I've also selected "full screen" "scroll bars" and "mobile friendly" to avoid people from being able to play in some screens sizes.


The next step should be released it, but you'll find the "Public" option grayed out. Don't worry, you must save it first as
a draft. You can test it works, and/or directly go back and select public and save after that.


Boom! It's done! https://bunkai.itch.io/stacker-for-vita-browser

Next entry is about this stacker game, and how it was done, with code and everything. Stay tuned!

No comments:

Post a Comment