Zendrael

[Phaser] Arena Fu

Recommended Posts

1 minute ago, Zendrael said:

Thanks! I'm using Apache Cordova with CrossWalk!

Two things:

Game related: I think you should add kind of a global highscore (some people love that, I do). Sometimes I spend time just trying to get to the top on a game!

Other: Did you ever try intel xdk? If yes any advantages related to Apache Cordova. I have lots of trouble with intel xdk

Share this post


Link to post
Share on other sites
1 minute ago, The_dude8080 said:

Two things:

Game related: I think you should add kind of a global highscore (some people love that, I do). Sometimes I spend time just trying to get to the top on a game!

Other: Did you ever try intel xdk? If yes any advantages related to Apache Cordova. I have lots of trouble with intel xdk

Sure, I'm thinking about the best way to implement a crossplatform global highscore, will be done in a future release!

The XDK is great! I wrote a book (paper, portuguese) about creating mobile HTML5 games with it! As it uses Apache Cordova to generate your games, the big advantage is that it builds your app in the cloud and you have a graphical interface to configure it. What problems did you had?

Share this post


Link to post
Share on other sites

Wow! Nice!

I am trying to run the application on my android bq aquaris e6. I don't know why it doesn't run and I am not sure how to debug the app running on mobile (not in the emulators, there it works fine). How should I debug my app on mobile?

Btw I am portuguese ;). Just keeping the english in case the thread might help someone else. 

 

Share this post


Link to post
Share on other sites
6 minutes ago, The_dude8080 said:

Wow! Nice!

I am trying to run the application on my android bq aquaris e6. I don't know why it doesn't run and I am not sure how to debug the app running on mobile (not in the emulators, there it works fine). How should I debug my app on mobile?

Btw I am portuguese ;). Just keeping the english in case the thread might help someone else. 

 

You can use the Intel App Preview (available in all app stores) to test your game on your device, using the Test tab of the Intel XDK - The emulator is just an iframe running the game and does not compare to the device feel. Try it to see how it does.

Are you portuguese? Nice! Here is my book link: https://goo.gl/lLbFX4

Share this post


Link to post
Share on other sites
20 minutes ago, Zendrael said:

Sure, I'm thinking about the best way to implement a crossplatform global highscore, will be done in a future release!

The XDK is great! I wrote a book (paper, portuguese) about creating mobile HTML5 games with it! As it uses Apache Cordova to generate your games, the big advantage is that it builds your app in the cloud and you have a graphical interface to configure it. What problems did you had?

Yeah I already used the test tab. I send the app to the server and I can start it. However I face a white screen and nothing more...

Yep :P Is the book available in Portugal?

Share this post


Link to post
Share on other sites
1 minute ago, The_dude8080 said:

Yeah I already used the test tab. I send the app to the server and I can start it. However I face a white screen and nothing more...

Yep :P Is the book available in Portugal?

Hum... I don't know if they ship to Portugal, maybe they do. My editor said that will be a e-book version, I just don't know when... :(

You can also add to your game, for testing purposes, the Console Log Viewer from Mark Knol as I describe here: https://medium.com/@zendrael/ipad-only-gamedev-week-5-coding-and-debugging-ca651ca9a19e#.4x7hs0839   it will create a console on the screen to see the errors (but add the js file to your project, not load it from web).

Share this post


Link to post
Share on other sites

I can run the console on the simulator and I get the logs but when I run on my android device I can't see any logs (but I see the console). All I can see is the console and a white screen.

Also I find your resolution code very interesting ^^. I use this. What do you think?

    game_width = window.innerWidth * window.devicePixelRatio;
    game_height = window.innerHeight * window.devicePixelRatio;

    if(game_height > 800) {
        var div = game_height / 800; ;
        game_width = game_width / div;
        game_height = 800;
    }

    scaleRatio = 1 / 3; 

    game = new Phaser.Game(game_width, game_height,Phaser.CANVAS,"game",null,false,false);

e-book would be nice and would probably expand it more. 

Share this post


Link to post
Share on other sites

Thanks, I used the same version of my resolution code when I was developing without any framework, but it was too time consuming, then I moved to Phaser and used some of the old tricks :)

Your code looks interesting but where are you using the scaleRatio var?

Share this post


Link to post
Share on other sites
6 minutes ago, Zendrael said:

Thanks, I used the same version of my resolution code when I was developing without any framework, but it was too time consuming, then I moved to Phaser and used some of the old tricks :)

Your code looks interesting but where are you using the scaleRatio var?

ups. You are right. Initially my scaleRatio var was  window device pixel ratio / 3; I am not that experienced and I don't understood why the device pixel ratio mattered. I noticed that when I ran the app on the emulators I always got a device pixel ratio of 1 and it was all fine. When I ran on my android phone I got a device pixel ratio of 2. What I noticed is that the sprites were really big and out of size in comparision to when it was 1. So I kept it that way (1). But the funny part is that I am not using that variable anywhere at the moment... I used to scale the sprites like sprite.setScale(scaleRatio,scaleRatio). But now I just set their size using game_width and game_height (like body_width = game_width * 0.3)...

Share this post


Link to post
Share on other sites

Hum... I see now...

Well, you can use the Phaser ScaleModes to scale your game without having to change sizes of sprites and other elements during code, that would simplify a lot of work. I like to use pixelart sprites so I just scale up the game to the all available space, the art continues to be ok. If you are using high res art, you must find a default size to be good enough on higher resolutions without losing the quality and apply the same technique.

