Size of game.

Hello, i have one important problem.

The game have more than 30mb of size, this website only admite 30 mb. And I can not make more small the game, exist some form to up the game? or exist some form to create one html for up in other place?


You must have pictures in your game. These need to be hosted online and referenced in the game to display. Pictures take to much mb size.


I just upload it to Deviantart, and then print the link. Imgur works too.


The limit for published games on the site is 20 Mb. Now I come to think about it, I am not sure what the limit is when creating/editing with the web version (the desktop has no limits). You can compress image and sound files to make them smaller, but hosting on another site is probably the best way, as the others said.


How I can show the web image? I'm not seeing the option.
Thanks people for information.


K.V.

You can use HTML.

Example:

Here's the link to your avatar on this site: https://i.imgur.com/4C39XcNb.jpg

To display that image, Print a message with this in it:

<img src=\"https://i.imgur.com/4C39XcNb.jpg\" />

K.V.

You can use inline CSS, too:

<img style=\"width:10%;box-shadow:0 0 14 black;\" src=\"https://i.imgur.com/4C39XcNb.jpg\" />

You can also add alt and title:

<img style=\"width:10%;box-shadow:0 0 14px black;\" src=\"https://i.imgur.com/4C39XcNb.jpg\" alt=\"Image of an avatar.\" title=\"This is an avatar!\" />
Image of an avatar.

K.V.

You can set the background image, as well:

http://docs.textadventures.co.uk/quest/ui-javascript2.html


Basically, you can do anything with images using HTML, CSS, and/or JS.


K.V.

You can also just set it up as an attribute one time, then use that:

player.avatar = "<img src=\"https://i.imgur.com/4C39XcNb.jpg\" />"
msg(player.avatar)

KV, I think you need to use double quotes for HTML attributes (JavaScript is happy either way, but is unusual in that).

ETA: Apparently not true; single quotes are fine.


Thanks to everyone, I don't know about html, css or some lenguage, your help are very good and helpfull.


K.V.

If you post a link to an image you'd like to use in your game, we'll give you the code to use to display that image in Quest.


I switched my examples to double-quotes, escaped with backslashes for Quest.


@ Jofo91:

here's documentation for learning web programming languages: HTML, CSS, JS (JavaScript, NOT to be confused with Java), XML, etc:

https://www.w3schools.com

I'm still extremely green/new/noob though with these languages, but others can help you more with them.


the main programming 'full-bore' languages are:

C++ ( http://www.cplusplus.com ), Java (NOT to be confused with JavaScript / "JS") ( https://docs.oracle.com/javase/tutorial/java/index.html ), and Python ( https://docs.python.org/3/tutorial/index.html )

I can help a bit with these, if anyone is interested


Here is a really good image compressor. To be honest even at 70-80% compressed you still can't tell the difference. :)

 optimizilla dott comm

Anonynn.


I use the images in room, with option of image and one description, i'm trying to put the lines, put i don't know how, i put in start of description, but don't work, and scripts is only scripts yet exist.


K.V.

Can you post your code?


Okay, first you need to go to "add new script." Then it should be in the first section, "show a picture." Just click on that and click OK.
I would use screenshots, but I'm not at my computer right now. Sorry.


KV I try with the codes that people say me here in this forum but I don't know about code, I paste in description but I think i need paste in other place, but I don't know where, i'm new.

Jmmevil54, the problem of this is the image entire copy in game, and i want reduce the size of game, i'm trying other forms that copy more images.


K.V.

1. Click on Code View.

2. Copy the text you see and paste it here.

3. We'll more than likely be able to see what the problem is.


I use the images in room, with option of image and one description, i'm trying to put the lines, put i don't know how, i put in start of description, but don't work, and scripts is only scripts yet exist.

Maybe I'm misunderstanding, but I interpreted this as meaning that he wants to put externally hosted images in the frame, like the standard room image. Obviously, this would need a different method than printing out an <img> tag, because the image needs to go into an existing div. I think there's a JS function for this purpose?


I tried to use code editor, but give me error about two diferents lines.

I found this code in teory works but i don't know where i put without problems:

msg ("<img src= image link' />")
msg ("<img src='http://www.mydomain.com/images/kitten.png' style="display: block; margin-left: auto; margin-right: auto;" />")


K.V.

Oh. I see, MrAngel.

He's wanting it in the "Picture frame", like he used the feature.

Something like:

Add image

image_url = "https://i.imgur.com/4C39XcNb.jpg"
request (SetPanelContents, "<img src=\""+image_url+"\" onload=\"setPanelHeight()\"/>")
game.panelcontents = image_url

Remove image

request (SetPanelContents, "")
game.panelcontents = null

Somebody can help how i put in code view the code? or private missage please?


here's some of pixie's guide docs on using code:

http://docs.textadventures.co.uk/quest/
http://docs.textadventures.co.uk/quest/#Howto

http://docs.textadventures.co.uk/quest/quest_code.html
http://docs.textadventures.co.uk/quest/copy_and_paste_code.html
http://docs.textadventures.co.uk/quest/codeview.html
http://docs.textadventures.co.uk/quest/guides/using_functions.html


you can also see this post of mine, explains quest code structure and coding:

http://textadventures.co.uk/forum/quest/topic/mu7itzjqv0yxrkdwgsbmzg/how-to-make-npc-confront-you-with-chioces#46cdb25b-4767-40a6-8bf4-3cd84e805781

and here's some more links/guides/docs too:

http://textadventures.co.uk/forum/general/topic/ljjm32av4e2t9ot49k478g/help#710be61e-eae1-4af1-8363-520cc718ba1c

also, for more detailed help with learning to code/do-scripting in quest (and coding/scripting in general too):

http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk
http://textadventures.co.uk/forum/samples/topic/5137/list-and-dictionary-extensive-guide-by-hk


ask if you need help with anything


I got some screen shots.

https://i.imgur.com/E4p9Lao.png
https://i.imgur.com/Qt5DJ1D.png


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums