Zackorz

Some Beginner Issues

Recommended Posts

Hello,

 

i come from Unity Development and want to create a Browsergame with Phaser and Mighty Editor.

 

But im struggling much with Mighty Editor and its "basic functions".

 

I watched the video " creating a mini-game with MightyEditor and Phaser" from Guntis Šmaukstelis, but have some strange behaviours:

 

 

 

In the Tutorial, the sprites, that dragged into the scene, have to be initalised to be shown in the "Open Scene" Preview. I dont have to initialised them by code, they just shown automatically, is that a new feature?

 

I also created an animation, that is working well in the editor. But when i look at the "Open Scene" Preview, this animation isnt shown.

 

 

I hope someone can help me, at least at some of my issues.

Share this post


Link to post
Share on other sites

Hi,

 

by default MightyEditor will start demo state - you can change it in the js/state/load.js - this.game.state.start("demo");

I must admit, that this is very confusing.

 

We hope to fix this by introducing templates.. e.g. temlate for game / for blank map / platformer / etc

Share this post


Link to post
Share on other sites

Has anyone else had problems with the amount of memory MightEditor consumes in Chrome? ( loading a new/empty project )

 

For some reason it quickly grows beyond 1gb and continues to grow and usually windows kills my browser due to out of memory problems ( normally when it gets up around the 2gb ).

 

In Firefox it appears to stay around 400-450mb.

 

I assume most don't have this problem otherwise it would have been raised by now - so likely just something strange with my machine.

 

btw - It tells me my Chrome is up to date and I use Windows 7 64bit on a dell XPS13 ultrabook. 

Share this post


Link to post
Share on other sites

Hi,

 

on my Laptop (with Arch Linux) MightyEditor usualy takes 150 MB empty and grows (by adding new assets / objects) up to 700MB on chromimum.

At 700MB chromium starts garbage collector (gc) and memory usage drops to 450MB - and after that increases very slowly - by adding new objects

 

You can try to start gc manually and see - if memory usage drops - and chrome keeps crashing,

* open developer tools (F12 or ctrl + shift + i)

* select Timeline tab

* click 4th icon (recycle bin) at the top

 

 

Also - can you check memory usage and report - which actions takes most memory? Or even makes browser to crash.

 

P.S. while checking memory - I noticed that text objects makes a lot of garbage (20-30MB per object) and in general uses lot of memory (background canvas) - is it possible that crash can be related to the text objects?

Share this post


Link to post
Share on other sites

Thank you, its working now.

 

Is it possible to make 1 version of the game, that works on PC, Android and Apple devices? Or do i have to create a seperate version, for every device, because the "screen scaling" isnt correct otherweise?

 

And is it possible to use a file, created with Mighty Editor, with other Editors?

Share this post


Link to post
Share on other sites

 

 

Is it possible to make 1 version of the game, that works on PC, Android and Apple devices? Or do i have to create a seperate version, for every device, because the "screen scaling" isnt correct otherweise?

 

It depends on the game - by default ME will scale screen to match viewportWidth / height to 100% of the screen's width/height.

Just open game in the devices browser and check if it works as you desire.

 

Also keep in mind that you can deploy to android directly from ME.

And for other devices - export as web app and then you can use Phonegap, Cocoon or any other project that makes native apps from web apps.

 

And IntelXDA even allows you to choose which library to use.

 

 

 

And is it possible to use a file, created with Mighty Editor, with other Editors?

 

 

No - as far as I know. You can always make feature request  - and we eventually will add export to "X" option.

Share this post


Link to post
Share on other sites

My purpose is, to make a pure browser-game that is working on all devices (PC, Mac, Android and Apple Tablets) and all important Browsers (Chrome, Firefox, Internet Explorer, Safari).

Its important for me to have just one built for all systems, and the game should run in the browser and not as an app.

 

I tried it with ME and it works fine in Chrome and Firefox. In Safari it runs very slow and Internet Explorer just shows a black screen.

 

 

Is that a limitation of "ME" or a limitation of the whole "Phaser" Framework?  

Share this post


Link to post
Share on other sites

 

 

Is that a limitation of "ME" or a limitation of the whole "Phaser" Framework?  

 

Officially MightyEditor is designed to work with chrome / chromium only - this was decision from the very beginning - time after time I'm fixing FF related bugs.. 

On IE 11 ME somehow starts, but is pretty unusable. Maybe when we will grow bigger we could spend those extra hours to make ME compatible with all browsers

 

Exported games should work on all phaser supported browsers:

http://www.html5gamedevs.com/topic/8047-browsermobile-compatibility/?p=48087

 

 

Share this post


Link to post
Share on other sites

Hi,

 

on my Laptop (with Arch Linux) MightyEditor usualy takes 150 MB empty and grows (by adding new assets / objects) up to 700MB on chromimum.

At 700MB chromium starts garbage collector (gc) and memory usage drops to 450MB - and after that increases very slowly - by adding new objects

 

You can try to start gc manually and see - if memory usage drops - and chrome keeps crashing,

* open developer tools (F12 or ctrl + shift + i)

* select Timeline tab

* click 4th icon (recycle bin) at the top

 

 

Also - can you check memory usage and report - which actions takes most memory? Or even makes browser to crash.

 

P.S. while checking memory - I noticed that text objects makes a lot of garbage (20-30MB per object) and in general uses lot of memory (background canvas) - is it possible that crash can be related to the text objects?

 

I tested again - the tab quickly grew to 2gb before bouncing down to around 1gb and quickly growing to 2gb again after a couple of cycles the tab crashed.

 

No idea how to check the chrome usage and report!!?

 

I tried the following: disabled all extensions. = no difference.

turn off Use Hardware acceleration when available (this appeared to help a bit - it bounced of 1gb instead). 

 

As per your suggestion above I manually triggered garbage collection - first click and it stopped the 2gb bounce and was bouncing instead between 200 and 630mb for the tab. I clicked it a few more times to see what happened.

 

Now it is bouncing between 120mb and 330mb! (All tests are on an empty project).

 

It would appear that Chrome has had some memory problems for considerable time (only affecting certain setups?).

 

These tests would suggest garbage collection isn't being triggered as required in some scenarios/setups.

 

Very strange. 

Share this post


Link to post
Share on other sites

The final result - when manually triggering garbage collection - the memory appears more stable, and the tab no longer crashes.

 

This is all for an empty project though - when I get more time I will have a play around with it and see if it continues to be stable when in use.

 

Cheers for the help.

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.