Jump to content

Phaser State Transition blinking background before transition.


greatimposter
 Share

Recommended Posts

Hello folks,

 

I'm pretty green hgere and attempting my first real foray into Phaser game dev.  It's been fantastic and I adore the framework - so thank you for that - also a big thank you to this forum which is a must for any new dev.  

 

So, for me - I'm being ambitious and slowly building out an rpg engine in phaser.  I'm stumbling a bit as I go -= butr so far haven't encountered an issue that couldn't be answered by searching the forum - until now :P

 

I'm loading a pretty substantial tilemap (using the tiled-map plugin) and all is somewhat well.  I'm also generating 100 enemies at random locations on the map (checking each tile for a walkable flag).

 

The problem I'm having is, the transition plugin seems to be blipping the map before the player has been added, then continuing with the transition.  I'm switching between map state to battle state then back to map state.  The screen blip happens both ways.

 

My source code is here:

https://github.com/chemcnabb/god_of_olympus

 

If anyone could offer me some advice.

 

Apologies in advance for any mess in my source, its very WIP obviously.  Also, forgive my temp art :/

Link to comment
Share on other sites

Hi folks,

 

Sadly, it turns out the issue was with the phaser tiled plugin.  After I removed it and rolled everything back to the built in functions of phaser, all returned to normal.  Also, I'd like to point out - I used this tutorial to organize my code:

 

http://kieve.ca/?p=10

 

And boy oh boy, what a difference.  My map size is 4096x4096 - and after some reading I had wrongly assumed phaser-tiled was built to handle viewport culling and had some high performance boosts.  Unfortunately I think Phaser has outgrown the plugin as I found a huge performance increase after switching back and using the loading structure of the above tutorial.

 

I also switched Phaser rendering to canvas instead of auto.

 

My map loads quickly, phaser-transition runs smoothly with no anomalies and the framerate with 100 randomly distributed enemies is 60fps.

 

Not bad.  Not bad at all.

 

Now to wrap my head around tree depth sorting :P

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...