Fractal Games

  • Content Count

  • Joined

  • Last visited

1 Follower

About Fractal Games

  • Rank
  • Birthday 09/07/1990

Contact Methods

  • Website URL (in development)
  • Skype

Profile Information

  • Gender
  • Location
    Varna, Bulgaria
  • Interests
    Mathematics, yoyo, tennis and others

Recent Profile Visitors

1067 profile views
  1. Hey everyone, My question is quite basic. We have a game with lots of animations. One animation has a quite large spritesheet. When we play the animation for the first time the whole game lags for a couple of ms. Afterwards, there is absolutely no lag when we play the animation. Is there any way to preload/prerender/preplay the animation? Below is the relevant code: 1. Loading the spritesheet in the Boot Scene's preload method: this.load.spritesheet('some-anim', /some-anim.png', { frameWidth: 160, frameHeight: 546, startFrame: 0, endFrame: 29 }); 2. Creating an animation in the Boot Scene's create method: this.anims.create({ key: 'some-anim-key', frames: this.anims.generateFrameNames('some-anim'), frameRate: 30, repeat: -1 }); 3. The Sprite class export class MyAnim extends Phaser.GameObjects.Sprite { scene: Phaser.Scene; constructor(scene: Phaser.Scene) { super(scene, -1500, -1500, null); this.scene = scene; this.anims.load('anticipation'); this.setAlpha(0); this.scene.add.existing(this); } } 4. Playing the animation in the game state: this.myAnim = new MyAnim(this); //this points to the game scene. this.myAnim.setAlpha(1);'some-anim-key'); Thank you in advance for your help
  2. Hey everyone, We are currently developing a scratch game and have started using Phaser 3 for the first time (wohoo!). The scratching effect should work on CANVAS as well (or only CANVAS is also fine). I saw this demo CLICK , but it is not working. I also tried the approach in this topic CLICK without any luck. Currently I am using the code from this demo: CLICK which looks something like this: this.scratchBG = this.add.sprite( / 2, / 2, 'scratch-bg').setInteractive(); this.texture = this.textures.createCanvas('canvastexture', this.scratchBG.width, this.scratchBG.height); this.scratchFG = this.textures.get('scratch-cover').getSourceImage(); this.brush = this.textures.get('brush').getSourceImage(); this.texture.draw(0, 0, this.scratchFG); this.texture.context.globalCompositeOperation = 'destination-out'; this.input.setDraggable(this.scratchBG); this.input.on('drag', (pointer) => { this.texture.draw(pointer.x, pointer.y, this.brush); }); The scratching works, but I have a few problems with this approach. 1. I cannot reposition the 'canvastexture' element 2. I cannot set scale or rotation to the brush. 3. Is there a wait to check pixels for percentage of revealed area? And more generally, Is my approach correct? Any suggestions will be much appreciated. The final goal is something like this: CLICK
  3. Thanks man! Quite the effort there! I hope at some point Phaser 3 adopts your approach.
  4. After some more reading I found out that tint is not supported in Canvas. Does anyone have other suggestions? Basically, I have lots of circles and each circle needs to be able to change its colour. If I add 4-5 more sprites for each colour I need in each circle, this means that for 20 circles, there will be 100 more sprites (most of them not visible, but still...). Any ideas?
  5. Hey everyone, I am migrating a game theory software from Phaser 2 to Phaser 3. You can check it out here. My tint problem: I need to create a black line, so I use graphics and create a white pixel, I save it to a texture, then I create a sprite from the texture, scale the sprite and then tint to black. The reason why I am using tint, is because I have many lines, they could be changing colours in the future and so on. I would just like to reuse this white pixel and change its colour very often // Create the pixel createGraphicsPics() { ={x: 0, y: 0});, 1.0);, 0, 1, 1);"line", 1, 1); } // Create the line this.line1 = this.add.sprite(this.point2.x, this.point2.y, "line") .setOrigin(0, 0.5) .setScale(0, 5) .setRotation(-Math.PI * 0.25); this.line1.setTint(0x000000); // Not Working this.line1.tint = 0x000000; // Not Working this.line1.setTint(0x000000,0x000000,0x000000,0x000000) // Not working //Also tried setTintFill... and tintFill=true to no avail // Adding tween to scaleX next, which works Even when I log the tint it says undefined. Also for some strange reason, the line is not centered from point2 to point1. Thanks for your help in advance.
  6. Hey there, We have released our largest project so far. The game is called Graphz and is a collection of puzzle games with dots and lines. There are 6 games and 480 levels in total. You can get it HERE. iOS build coming soon Next up is our Sudoku+Solver which will be amazing
  7. Bump! If you need a quote on your project, just send me an email and I will respond ASAP!
  8. Hey there, My name is Martin and I am the founder of Fractal Games and Zariba Game Academy. Fractal Games is a small, independent studio for creating original brain/puzzle HTML5 games. In Zariba Game Academy have different courses in game development, including one in Phaser. Having gained lots of experience in the last couple of years, we have decided to offer our services to help creating your games. We use the following technologies, among others: UI: HTML, CSS, JavaScript, jQuery and Angular (if necessary) Backend: Python or nodeJS Game Dev: Phaser and TypeScript Builds: Cordova, Crosswalk, Android Studio, Xcode, Gulp etc. What we can offer: Very reasonable (indie/freelance) prices and quick development. High quality code, structure and architecture to make your game/s as maintainable and extendable as possible. Highly responsive and scalable games - dynamically resizeable both in portrait and landscape. We can build your game/s for Web, Android, iOS, Facebook and Amazon, among others. We can implement native functions for Android and iOS like Score Sharing, Facebook and G+ login,personalized accounts with avatars... etc. LINKS: Website (beta) Daily Challenge (Sudoku is in beta) Google Play profile (more games soon) iOS Build (currently publishing more for iOS) Phaser Course from Zariba Academy Worms Clone for Zariba Academy (demo) Zeef Page (Zariba Academy) If you are interested, feel free to contact me directly: email: antonov.martin {((at))} skype: foggy-in_your_eyes facebook
  9. I managed to make it work with static, but it really is not an ideal solution. If anyone has and idea and the time to check for another solution, I would be thankful.
  10. Tried removing the angularDamping, also setZeroVelocity is not working. Even in the update when I set zero velocity (either with the method or by hand), the worm keeps moving and is affected by some sort of gravity. I would like to avoid static but if this is my only option, then I will have to... i guess...
  11. Just made a commit with the contact material. It is not working for me. You can take a look in the demo. Your game looks cool. Would love to play it when it is ready This will be unfortunately just a demo project. Making an html5 copy of worms would take me at least a couple of years. The worms' developers really knew their programming back in 1999
  12. I see what the problem is. As you have already made it work very well, I would just suggest that you use a variable inside your rotateLeft method. If you are on a steep slope the variable will be higher, if you are on a straight line it can be 450 (mby smaller if you are going downhill). You can change it manually, depending on the position of your enemy. How does that sound?
  13. Hey, I think (not sure) that the difference between pivot and anchor is that the pivot does not change the position of the sprite. So set the pivot to 1,1 initially. Rotate 90 degrees (the sprite), Change the pivot to the new point (1,0). I have drawn a picture, hope it helps and you make it work. By manually, I mean directly to the sprite, without physics. If you can't make it work and are willing to share your code, i can try to play with it a bit in my spare time.