Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    quiphop reacted to 8Observer8 in Colyseus - Minimalistic MMO Game Server   
    Hello! Could I download the source code of the tanx.io server? This link is dead: https://github.com/Maksims/tanx
  2. Thanks
    quiphop reacted to ClusterAtlas in Simple, fast, independent, physics engine alternatives?   
    I'd hella agree that most physics engines out there are tad bit bloated & overkill.
    The route I went was to actually analyse implementations done by existing libraries and write my own implementations in a fitting manner towards my code. Ie: In a platformer game I only need to check collision on floors and floating tiles whenever the unit's downward velocity is greater that its upward velocity. Another example is checking only between a predefined set of objects, instead of checking against **ALL** objects - big performance boost right there so to speak.
    Check these couple repo's anyways, these got great insights on collision handlings:
    edit: This event emitter is handy too in any 'handling' part.  
  3. Like
    quiphop got a reaction from Azerion in Who is the best at making high-quality HTML5 games?   
    These guys are super qualificated (and some of them are members on this forum) 
  4. Like
    quiphop reacted to Ashley Hannes in Features Scope and Approaches of Android Game Development   
    The prospects of an Android game developer have been on the rise due to extensive growth and popularity of Android operating system. This operating system is user-friendly along with being innovative in UX and UI. 
    A large number of Android game application development companies opt for the following steps in their scope and approach of work: https://www.redappletech.com/features-scope-approaches-android-game-development/

  5. Like
    quiphop reacted to rich in Sprite with .inputEnabled=true blocking other input   
    If doing an art package style thing then I would suggest using Input.addMoveCallback to get a smoother result than polling pointer coordinates in an update.
    Also the Input manager has a coordinate history feature built in btw (Input.recordPointerHistory) but I wouldn't use this for a drawing app personally.
  6. Thanks
    quiphop reacted to samme in How to free memory after create sprite based on bitmap   
    I think you should use Group#removeAll(true) instead of removeChildren().
    I think BitmapDatas also have to be destroyed manually:
  7. Thanks
    quiphop reacted to luq in How to free memory after create sprite based on bitmap   
    Yep, this work correctly. I add this onDestroy event to getRoundedImage() like this
    var PhaserUtils = { /** * Create sprite with rounded corners * * @param {Phaser.GameObjectCreator} game * @param {Number} x * @param {Number} y * @param {String} src * @param {Number} radius * @return {Phaser.Sprite} */ getRoundedImage: function(game, x, y, src, radius){ var sprite = game.make.sprite(0, 0, src); var bitmap = game.make.bitmapData(sprite.width, sprite.height); var mask = game.make.graphics(0, 0); bitmap.smoothed = false; mask.beginFill(0xffffff); mask.drawRoundedRect(0, 0, sprite.width, sprite.height, radius); mask.endFill(); var maskSprite = game.make.sprite(0, 0, mask.generateTexture()); bitmap.alphaMask(sprite, maskSprite); var res = game.make.sprite(x, y, bitmap); mask.destroy(true); maskSprite.destroy(true); sprite.destroy(true); // On destroy this sprite destroy also a bitmap res.events.onDestroy.add(function(){ bitmap.destroy(); }); return res; }, };
    I also see that i can destroy my bitmap with 3. param of Group.removeAll() method https://phaser.io/docs/2.6.1/Phaser.Group.html#removeAll but i think this is worse way to do this.
    To suck is`t that  not all methods removed children from group can`t dispatch children onDestroy event, i think it can be despatched always by default.

    EDIT: Okey, I guess I understood - remove and destroy is totally different process

    Thx for help!
  8. Like
    quiphop reacted to rich in Simple game - horrible performance on Android/CooconJS   
    Ok so when you use forceSingleUpdate you basically eliminate the delta timer inside Phaser. This means all physics will be using an 'assumed' dt value of 60fps. If you know your game can reach 60fps under Cocoon without any troubles, then it will be fine. Also if your game doesn't really use much or any Arcade Physics, you will be fine doing this too. P2 has its own physics timer, so it won't touch that.
    All that is likely to happen is that on really crappy devices that can't manage 60fps then the Arcade Physics calculations will likely be wrong. But like I said above, this might not matter. Depends on the game.
  9. Thanks
    quiphop reacted to Snovind in Making games with TypeScript - book   
    Hey, I'm writing a book about game programming from scratch using TypeScript. https://makinggameswithtypescript.com/
    The book is in early access and most of the chapters are incomplete, however, I'm seeking feedback to see if the format I am going for is useful for people.
    The book focuses on the systems and components needed to create a game similar to Super Crate Box.
    Here are some of the chapters that I would consider more complete:
    The book is far from done, but I'm interested in getting feedback to see if I'm on the right track.
    Did you find it interesting or useful?
    Did you have any issues with the web page?
    Any other feedback you want to share?
  10. Like
    quiphop reacted to ivan.popelyshev in Background safe area scaling with window size   
    Things that you have to study (look in docs, source code):
    1. Renderer.resize and its super.
    2. container.position, container.scale, container.pivot. If you want to do something in center of screen. position = center, pivot=local coords of that center. Go figure out how those two work.
    3. CSS resize. "canvas.width" and "canvas.style.width" are different things. you can scale canvas instead and get a result. Also margin-left margin-top and other CSS things.
    Algorithm that is suited for your game is born from those three things. Unfortunately, only a few people made that and reported back their findings, and I cant solve every person issues because, actually, its different for everyone  If you solve your case , please make an article or at least small post here, maybe we'll get to more general case based on everything people report
      Someone's medium article: https://medium.com/@michelfariarj/scale-a-pixi-js-game-to-fit-the-screen-1a32f8730e9c
    More of those threads:
  11. Like
    quiphop reacted to nkholski in Exploding sprites   
    Just uploaded a basic demo: http://niklasberg.se/entityExplode/index.html
  12. Like
    quiphop reacted to nkholski in Exploding sprites   
    I just finished an effect to make enemies in my game explode into pieces when getting killed. What it does is to create an emitter at the coordinates of the enemy bursting subparts extracted from the sprite. I think the result was kind of cool so I spent some extra time cleaning up the code a bit so I can contribute with something (after being given so much from Phaser and the forums). 
    Edit: Basic online demo

    "Before and after"
    After the preloader finishes it allows you to define explosions (entityExplode.setup) based on sprites in a SpriteAtlas (I'm using TexturePacker). The entityExplode.setup will add references to subparts of a selected subsprite but not add or alter any of the imagedata.
    When defining a new state you need to call entityExplode.init in Create.
    If the setup was correctly done you will be able to explode a sprite with entityExplode.play (you need to remove the sprite yourself after calling play if you don't want both the sprite and the explosion to show).
    If you call entityExplode.bounceAndFade in your state's update function the pieces will bounce on a tilemap layer and fade away before being removed.
    Any suggestion on how to improve this is appreciated. You are free to use and modify the code any way you want.
    * A lot of hard coded values fits my game well, but is probably not the best fit for everyone (such as size of the parts, speed of the emitter or number of parts to send out).
    * I haven't checked out the Atlas object-stuff enough to know what everything does, I'm just cloning the original frame and changes the things that makes this work (including duplicating UUID). 
    * There is for sure things that could improve the emitter. I would love to find a way to get the pieces to stop sliding on the ground and I would prefer that the stopped their rotation once on ground.
    entityExplode = { init: function (that) { // Called from Create for any state that will use entityExplode that.explosionEmitters = game.add.group(); }, setUp: function (explodeName, frameName, atlasName, fragmentSize) { // Can be called anytime after Preloader finishes (at least after the atlas json is loaded) // Prepare a possible explosion so that can be called by the play method later. // explodeName = name of the explosion to create // frameName = frame name in atlas to build from (I only define one explosion per entity since the sprite get distorted and it doesn't matter much if the entity was jumping or walking or something else when exploding.) // atlasName = name of atlas to use // fragmentSize = size of fragment in pixels (default = 8) var sourceFrame = false; var xcount, ycount, temp; var frameNames = []; if (!("explosionFrames" in this)) { this.explosionFrames = []; } if (explodeName in this.explosionFrames) { return; // No double-trouble } if (frameName in game.cache._images[atlasName].frameData._frameNames) { sourceFrame = game.cache._images[atlasName].frameData._frames[game.cache._images[atlasName].frameData._frameNames[frameName]]; } else { console.log("ERROR! FrameName not found"); return } if (typeof (fragmentSize) === "undefined") { fragmentSize = 8; } xcount = Math.floor(sourceFrame.width / fragmentSize); ycount = Math.floor(sourceFrame.height / fragmentSize); temp = JSON.parse(JSON.stringify(sourceFrame)); // Kind of a hacky way to copy an object for (var x = 0; x < xcount; x++) { for (var y = 0; y < ycount; y++) { temp.name = explodeName + "_explode" + (x * ycount + y); temp.x = sourceFrame.x + x * fragmentSize; temp.y = sourceFrame.y + y * fragmentSize; temp.width = ((temp.x + fragmentSize) > (sourceFrame.x + sourceFrame.width)) ? (sourceFrame.x + sourceFrame.width - temp.x) : fragmentSize; // stay within the sprite-size temp.height = ((temp.y + fragmentSize) > (sourceFrame.y + sourceFrame.height)) ? (sourceFrame.y + sourceFrame.height - temp.y) : fragmentSize; // Add the fragment to the atlas data (this works, but it also just duplicates a lot of values I don't know what they do) game.cache._images[atlasName].frameData._frameNames[temp.name] = game.cache._images[atlasName].frameData._frames.length; game.cache._images[atlasName].frameData._frames.push(JSON.parse(JSON.stringify(temp))); frameNames.push(temp.name); } } this.explosionFrames[explodeName] = { atlas: atlasName, frames: frameNames // A list of framenames to select from when doing an explosion! } game.explosionFrames = this.explosionFrames; }, play: function (entity, explodeName, that, hitFrom) { // Called to initate explosion of entity // entity is the object to explode, typically sprite // explodeName is a explosion previously defined in setUp // hitFrom is optional, from right or left (could be replaced by sprite object and then calculate the direction of explosion from velocity of impacting bullet using trigometry but I don't need that) var explode = game.add.emitter(entity.x, entity.y, 100); // Add the explosion at the entity coordinates if (!(explodeName in this.explosionFrames)) { console.log("Error: Nothing to explode!"); return; } explode.bounce.setTo(0.5, 0.5); if (hitFrom === "right") { explode.setXSpeed(-100, -10); } else if (hitFrom === "left") { explode.setXSpeed(10, 100); } else { explode.setXSpeed(-50, 50); } explode.setYSpeed(-100, -200); explode.makeParticles(game.explosionFrames[explodeName].atlas, game.explosionFrames[explodeName].frames, 100, 250, 100, true); explode.particleFriction = 10; // Makes no difference! explode.start(true, 2000, 1, 20, 20) game.time.events.add(Phaser.Timer.SECOND * 3, function () { explode.destroy(); }); that.explosionEmitters.add(explode); }, bounceAndFade: function (that, tilemapLayer) { // Called from update for (var i in that.explosionEmitters.children) { that.physics.arcade.collide(that.explosionEmitters.children[i], tilemapLayer); that.explosionEmitters.children[i].forEachAlive(function (p) { p.alpha = p.lifespan / that.explosionEmitters.children[i].lifespan; }); } }}
  13. Like
    quiphop reacted to nkholski in Exploding sprites   
    Thanks. I uploaded the latest version I could find on my hard disk to Git. It's the unmodified version from that one I used in "Robotic Conflict" (http://dev.niklasberg.se/roboticConflict/). It will contain bugs for sure and probably some ugly hacks just to get it to work. This version can blow up both sprites and tiles on a tilemap, and requires Phaser 2.4.x (The code I posted in the first post will not work in Phaser 2.4+ because of changes on how cache works). If there is a demand I might update it and make a proper repository.
    Gist: https://gist.github.com/nkholski/533cfbf0272a3c41273c
  14. Like
    quiphop reacted to Megabyte in Zombie hunters arena   
    25 kb · Done
    Hi. Some time ago i have ported my old multiplayer flash game in to HTML5.
    You can heck game out here
    Game made on my HTML pixi based visual editor (thing-editor). Engine is in beta yet, some things is not finished, and timeline need refactoring. : )
    Game works well on mobile, in landscape/portrait mode. Has virtual onscreen controllers.
    But no sound yet. I really stuck with sound and music.
  15. Like
    quiphop reacted to Edouard in Left 4 Dead 2D   
    I just finished my game done completely in html, css and js, while using the game engine phaser 3.
    You can test out the game on the Google play store: https://play.google.com/store/apps/details?id=com.edouardmurat.left4dead2d
  16. Like
    quiphop got a reaction from mattstyles in [WIP] Bumgineer Demo   
    You can buy crowbar at the dump (and also few more cool items) (btw You're  just gave me an idea to move the shop to its own screen state, thanks!) 
    Yeah, a lot of people can't pass through the first equipment update, I'm working on new location between Metro an Parking to make the game progress smoother

  17. Thanks
    quiphop reacted to b10b in [WIP] Bumgineer Demo   
    @quiphop that was fun but also a bit frustrating ... first few loops around the Parking lot were probably enough to put most people off?  I eventually defeated the first boss and found the Monkey, but couldn't find the CROWBAR or ReverseMicrowave.  Despite looking in the code   They just didn't spawn (nor did MOLOTOVS ever?).  Felt like a bug, so quit.  Help please.
  18. Thanks
    quiphop reacted to mattstyles in [WIP] Bumgineer Demo   
    I found it really hard to get started.
    I couldn't fight anyone without dying quickly, so it meant jumping in and out of the market to raid the dumpster. Is there another way to get the $$$ to improve?
  19. Like
    quiphop reacted to Justin_Wang123 in Rogue Fable III   
    Hello everyone! I've been working on Rogue Fable III for about 4 months now, preparing to bring it onto Steam through early access where development will then continue. Since I'm very nearly ready to make the transition I've released the game in its current form to the web which you can check out at the link below. As with RFII, the game was made using Phaser. All feedback is welcome and appreciated.

  20. Like
    quiphop reacted to valueerror in do i need to call Sound.stop() after Sound.fadeOut() on a looped sound?   
    the question is:  does fadeOut(); stop a loop?  
    i start my music with the following lines:
    heartbeat = game.add.audio('heartbeat',1,true);heartbeat.play('',0,1,true); so it runs in a loop..
    then i call 
    heartbeat.fadeOut(700); and i wonder if i have to stop it afterwards to avoid that the sound is running along with 0 volume...
  21. Like
    quiphop reacted to jest in Phaser 3 - Video tutorial series Free   
    Some people hate typescript but I can't take it anymore, the loose nature of JavaScript is eating me alive. Tutorial series as explained can still be followed along with JavaScript seamlessly as mentioned in the video.
  22. Like
    quiphop reacted to jest in Phaser 3 - Video tutorial series Free   
  23. Like
    quiphop reacted to jest in Phaser 3 - Video tutorial series Free   
  24. Like
    quiphop reacted to jest in Phaser 3 - Video tutorial series Free   
  25. Like
    quiphop reacted to jest in Phaser 3 - Video tutorial series Free   
    @mhcdotcomglad they helped
    wew, finally done with the menu. get it while it's hot!
  • Create New...