Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Getting started with HTML5
Started by Rob Miracle Mar 20 2018 08:08 AM

- - - - -
170 replies to this topic
[TOPIC CONTROLS]
Page 3 of 7 1 2 3 4 5 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#51

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,475 posts
  • Corona SDK

Hi,

 

A cookie plugin for HTML5 builds is available here: https://forums.coronalabs.com/topic/72105-corona-html5-cookie-plugin-release/

 

-dev



[TOPIC: post.html]
#52

enneaplay

[GLOBAL: userInfoPane.html]
enneaplay
  • Observer

  • 25 posts
  • Corona SDK

Lets say you host your game/app at You can only make network.request() calls to http://acme.com. But if your needing an API from https://superhighscores.com/api/sethighscore&score=100 as an HTTP GET call, you would need to write a script at http://acme.com and name it something that makes sense, perhaps sethighscore.php and drop that in the folder with your game (Not required, you can put it anywhere on acme.com).

 

In the PHP script you can use the $_GET[] array to access the parameters passed (score) and reform the URL to superhighscores.com in the PHP script adding the various GET or POST parameters. You can then use something like PHP's curl or other technologies to call superhighscores.com. You would get JSON (or XML) data back, and then simply echo it out of the PHP script to return it to network.request.  You can see some examples of making REST calls with PHP here:

 

https://stackoverflow.com/questions/9802788/call-a-rest-api-in-php

 

Rob

 

Congrats Rob for the great explanation!!! Now I get it... kkk



[TOPIC: post.html]
#53

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 615 posts
  • Corona SDK

Just tested a couple of the more heavy games I did and the html5 builds worked very well.

The graphics, animation etc. looked much smoother than I expected it would.

 

Great! I am impressed. Well done Corona Labs.



[TOPIC: post.html]
#54

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 990 posts
  • Corona SDK

Very, very cool. Also very impressed.

 

In the spirit of constructive criticism: are there any plans to reduce loading size (and consequently loading time)? I'm seeing a 2MB data file plus 7MB javaScript file, just for displaying a rectangle on screen.

 

Also, if the 7MB file is always the same, could this be cached somehow?



[TOPIC: post.html]
#55

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Very, very cool. Also very impressed.

 

In the spirit of constructive criticism: are there any plans to reduce loading size (and consequently loading time)? I'm seeing a 2MB data file plus 7MB javaScript file, just for displaying a rectangle on screen.

 

Also, if the 7MB file is always the same, could this be cached somehow?

browsers caches web app files automatically



[TOPIC: post.html]
#56

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,697 posts
  • Enterprise

We are looking at it, but I don't know that we can make it smaller without cutting features.

 

Rob



[TOPIC: post.html]
#57

jhanca_s_o2011

[GLOBAL: userInfoPane.html]
jhanca_s_o2011
  • Observer

  • 3 posts
  • Corona SDK

Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. not load script .html.mem and .data please :'( 



[TOPIC: post.html]
#58

antonsilver

[GLOBAL: userInfoPane.html]
antonsilver
  • Observer

  • 12 posts
  • Corona SDK

Amasing, made a Quick test with Spine animations and particles ... rund Liksystem.DocumentsDirectorye a dream Look for your self http://www.creasaur.com/lonelyknight/ Cant wait to test out my multiplayer game! What does it do with data you store in system.DocumentsDirectory?
  • Develephant and sporkfin like this

[TOPIC: post.html]
#59

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

system.DocumentsDirectory is kept using IDBFS in browser's permanent memory. It will be alive until browser cache is not cleaned



[TOPIC: post.html]
#60

pentawire

[GLOBAL: userInfoPane.html]
pentawire
  • Observer

  • 2 posts
  • Corona SDK

Also my game works very very fine!!!  :)  :)  :)

https://www.kongregate.com/games/pentawire/lab-escape

 

Good works !!!!  :D



[TOPIC: post.html]
#61

arnulfo.bataller

[GLOBAL: userInfoPane.html]
arnulfo.bataller
  • Observer

  • 1 posts
  • Corona SDK

Hi,

 

I was testing the html5 build for my game but got a Build Error #12 with the following message in the Simulator Console:

 

17:02:08.755  Using custom build id from app bundle: 00000 (AppSettings.lua)
17:02:08.755  
17:02:08.755  Using custom Build Id 00000
17:02:10.111  buildWebApp: No files in app found
 
