• Content count

  • Joined

  • Last visited

About dcgames

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

476 profile views
  1. [WIP] Chicken Foot Dominoes

    I recently learned this game and thought of making a web version with double-six domino set. I have spent some time fine-tuning AI for bot and it seems to be working just about decent. I am interested in knowing how difficult or easy do you find it is at the moment. I looked around for a winning strategy for this game and did not find much except some general rules. If someone has some info or some research info on a mathematical approach for AI, please revert. I am very much interested in introducing complexity levels in the game to make it easy to hard. Until then enjoy the game against a decently human AI. http://www.playonlinedicegames.com/chickenfoot-dominoes
  2. [WIP] Collectable Card Game

    Nicely done. I have been planning for ages to do some multiplayer games and your work motivates.
  3. RESIZE Scale mode and viewport issue

    The only option I think I can go for at this point is to prepare different set of assets for lower size which can look better since higher sized assets are looking worst when scaled down so assets optimized for lower sizes should not make any difference to look and feel of the game. I actually do not have any other problem with the size I am getting in RESIZE method except that it makes entire game look blurry when scaled down on certain mobile devices which are low on logical pixel size but have a very high pixelDeviceRatio so even though they have a lot of pixels available to draw the game the logical pixels available in the RESIZE scale mode makes everything scale down to the extent that the assets which were prepared for HD resolution on desktop look even more blurry on mobile devices with almost same pixel size as desktops and high devicePixelRatio. Interestingly SHOW_ALL scale mode looks much better in this case and if I could ignore letter boxing then it will save me a lot of calculations which I have to do for re-positioning my game assets in RESIZE scale mode.
  4. RESIZE Scale mode and viewport issue

    I use maximum which is 400x800. There is a big difference in clarity between SHOW_ALL and RESIZE so my understanding is that SHOW_ALL draws everything for given width and height and then re-scales entire game to fit the device. In RESIZE also I can do the same thing by considering devicePixelRatio but how do I re-scale everything to fit the device afterwards, is the question.
  5. RESIZE Scale mode and viewport issue

    samme. 400x800 was just an example of explain what was the issue. I am writing a game which should be responsive and should adapt to any resolution and I think RESIZE scale mode is exactly what I should use. I have no issues with using RESIZE scale mode. The real issue is the width and height I get in the game when using RESIZE mode and meta viewport with width=device-width. The game looks blurry because everything is scaled down to 200x400. If I use SHOW_ALL then game looks just fine and crisp on any resolution or device because in this case the entire game is drawn for full scale and then canvas is scaled down. The problem with SHOW_ALL is letter boxing effect for different aspect ratios which is not what I want.
  6. I have come across some issue which I think should have a simple solution but I could not find much on google so I am going to ask experts here. The problem is the handling of game for mobile devices when RESIZE mode is used. Let say I made a game with 400x800 resolution and have all assets according to the same resolution. My mobile device has device size of 200x400 and devicePixelRatio of 2 so I have 400x800 pixels available for my game on mobile. If I do not specify anything is the viewport meta tag in html then RESIZE method gets 400x800 as the width and height and everything looks perfect on mobile but if I use something like following <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> I get 200x400 as width and height in resize method. I do all calculations in the game and scale everything down according to 200x400 and when game is rendered it still has 400x800 pixels available to draw which leads to entire game looking blurry. I decided to consider devicePixelRatio as well so whatever width and height I got in resize method, multiplied it with devicePixelRatio which gave me 400x800 canvas size to draw my game and there was no need to scale anything down so basically I ended up drawing for 400x800 when only 200x400 size was available for drawing according to the Phaser. I think now all I have to do it to scale entire game down to fit into 200x400. I tried set world.scale property which gives something very incorrect and though the game is scaled down according to 200x400, the view is repeated and screen constantly flickering so I think this is not what I am supposed to be doing. The other option of adding everything to a group then scaling all down for 200x400 size. I have spent a few hours on looking for a solution and I believe there is a simpler solution which I might not know yet. What is the correct way of handling this? Am I overdoing this? I am trying to make it truly responsive and calculating everything per the size of 200x400 does not look correct even if this is the size I get in resize method since I have 400x800 pixel size available to draw. Also, the game should not be dependent on viewport meta tag. Some sites may use it and some not. Or even if it is dependent on viewport, I should be able to take that into account and handle everything amicably in my game. Any advice/help is much appreciated.
  7. Change x/y target in tween

    The method specified by samid737 works perfectly. samme, I am not sure how to use your method. The last line tween.to() would need to specify new x,y coordinates which I think is not allowed once tween has started. Am I missing something here?
  8. Change x/y target in tween

    Perfect. Exactly what I was looking for. Thanks much. Let me try this now.
  9. Tweens

    You can do something like this on first button click. Notice the last parameter is set to false which ensures tween does not automatically execute. var tween = game.add.tween(sprite).to({ alpha: 0 }, 2000, "Linear", false); In second button click you can simply call tween.start() to start the tween.
  10. Change x/y target in tween

    I am using RESIZE mode and have a few tweens which move from one point to another. The moment I resize the game, I need to recalculate the new x/y target for the sprites and update the tweens otherwise sprites keep moving to the previous target location which is incorrect for new size of the game. I looked into updateTweenData method but could not achieve what I want to do. I have tried to pause the tweens in resize method and directly change properties' x/y (tween.properties.x, tween.properties.y) but it does not change anything and tweens keep moving to previous target location after I resume. Changing x/y using something like updateTweenData ("x", newValue) also makes no difference. Does anyone know if this is supported and is possible to achieve?
  11. Game is very slow in Nexus 10 device

    www.goodboydigital.com/pixijs/bunnymark/ Correct URL
  12. If I set scale mode to RESIZE and use following code to display a loading mage, it is not always centered. I noticed it happens more frequently on desktop as opposed to mobile. Has anyone else noticed this issue? var loadingBar = this.add.sprite(this.world.centerX, this.world.centerY, "loading"); loadingBar.anchor.setTo(0.5); this.load.setPreloadSprite(loadingBar);
  13. Resize issues with Phaser

    I just wanted to post an update to this. I eventually ended up using CSS and setting overflow-y property to hidden which completely hides the temporary vertical scrolling. I can then use java script to remove overflow-y property later on which I needed in certain scenarios. Doesn't look like an elegant solution but works for now.
  14. Resize issues with Phaser

    I have been trying Phaser for past couple months and thought of learning it by making a bunch of Solitaire games. All well and fine and games are functioning decently well. I am facing issues with making the game load in a smooth manner. I created the game for a big canvas 1920 px and am using Bootstrap to fit the game into the available space. I do the maths to correctly adjust width or height of the game before it is initialized and then pass the parameters to initialize the game and load states. The issue is that the game loads initially with the full size and then resizes it on the screen which kind of jumps and flickers and does no way look smooth. Just try to load the game http://www.onlinesologames.com/klondike You will notice how its resizing the canvas and also notice the vertical scrolling to the right which is pretty visible for a good couple seconds or more. I am using ScaleManager and SHOW_ALL to automatically resize and the code is pretty standard. game.stage.backgroundColor = 0x008000; game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.setScreenSize = true; game.physics.startSystem(Phaser.Physics.ARCADE); game.state.start("Loading"); In order to give it a smooth load effect I tried a couple things. I have tried to set the background color to match the HTML background color and then change the color after the actual game starts loading. That does not fix the problem as the scrolling will still show up for a couple seconds and screen will flicker. Then I tried to hide the entire canvas area and then unhide it using jQuery (something like $("#mygame").fadeIn(500)) after I have preloaded the assets and am going to start game state. The problem still stays and it doesn't matter at what stage I unhide the game canvas, it first loads the game in full size then scales it back to the available space. I am looking for your experience in how to handle this if anybody has faced this problem before and if there is something in Phaser which can elegantly resolve this. If you want to look at how the two approaches behave in reality, I can deploy it and share the URL's.
  15. [WIP][Phaser] Rummy Card Game

    Thanks BdR. Yes, there are no sound effects as of now. Though I do plan to add sound effects in future to all games which is in the backlog for now since right now I am onto writing another set of half dozen interesting card games which can be played against the bot. Your idea of flashing is very good and a bit of help in the first game. I am going to implement both in the next version of this game (and other as well :)) once I am through with current set of bot games. Thanks much for playing. Very much appreciated. Please do report if you or anybody finds any issue.