Share this post


Link to post
Share on other sites

Cool! tested in my Galaxy S3 and runs fine. Liked the graphics and gameplay is fun. I don't know if it's my phone's fault, but some texts in the intro screen looked a bit fuzzy. 

Agree with @The_dude8080, global highscores could be a lot of fun.

I've tried Phonegap in the past but I'm not very happy with it, regarding games. I think I'll give Crosswalk a try.

 

Share this post


Link to post
Share on other sites
57 minutes ago, 1pixelarmy said:

Cool! tested in my Galaxy S3 and runs fine. Liked the graphics and gameplay is fun. I don't know if it's my phone's fault, but some texts in the intro screen looked a bit fuzzy. 

Agree with @The_dude8080, global highscores could be a lot of fun.

I've tried Phonegap in the past but I'm not very happy with it, regarding games. I think I'll give Crosswalk a try.

 

Thanks!

The texts should be changed, I'm still trying to use good pixel bitmap text but always end with text with antialias (i want without)...

Regarding the CrossWalk, it is better for games, and you must use Canvas, not WebGL, to get it in a decent fps.

Any ideas of a cordova plugin for highscores?

Share this post


Link to post
Share on other sites
On 28/11/2016 at 6:57 PM, Zendrael said:

Hum... I see now...

Well, you can use the Phaser ScaleModes to scale your game without having to change sizes of sprites and other elements during code, that would simplify a lot of work. I like to use pixelart sprites so I just scale up the game to the all available space, the art continues to be ok. If you are using high res art, you must find a default size to be good enough on higher resolutions without losing the quality and apply the same technique.

I think I understood. Thank you for the tips!

Share this post


Link to post
Share on other sites
11 hours ago, Vii said:

Dude how did you make work those interstitial??? I cant make them work at all, and putting them into state is out of question

Hey Vii! How are you?

What are you using to create the AdMob interstitial? Pure Cordova cli or Intel XDK (or other)?

Share this post


Link to post
Share on other sites
7 hours ago, Zendrael said:

Hey Vii! How are you?

What are you using to create the AdMob interstitial? Pure Cordova cli or Intel XDK (or other)?

Thank you for reply,

I've tried phoneGap,and ionic.With ionic i am able to display banner. With phoneGap nothing. I did follow every available tut, even try to customize myself. I muss be missing something. XDK last time i tried it was refusing to log me in. And "pure cordova cli" i did not know is possible to create interstitial  in command line. Your game is sick money-making machine, before i figured out what to do i saw like 5ads.

Share this post


Link to post
Share on other sites

Hey Vii!

I think you should try using XDK + cordova-admobpro plugin as described here: https://github.com/floatinghotpot/cordova-admob-pro/wiki/02.-How-to-Use-with-Intel-XDK - I'm using it and the site shows other ways to use it too. If none of them work for you, I can try to help in some way.

Unfortunately the game is not making money... I only get some money if the banner is clicked, not when it just showed... :( And there are still too few installs at the moment.

Share this post


Link to post
Share on other sites
41 minutes ago, Zendrael said:

Hey Vii!

I think you should try using XDK + cordova-admobpro plugin as described here: https://github.com/floatinghotpot/cordova-admob-pro/wiki/02.-How-to-Use-with-Intel-XDK - I'm using it and the site shows other ways to use it too. If none of them work for you, I can try to help in some way.

Unfortunately the game is not making money... I only get some money if the banner is clicked, not when it just showed... :( And there are still too few installs at the moment.

yeah floatinghotpot i went through that one as well, but not with xdk and admobpro(admobpro did not work with ionic, only cordova-admob), but anyway how do you access the phaser.game.state? i saw jquerry in that example, can you combine jquery and phaser?Is that how you make the restart button? querry button which will           game.state.start();+ Admob.showInterstitial();                   you cant states are not part of DOM                   the game has no states its all in index.html right???

Share this post


Link to post
Share on other sites

Hey Vii!

I think you should try to use Intel XDK to build your project and, from there, import the cordova-admob-pro plugin as described in the site. Also, you just need to do the calls as mentioned in 

https://github.com/floatinghotpot/cordova-admob-pro#usage

This is the easiest way IMHO. The wiki of the project is very helpful. And there's no need for jQuery if you're using Phaser.

If you are using Ionic, the XDK will be a great tool for you too and will simplify you app generation.

Try it and come back to tell us your results.

Share this post


Link to post
Share on other sites
On 21/12/2016 at 3:17 PM, Zendrael said:

Hey Vii!

I think you should try to use Intel XDK to build your project and, from there, import the cordova-admob-pro plugin as described in the site. Also, you just need to do the calls as mentioned in 

https://github.com/floatinghotpot/cordova-admob-pro#usage

This is the easiest way IMHO. The wiki of the project is very helpful. And there's no need for jQuery if you're using Phaser.

If you are using Ionic, the XDK will be a great tool for you too and will simplify you app generation.

Try it and come back to tell us your results.

Sorry, but i had flu+chrism-ass,  the problem was  that you can not show*** both banner and interstitial at the same time, which might be obvious, but it was not to me. I did read all the links(!admob vs admobPro). XDK dont know where to build, debug, to click on, but  it works surely as well, i am just not the GUI guy i guess. But it is still not clear to me how did you inject admob to a phaser game object? is your code on one file without states?

perfectly working from docs https://www.tutorialspoint.com/ionic/ionic_admob.htm

***you can but you  have to removeBanner()  and then showBanner(parameter1)  again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.