Also, the app's .data output file file has zero bytes.  I am using Corona build 2018.3278.  Desktop and android builds works fine.  What's the fix to to this problem?
 
Arnulfo


[TOPIC: post.html]
#62

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 644 posts
  • Corona SDK

Would it be safe to say that this HTML 5 build can be used to create a game in Facebook Canvas? And if so, what is the best way to connect with the FB API, the FB plugin v4a or through direct JS?

Has anyone created a sample FB Canvas app using Corona HTML 5?



[TOPIC: post.html]
#63

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

>>Would it be safe to say that this HTML 5 build can be used to create a game in Facebook Canvas?

I'm sure, yes.

>>And if so, what is the best way to connect with the FB API, the FB plugin v4a or through direct JS?

FB plugin v4a is not ported yet to html5. So the best way is direct JS plugin.

for exmaple, here's https://docs.coronalabs.com/plugin/vk-direct/index.html direct JS plugin for VK Direct games.



[TOPIC: post.html]
#64

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 644 posts
  • Corona SDK

What is VK?

Also, has anyone created a sample FB Canvas game yet with Corona?

[TOPIC: post.html]
#65

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

>>What is VK?

https://en.wikipedia.org/wiki/VKontakte

 

>>Also, has anyone created a sample FB Canvas game yet with Corona? 

here's one of related threads https://coronadevelopers.slack.com/messages/C8CQN6J5T



[TOPIC: post.html]
#66

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 644 posts
  • Corona SDK

@vitaly1, I attempted to go to the coronadevelopers.slack.com link that you provided above - it will only allow me to create an account for it if I have an @coronalabs.com email address.



[TOPIC: post.html]
#67

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Everyone can join there, however you have to be invited. We automated this process here https://coronalabs.com/slack/



[TOPIC: post.html]
#68

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 644 posts
  • Corona SDK

@vitaly1, I see references to FB instant games but no example code.

@everyone, can anyone refer me to the most simplistic FB game example of the new Corona HTML5 build? I've never made a Facebook App, only integration from my mobile Corona builds. So, we need someone to walk us through the full process.

 

@Corona, when will Corona be added to this list? https://developers.facebook.com/docs/games/instant-games/compatible-engines



[TOPIC: post.html]
#69

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,697 posts
  • Enterprise

@Troylyndon I have no idea how to get put on that list. I however would not want to be listed there until I see that we have successfully put apps there.

 

Rob



[TOPIC: post.html]
#70

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 61 posts
  • Corona SDK

Amazing stuff guys!



[TOPIC: post.html]
#71

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 61 posts
  • Corona SDK

Here is a little physics game I'm working on. I just pressed the html5 build button and it's working like a charm!

 

http://honeyponey.fr/claw/


  • Develephant likes this

[TOPIC: post.html]
#72

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Funny game!



[TOPIC: post.html]
#73

Mars Interactive

[GLOBAL: userInfoPane.html]
Mars Interactive
  • Contributor

  • 181 posts
  • Corona SDK

Hello everyone!

 

We’re really excited about the HTML5 builds and we want to start getting our feet wet with some of our already created mobile apps. But, there’s one thing that discourages us from starting and that is the Loading Time.

 

Just like @antonsilver Game HERE! Our apps, even an empty Corona Project, has a loading time that is significantly high (30 seconds!!!).

 

However, we just took a look at @david.ciaudo ’s Game HERE! and boy, in about 3 seconds it’s up!

 

1. Does anyone know how to reduce the loading time like in David’s Game?

2. Is there a way to customize the loading screen?

 

Thank you,

Mars Team



[TOPIC: post.html]
#74

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 61 posts
  • Corona SDK

I guess the main difference between those 2 game is the weight of textures.



[TOPIC: post.html]
#75

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

>>Our apps, even an empty Corona Project, has a loading time that is significantly high (30 seconds!!!).

Empty html5 app size in Corona is 1MB and it loads in a few seconds.
 
App size in http://www.creasaur.com/lonelyknight/ is 57MB, it's pretty big. And I'm sure it contains a lot of assets.
HTML5 builder includes all files from app folder into html5 app. So  make sure app folder does not contain unused files or use ExcludeFile filter: 

  • antonsilver likes this


[topic_controls]
Page 3 of 7 1 2 3 4 5 »
 
[/topic_controls]