Jump to content

Tom Atom

Members
  • Content Count

    594
  • Joined

  • Last visited

  • Days Won

    6

Reputation Activity

  1. Like
    Tom Atom reacted to enriqueto in [Phaser] FootChinko WC18   
    FootChinko WC18 edition. Available for licensing.
    Play it here.

  2. Like
    Tom Atom reacted to enriqueto in [Phaser] Baseball Hero   
    Last week we released a baseball game on Facebook Instant Games. It's called Baseball Hero. 
    You can play it here.
    It uses bone animations and Spriter Player for Phaser.

  3. Like
    Tom Atom got a reaction from samme in [Phaser] Rabbit Run   
    Hi, Rabbit Run is our endless runner game made for Japanese market. You can play it here: http://games.wkb.jp/ykg/?game_id=rabbitrun
    In fact it is reskinned and adjusted Goblin Run (http://www.html5gamedevs.com/topic/25331-book-game-goblin-run-procedural-endless-runner/) - game I made for my Phaser programming book (https://gumroad.com/l/CZuhn). We added some animations and tutorial, changed score calculations and made a few optimizations.



  4. Like
    Tom Atom got a reaction from Capitaine Herlock in [Phaser] Rabbit Run   
    Hi, Rabbit Run is our endless runner game made for Japanese market. You can play it here: http://games.wkb.jp/ykg/?game_id=rabbitrun
    In fact it is reskinned and adjusted Goblin Run (http://www.html5gamedevs.com/topic/25331-book-game-goblin-run-procedural-endless-runner/) - game I made for my Phaser programming book (https://gumroad.com/l/CZuhn). We added some animations and tutorial, changed score calculations and made a few optimizations.



  5. Like
    Tom Atom got a reaction from Adel in No VS autocomplete on game.physics.box2d   
    yes, it is because box2d is any. Cast it like this:
    let physics = <Phaser.Physics.Box2D>this.game.physics.box2d; Do the same with bodies (code below is from class extending Phaser.Sprite):
    let body = <Phaser.Physics.Box2D.Body>this.body; Make sure you have TS defs (both files): https://github.com/SBCGames/Phaser-Box2D-Typescript-defs
     
  6. Like
    Tom Atom got a reaction from DanielKlava in too many draws, need some help   
    You do not precise how you are drawing individual points. If one by one with something like RenderTexture.RenderXY(), then points are not batched. Instead create group, put points into it and then draw whole group at once.
    I had similar problem in past, here is detailed post:
     
  7. Like
    Tom Atom got a reaction from DanielKlava in Slow rendering into RenderTexture   
    Finally found solution!
     
    When rendering into RenderTexture with renderXY() there is lot of OpenGL settings in Pixi. Even if you use the same texture as target, these settings are repeatedly set for every single call to renderXY().
     
    renderXY() renders one display object a time. So, if you want to save time, avoid repeated setups and benefit from batching, you have to envelope all your drawings into one call. Phaser.Group is also display object, so I created group which is not added into scene. Under this group I built pool of sprites. When I need to render full screen line by line, I then set sprites from this pool and in the end I send only one renderXY() call with group as parameter.
     
    Results:
    - iPad Air: speed increased from 750 milliseconds to 50 milliseconds,
    - Lumia 532: speed increased from 9250 milliseconds to 190 miliseconds!
  8. Like
    Tom Atom got a reaction from Fenopiù in Many atlas for one sprite   
    2048x2048 is still safe size for current devices. With 4096x4096 you may encounter problems.
  9. Like
    Tom Atom got a reaction from damager in "Shaking" a sprite   
    Hi, you can create your own tweening function. For shaking you can use "wiggle" function:
    function wiggle(aProgress: number, aPeriod1: number, aPeriod2: number): number { var current1: number = aProgress * Math.PI * 2 * aPeriod1; var current2: number = aProgress * (Math.PI * 2 * aPeriod2 + Math.PI / 2); return Math.sin(current1) * Math.cos(current2); } and call it from your game like this:
    tweenX.to({ x: this.position.x + aRadius}, aTime, function (k) { return Easing.wiggle(k, aXPeriod1, aXPeriod2); }, true, 0, -1); ... change arguments aXPeriod1 and aXPeriod2 to make different shakes. aRadius gives number of pixels from current x position.
    To shake in both X and Y directions add another tween for Y with different periods.
    If set for x and y with different periods it in fact does nice sin/cos spline movement in range of aRadius (can be different for x and y tween). If period is high and time short, then it makes fast shake. Nice thing is, that this shake looks more natural than just random offsetting. If time is long then you can have for example randomly moving dust particles. See http://sbc.littlecolor.com/woodventure/ - branches are using it, sunrays are using it and dust particles are too using it... even hedgehog's muzzle is using it :-)
  10. Thanks
    Tom Atom got a reaction from Fenopiù in How to use the Phaser in Visual Studio 2017   
    Hi, still on VS 2015, but friend of mine had the same problem in VS 2017 as you have - missing tamplate. It looks this template is not in VS 2017 anymore...
    ...but, some guy created it. Try it here and let others know, if it worked: https://marketplace.visualstudio.com/items?itemName=Rich-Newman.TypeScriptHTMLApplicationTemplate
    For me, in VS 2015, worked always to put Phaset stuff into "lib" folder.
     
  11. Like
    Tom Atom got a reaction from Zampano in Stop and restart a tween/recycling tweens   
    Hi, long time ago I solved reusing stopped tweens - here is detailed topic about it:
     
  12. Thanks
    Tom Atom got a reaction from Puflo in Physics bug   
    First, sorry, this description was confusing:
    ship1.body.setCollisionMask(4); // - will collide only with ship2 (category 2) should be:
    ship1.body.setCollisionMask(4); // - will collide only with ship3 (category 4) What you are building in code is kind of collision grid like this:

    Take row, assign category to your object - like category 1 for ship1 and determine what all other categories you want it collide with (columns for ship2 and ship3). Then set collisionMask to sum.
     
  13. Confused
    Tom Atom got a reaction from Puflo in Physics bug   
    Hi, try to combine setCollisionCategory with setCollisionMask. By default mask is 0xFFFF  - collide with all other groups. Mask has to be set on both bodies (therefore setCollisionMask(1) on both ships). This works:
    function create() { game.physics.startSystem(Phaser.Physics.BOX2D); game.stage.backgroundColor = '#2d2d2d'; // User-controlled ship ship1 = game.add.sprite(250, 300, 'ship'); game.physics.box2d.enable(ship1); ship1.body.setCircle(14); ship1.body.setCollisionCategory(1); //ship1.body.setCollisionMask(2 + 4); // - will collide with ship2 (category 2) and ship3 (category 4) ship1.body.setCollisionMask(4); // - will collide only with ship2 (category 2) // Ship with collision category 2 (triggers contact callback only once) ship2 = game.add.sprite(200, 200, 'ship'); game.physics.box2d.enable(ship2); ship2.body.setCircle(14); ship2.body.setCollisionCategory(2); ship2.body.setCollisionMask(1); // Ship with collision category 1 *default, i guess* (triggers contact callback TWICE) ship3 = game.add.sprite(300, 200, 'ship'); game.physics.box2d.enable(ship3); ship3.body.setCircle(14); ship3.body.setCollisionCategory(4); ship3.body.setCollisionMask(1); game.physics.box2d.setBoundsToWorld(true, true, true, true, false); ship1.body.setCategoryContactCallback(1, function(b1,b2,f1,f2,begin){ if (begin){ total += 1; hitText.text = 'Contact callback called '+total+' times'; console.log("CONTACT: ", b2) } }, this); cursors = game.input.keyboard.createCursorKeys(); game.add.text(5, 5, 'Use arrow keys to move.', { fill: '#ffffff', font: '14pt Arial' }); total = 0; hitText = game.add.text(5, 30, 'Contact callback called 0 times', { fill: '#ffffff', font: '14pt Arial' }); }  
  14. Like
    Tom Atom got a reaction from samme in Stop and restart a tween/recycling tweens   
    Hi, long time ago I solved reusing stopped tweens - here is detailed topic about it:
     
  15. Like
    Tom Atom reacted to samme in how to access my assets in jsdeliver   
    When you're setting an image's crossOrigin property directly, an empty string or any string value besides use-credentials is the same as anonymous. That's why the tutorial code works.
    But for Phaser's Loader#crossOrigin, an empty string is the same as false, meaning don't set the crossOrigin property.
    The server also has to accept the cross-origin request, but I guess that's not the problem in your case.
    So I'm not sure why your two-step method works.  It looks similar to what Phaser is doing in loadImageTag.
  16. Like
    Tom Atom got a reaction from PhaserEditor2D in [Phaser] Dragon Buster Mini   
    Hi,
     Dragon Buster Mini is another remake of Namco classic (https://en.wikipedia.org/wiki/Dragon_Buster) from best decade for arcade games - from 80's! Go through rooms full of traps, creatures and dragons and get as far as you can:
    press Z or tap left half of the screen to change walk direction, press X or tap right half of the screen to jump ... and double jump! Dragon Buster was first game that featured double jump and one of the first that used visual health meter - both things so common nowadays.
            
     
    Play the game here: http://www.bandainamcoent.fun/ww/html5gameplay/c7f770229cb83d5b3b965ffa0540543f/game/dragon-buster-mini#2
     
     
     
  17. Like
    Tom Atom reacted to YngNAmbitious in [WIP] Mad World, Cross-platform MMORPG   
    Hey guys,
    My name is Mike and I'm from Korea.  Me and 14 other guys are making a HTML5 MMORPG called "Mad World".  
    Here's its trailer.
    And here's rain animation
    The game has all the familiar features of MMORPGs but the combat is more face-paced.  It has hand-drawn artstyle like you see here.
    I will be posting some updates here from now on, and maybe some development tips we learn along the way.  We want to be a pioneer in the area HTML5 in Korea which is still very new in the country.
    We want to make it available worldwide by the end of 2018, so we still have a long way to go.  Any feedback is welcome by the way.
    Thanks and let me know what you think of the game!
    For more information on the game, you can visit our website:  www.jandisoft.com
    or follow us on
    Facebook
    Twitter
    Youtube
    Here's the latest update
    We are throwing an in-game Halloween event next week from October 30th to November 1st.  Anyone interested here's a link to the game. http://halloween.madworldmmo.com/  We will open the server during the event time.  Hope we see you guys there. =)

     
    Here's a wip customization system,.  Oh, and we recently opened a forum.  Come by and say hello if you're interested. =)
     
     
  18. Like
    Tom Atom got a reaction from samme in [Phaser] Dragon Buster Mini   
    Hi,
     Dragon Buster Mini is another remake of Namco classic (https://en.wikipedia.org/wiki/Dragon_Buster) from best decade for arcade games - from 80's! Go through rooms full of traps, creatures and dragons and get as far as you can:
    press Z or tap left half of the screen to change walk direction, press X or tap right half of the screen to jump ... and double jump! Dragon Buster was first game that featured double jump and one of the first that used visual health meter - both things so common nowadays.
            
     
    Play the game here: http://www.bandainamcoent.fun/ww/html5gameplay/c7f770229cb83d5b3b965ffa0540543f/game/dragon-buster-mini#2
     
     
     
  19. Thanks
    Tom Atom got a reaction from threeninenineone in Phaser.Cache.getImage: Key not found in Cache.   
    Hi, call to load does not load asset - it puts it into list that will be loaded later. And this later happen automatically when preload function is finished (in preload you list all assets you want to load) or when you call load.start().
     
    I highly recommend to preserve Boot state separated from Preload state. If your Boot state has only little code, then be happy   - best functions are those, that do their work and are short and easy to read.
  20. Like
    Tom Atom got a reaction from bubamara in [Phaser] Sky Kid Mini   
    Hi,
     Sky Kid Mini is new HTML5 version of legendary Sky Kid game form mid 80's (https://en.wikipedia.org/wiki/Sky_Kid). Fly as far as you can, avoid obstacles and use collected stars to unlock all 5 different planes.
         
     
    Play the game here: http://www.bandainamcoent.fun/ww/html5gameplay/f0762cddd94f66e78f507fd63ebdad10/game/sky-kid-mini#2
     
     
     
  21. Like
    Tom Atom got a reaction from Umz in [Phaser] Sky Kid Mini   
    @BdR, @Karma Octopus  "enter initials" window is part of site framework around game. As the site is new, I think, they are still working on it. For me, enter button did not work too.
     You are right, that landscape layout is better for this type of games. But I have experience, that if client is strongly targeting mobiles, they usually want portrait layout.
     
    @BdR - some time ago I was searching internet for very old LCD game I remembered from school. I could not remember the name and now I see it in your signature! It was Highway
  22. Like
    Tom Atom got a reaction from Befive.Info in [Phaser] Sky Kid Mini   
    Hi,
     Sky Kid Mini is new HTML5 version of legendary Sky Kid game form mid 80's (https://en.wikipedia.org/wiki/Sky_Kid). Fly as far as you can, avoid obstacles and use collected stars to unlock all 5 different planes.
         
     
    Play the game here: http://www.bandainamcoent.fun/ww/html5gameplay/f0762cddd94f66e78f507fd63ebdad10/game/sky-kid-mini#2
     
     
     
  23. Like
    Tom Atom got a reaction from Topogram in box2d plugin - sprite not following body   
    Hi, by default PTM is set to 50. Also when you call:
    game.physics.startSystem(Phaser.Physics.BOX2D); Default debug draw is initialized. It has to convert box2D meters to pixels, so it is using also PTM.
    When you then set PTM to different value, it changes it in box2D physics engine, but not in debug draw module. So, your game works correctly, while it may sound surprising. Problem is, that box2D flipper is drawn with old PTM (50) - so debug draw is scaled down. To correct it call it like this:
    game.physics.box2d.ptmRatio = 500; game.physics.box2d.debugDraw = new Phaser.Physics.Box2D.DefaultDebugDraw(500); game.physics.box2d.world.SetDebugDraw(game.physics.box2d.debugDraw); It will reinitialize debug draw with new PTM.
    While it will solve your problem, I think, you will still not like it, as your pinball table now will be 10x bigger than before, but it is drawn correctly. Using PTM 500 is not good. Circles in your table are crated with size like 2.8 meters. But as it is then converted into pixels with PTM 500 then circle is 2.8 * 500 = 1400 pixels...
    Last thing, I noticed is, that you are using some older version of Phaser box2D plugin. Get new one - it has method setPTMRatio(PTM) and this method resets debug draw for you automatically.
     
  24. Like
    Tom Atom got a reaction from Umz in Phaser Signal usage & examples   
    Hi, some time ago I wrote this tutorial: http://sbcgamesdev.blogspot.cz/2016/01/phaser-tutorial-using-phaser-signals.html
    You will find there also examples how to pass arguments when dispatching (for all listeners + listener specific)
     
  25. Thanks
    Tom Atom got a reaction from PBMCube in Making a jigsaw puzzle game with Phaser   
    Hi, look at this example: http://phaser.io/examples/v2/bitmapdata/alpha-mask
    I would take a picture and cut it into pieces with masks for particular parts. In the rest of the game I would use these prerendered puzzle parts.
     
×
×
  • Create New...