Link to home
Start Free TrialLog in
Avatar of James Hancock
James HancockFlag for United States of America

asked on

Help me plan for phone game publishing - app store / all devices

Hi
From the articles I've read, and my experience so far, I'm going to use brackets to code my phone games.
As it is now, I'm doing them in one .html file, like in the Udemy / phaser examples, which were all v.good.
Someone said that he prefers to click out and load the project in his browser than use the brackets runtime. I was glad someone else does the same.


However, - How should I code my game, in anticipating transferal to stores/devices? If I run the html (webserver-served) in my iPhone, the javascript game appears perfectly, except for tiny size issues and vertical/horizontal, which is all me. If I can do it in my phone in html, is that where I need to be to publish it in an app store!?
? Slither runs in a browser. Is that javascript loaded from the html, or coded in the html?

Below is an example page that I related to nicely on the phaser examples for my first game.
Should I put that html code in a .js file? from the <script> above the Config down to the </script> ?
Do I put the <script> tags in the .js file, or not? and do <script src = "..."> to load it in?
What does the js and enclosing index.html file look like for that?

We can ignore the preload, so we don't have to bother with the background file, or put in a pic of your cat!

here

Thanks
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Brackets is simply a code editor
you need to create an android app using the appropriate tools pay the required fees and publish the app to the google play store
For IOS you need a mac the appropriate tools and pay the publisher fees and publish it to the app store.
Avatar of James Hancock

ASKER

so, if I have my game working in Javascript, the path to publishing is fairly straightforward?
pretty much.. I would use a web browser control in the app itself.
Thanks
What is that? my players won't always be in a browser.
Must my Javascript initially determine the game environment type? How?
javascript runs only in the browser
Thanks
Even if they are launched like an app from the home screen? That's what I meant.
rather than a full front end and a services back end.  You are putting everything into a web component. JavaScript is used by a web browser so you have to code a minimal web server and a web browser control.. If I remember correctly google play store limits the apk to 100mb in size.
JavaScript is good for what it does.  It is not the tool for everything.

Your are like the handyman that only owns a hammer so everything looks like a nail.

As I said before to publish something to the app stores it must be in the format they accept and licensing fees paid.
Thanks
I’ll research those format numbers.
What is the code to set my game-screen to the appropriate sizes? Is that what you are referring to?
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks

Will these two examples work on all platforms, including browsers, upcoming devices? - And, Concerning Android and IOS? - How are they different? Where are they catered for in the code?There are no comments. Why do those devices need special consideration?
what I showed last is android specific c++ code.
ios
if #available(iOS 11.0, *) {
        if let window = UIApplication.shared.keyWindow {
            let safeAreaBottom = window.safeAreaInsets.bottom
            let safeAreaLeft = window.safeAreaInsets.left
            let safeAreaRight = window.safeAreaInsets.right
            let safeAreaTop = window.safeAreaInsets.top
        }

Open in new window

Sorry, this is a Javascript question,
The browser size can be correctly determined in my Javascript in Safari, but not iPhone dimensions. My game window in the iPhone browser is much smaller than the screen size.

Is this purely a css thing?
Other projects of mine have a css struct containing . . .   width: 100% and height: 100%  position : fixed
That must be the answer?

Thanks
Is there any way to do text prints in brackets, so I can see the correct calculations being done?

Thanks
Thanks