Ahmed Khalifa

Members
  • Content Count

    41
  • Joined

  • Last visited

About Ahmed Khalifa

  • Rank
    Advanced Member
  • Birthday 02/22/1989

Contact Methods

  • Website URL
    www.akhalifa.com
  • Twitter
    amidos2006
  • Skype
    amidos2006

Profile Information

  • Gender
    Male
  • Location
    NYC

Recent Profile Visitors

1873 profile views
  1. @Tom Atom Thanks so much, that is really great
  2. Thanks a lot, I didn't know about that stack part
  3. That's weird because nothing different since the beginning. So I start to try to corner the problem and I think I found it. So the background is 1x1 pixel that is scaled to cover the whole screen. Every frame, I redraw it using the correct color (green or red) without calling clear based on the current status in the map. When I commented this part, everything become very fast. So I added the clear in and everything is still fast. Is the graphics object keep track with all the previous drawings and recall all the drawing calls for every render? If that is the case, it make sense that it slows down near the end as it accumulated a lot of fillRect calls since the beginning of the game. I thought without calling clear, it just redraw the object on a texture on the previous drawings and use it.
  4. Thanks, It is scaling a graphics object (not a bitmap) down. Is there a problem with that? I don't redraw the object at all (I draw it one time at create only)
  5. Also I don't think, it is problem of driver as I tested it on multiple different devices and they all have the same behavior. Also will Canvas at some point support Tint?
  6. I just did profiling I don't know if these values are normal or not. 4430.4 ms Scripting 346.1 ms Rendering 658.5 ms Painting 3473.6 ms Other 64904.0 ms Idle The average frame rate is 15 frames Getting the tree call, I can see the rendering consume most of the time. Attached a picture of the call tree.
  7. I just tried using Bitmap fonts and no difference same weird problem. And I found out that tint is not working in canvas (all bitmap text are white). Just play the game for a minute in webgl and you will see the slow down (remove letters from the sequence to get a correct english word), tried different computers and same problem happens at all of them. I even restarted the computer.
  8. Thanks Rich, I will definitely try using bitmap fonts but shouldn't it slow down that much even if I am using around 30 normal font objects? It is weird that it didn't slow with time with you. Did you start profiling after the game started (after loading)? As the loading take long time and the game start to slow down after it start by a minute or something. May be it slows down when u play in it, try to remove letters to have a correct English word. I will test the bitmap font and see although I just wanted to use normal font. Also is updating Phaser.GameObject.Text text is it intensive from GPU point of view (as I change two text objects every frame)?
  9. I am working on a project that uses exactly 1 group, couple of containers (around 30) containing a picture from a tiny texture and a text, and 2 graphics object. When I select Phaser.WEBGL (Phaser.AUTO also selects WebGL), the game slows down after one minute or something. The game frame rate drop to almost 5 fps. I though there is something wrong with my code at the beginning and tried to optimize calling functions and other parts but with no affect on the final result. When I changed to Phaser.CANVAS, the game is very fast and maintaining 60 fps. I don't know if that is a bug in the framework or misuse in my code. I am testing on chrome browser on a Mac Book from 2015. here is a link of the game using canvas: http://akhalifa.com/testing/reduce/canvas/ here is a link of the game using webgl: http://akhalifa.com/testing/reduce/webgl/
  10. Hello everyone, I am trying to make the screen scale automatically based on the browser window. So I used the scale variable in world to scale it. I was trying to center it so I used the following code: this.world.x = Math.floor((this.game.width - Global.SCALE * Global.WIDTH) / 2); this.world.y = Math.floor((this.game.height - Global.SCALE * Global.HEIGHT) / 2); which didn't work nothing on the screen moved, I tried world.position.x/world.position.y and world.left/world.top and still nothing changed. Any help?
  11. I updated C-Square and released a totally free game on iOS and Android. It's better than the original version Looking forward for feedback Website: http://www.amidos-games.com/csquare/ iOS: https://itunes.apple.com/us/app/c-square/id1191030278?ls=1&mt=8 Android: https://play.google.com/store/apps/details?id=com.Amidos.CSquare Screenshots:
  12. What I found out is I need to use the beta version of crosswalk to make it work <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_beta:23+" />
  13. I am doing the same and its not working
  14. I tried ogg and mp3. mp3 is the most used extension
  15. No I mean when you load ur sound files. For example that what I am using now which is relative path to the index.html this.game.load.audio("Music1", ["assets/CSquare - Track 1.mp3"]); In this case the path is "assets/CSquare - Track 1.mp3" or should I use something else?