About 'Publish Your WebGL Game'!

In this video (objectives)…

  1. Adjust our screen aspect ratio and scaling.
  2. Create a WebGL build.
  3. Zip our build foler and upload to sharemygame.com.
  4. Celebrate, you've published a game!

After watching (learning outcomes)…

Create a WebGL build and publish online.

(Unique Video Reference: 15_TX_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Hey there Rick! Loving the Unity 2D course so far, but I seem to have hit a snag when trying to create a WebGL build for my text adventure game. My apologies in advance if this isn’t the appropriate place to ask a question like this. I have followed the video’s instructions numerous times now (as well as other videos and instructions I’ve tried from around the web) but am always getting the same result when I attempt to make a WebGL build.

What will happen is Unity will say it has successfully built the game and will open it on my default browser (chrome), where the game will appear in the player but will not actually start. It just doesn’t initiate the void Start method in my code at all. All that appears in the player is my UI with a bunch of placeholder text; the game will not start, and does not begin in my first game “area” as it does when I play it on Unity. I have also tried opening it in Firefox (I heard chrome doesn’t like WebGL too much), as well as trying to upload it to sharemygame, but it didn’t make a difference.

While I have tried to read documentation and “answers” from around the web, I am still very new to coding and Unity and often get lost and confused by the amount of jargon I don’t understand (MIME Types, htaccess files, etc.). This has been pretty discouraging for me. I have been trying to look up answers for the past few days, but to no avail. I really want to publish this so my family and friends can try it out, this will be the first game I will have published online so I was very excited to show it off! Any help or direction you could give me would be greatly appreciated!!

Other side note info that may or may not be relevant: In the build folder it is creating a chrome HTML file instead of a basic HTML file, not sure if this would impact anything I was simply looking for anything out of the ordinary.

Hey Race,

Does your game work when you are in the editor and click play? I noticed that as part of our previous video we commented out a line of code to illustrate a point, but didn’t uncomment it again… if you followed what I was doing then perhaps that line is still commented. It shouldn’t be commented out.

Give that a look and see if that helps and let me know.

Yay i made it :smile:

Here is my First Game, i’ d like to have a feedback from you guys! And please be honest. I know to it’s not perfect :wink:.

http://www.sharemygame.com/share/d224227f-9c86-493b-b2d7-ee4de898ce4d

5 Likes

Hey Rick,

That wasn’t the issue, but I did manage to get it to work. When I renamed my scene from “Sample Scene” I think it caused some changes in how I was supposed to make the build. Basically, there were two checkboxes, one labeled “Scene/Sample Scene” and one labeled “Game” (this is what I renamed my scene to). I was checking both boxes and it was causing problems, so I unchecked the Sample Scene checkbox and tried to build it with only the Game scene and it worked! I am not sure how any of the changes I made worked out, but they did and I’m just going to roll with it for now until I figure out what really happened!

In case anyone wants to play a nerdy anime text adventure where I got way too into the storytelling and not enough into making loops, here is my link! I’ve already found a few errors and gotten some feedback, but any other critiques would be appreciated. :slight_smile:

This one is a larger resolution: http://www.sharemygame.com/share/c71eacfb-9ae5-4e35-9509-89876eb3db7b

And this one is the scaled down resolution: http://www.sharemygame.com/share/e3ab15f6-726b-4f72-9acd-a335a26f6c26

Glad that you got it to work Race!

1 Like

Here is my first text adventure game. It’s called The Orc Slayer. I’d appreciate it if you try it and give me some feedback about the story and the UI. Enjoy!

http://www.sharemygame.com/share/6e0f7d74-bbdd-4181-b37c-c9e2d2ce1fcb

3 Likes

Played your game and I died :joy:

By the way nice touch with the music.

2 Likes

Today I’m very bad at playing games :joy::joy::joy:

1 Like

Hello, so here is my first try out :smiley:
Marvel’s Battle of the Gods

Grtz,
Sonny

Good old Resident Evil :blush:
Thanks for playing!

1 Like

i liked it :wink: it was a good story and i liked the UI with the curly things around it. Good Job :smiley:

http://www.sharemygame.com/share/a7059513-d939-4e31-81b5-3efb49d800fc

made a silly game ^-^
its a short cave crawl
please tell me what you think

I liked the story and now i get the title :smiley:
The loops were convenienet, so you don’t have to start all over again!

1 Like

Best option ever
Cattura

I always die in Text101 games :joy:

2 Likes

Hello all :slight_smile: First time using unity, coding, or attempting to make a game… really excited to get at least a small sample out there. I’m hoping to add more to this later to share with friends, but this was a really satisfying first project.

Looking forward to getting into some simple animations… eventually \o/

http://www.sharemygame.com/share/a7d77588-4577-4808-8d2f-10b574409fc1

Hi Guys Im totally green in programming and this is my first game done following the course. please let me know whats wrong with it what can i improve maybe some tips and pointers as to what to do as well everything is welcome. and here is my very short game if you guys like it i might expand it and maybe add some variables as well. Please bare in mind English is not my native language so thank you in advance and here is my game please test it out its short so it wont take to long :slight_smile:

Left Behind

1 Like

Here it is, my first game.

I started making this when the course was still about Unity 4.7, and by the time i was ready to Build it, the course had already changed.

So I did not bother to convert my 1500 lines of code (incl. white spaces) into the new version. Mainly because I had already spend too much time on one project and kinda just want to get to the next one. But I was amazed how all of that code could have been writen in 100 lines. (minus the couple extra functionalitys I build into the game). Guess that shows that “Work smart, not hard” is a core prinicpal in programming.

I’m aware that there are some text errors and that the headlines are low def, but as I said, I’m exited, and want to get on to the next one.

Hope you enjoy my game, I did making it.

http://www.sharemygame.com/share/be670f6e-318e-41bc-ad37-4fe03dfbd59a

1 Like

I shared this game in another post, but I’ll share it again here. Had a blast making this game. Hope it’s interesting to play. :slight_smile:

1 Like

http://www.sharemygame.com/share/70063ca8-bc3e-4b50-82ec-28d3f9bb2c35

Here’s the link to my game.

Privacy & Terms