s4m_ur4i

Members
  • Content Count

    148
  • Joined

  • Last visited

About s4m_ur4i

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    instagram.com/s4m_ur4i
  • Twitter
    s4m_ur4i

Profile Information

  • Gender
    Male
  • Location
    WA, Australia

Recent Profile Visitors

1,684 profile views
  1. s4m_ur4i

    Great free and low-cost game graphics

    Hey Guys, another one is online! you should check it out. https://s4m-ur4i.itch.io/metroid-scifi-pixelart-tileset all sets: https://s4m-ur4i.itch.io twitter: https://twitter.com/s4m_ur4i
  2. s4m_ur4i

    Great free and low-cost game graphics

    HUGE release! 1500+ Sprites Please check it out! https://s4m-ur4i.itch.io/huge-pixelart-asset-pack
  3. s4m_ur4i

    Great free and low-cost game graphics

    Hey Guys, I just released a top-down zelda-like perspective Dungeon Tileset, with objects and monsters. please check it out! https://s4m-ur4i.itch.io/16x16-topdown-dungeonset-pixelart
  4. s4m_ur4i

    Great free and low-cost game graphics

    More Stuff! Check it out! 🎉 https://s4m-ur4i.itch.io/factory-tileset
  5. s4m_ur4i

    Great free and low-cost game graphics

    HEY! It's again: FREE game asset day! haha https://s4m-ur4i.itch.io/free-sprites-elements-8x8-retro-pixelart-platformer-brawler I hope you enjoy! this is for the game jam: https://itch.io/jam/mini-jam-14-elements- (But you can use it even after it, or for something else ) credit is appreciated. -- If you like it, check out my other projects, I just released a big Metroidvania / roguelike/platformer Tileset: https://s4m-ur4i.itch.io/2d-metroidvania-tileset-16x16 Everything is low cost because of Indies Check out everything: https://s4m-ur4i.itch.io
  6. s4m_ur4i

    Great free and low-cost game graphics

    Hey Guys! Yesterday I released a free PICO-8 tileset, free for everyone to use, so grab it! https://s4m-ur4i.itch.io/pico-8-pixelart-free-tiles If you like it, check out my other projects, I just released a big Metroidvania / roguelike / platformer Tileset: https://s4m-ur4i.itch.io/2d-metroidvania-tileset-16x16 Everything is low cost because of Indies Check out everything: https://s4m-ur4i.itch.io
  7. s4m_ur4i

    problem with setScale on layers

    Hey, You mean the gaps between those tiles? If you don't have a moving camera, it can be that the graphics aren't 100%. note: If you later on plan to at a moving camera, I suggest, you create a margin around every tile in your graphics file. and add a bit more of the colors on the edges, because there will be small gaps on those graphics if the camera moves fast. Also tile culling doesn't fix this as of this threat:
  8. s4m_ur4i

    Reading input from a keyevent

    Hey I'd like to share my controls class with you: Maybe it is helpful for your purpose Everytime const controls = new Controls -> if(controls.on('keyname')) is done, you get a true or false. class Controls { constructor(scene) { this.scene = scene; this.enabled = true; this.keyboard = this.scene.input.keyboard.createCursorKeys(); this.key = this.scene.input.keyboard.addKeys({ 'TAB': Phaser.Input.Keyboard.KeyCodes.TAB, 'ESC': Phaser.Input.Keyboard.KeyCodes.ESC, 'Space': Phaser.Input.Keyboard.KeyCodes.SPACE, 'X': Phaser.Input.Keyboard.KeyCodes.X, 'One': Phaser.Input.Keyboard.KeyCodes.ONE, 'Two': Phaser.Input.Keyboard.KeyCodes.TWO, 'F': Phaser.Input.Keyboard.KeyCodes.F, 'C': Phaser.Input.Keyboard.KeyCodes.C, 'W': Phaser.Input.Keyboard.KeyCodes.W, 'M': Phaser.Input.Keyboard.KeyCodes.M, 'I': Phaser.Input.Keyboard.KeyCodes.I, 'A': Phaser.Input.Keyboard.KeyCodes.A, 'S': Phaser.Input.Keyboard.KeyCodes.S, 'D': Phaser.Input.Keyboard.KeyCodes.D, 'E': Phaser.Input.Keyboard.KeyCodes.E, 'Enter': Phaser.Input.Keyboard.KeyCodes.ENTER }); } on(actionName) { switch (actionName) { case 'left': return (this.keyboard.left.isDown || this.key.A.isDown) && this.enabled; case 'right': return (this.keyboard.right.isDown || this.key.D.isDown) && this.enabled; case 'down': return (this.keyboard.down.isDown || this.key.S.isDown) && this.enabled; case 'up': return (this.keyboard.up.isDown || this.key.W.isDown) && this.enabled; case 'X': return this.key.X.isDown && this.enabled; case 'Y': return this.key.C.isDown && this.enabled; case 'M': return this.key.M.isDown && this.enabled; case 'I': return this.key.I.isDown && this.enabled; case 'jump': return (this.key.Space.isDown || this.key.F.isDown) && this.enabled; case 'B': return (this.key.E.isDown || this.key.Enter.isDown) && this.enabled; case 'LT': return this.key.One.isDown && this.enabled; case 'RT': return this.key.Two.isDown && this.enabled; case 'MENU': return this.key.ESC.isDown && this.enabled; } } } You can achieve the same with events, triggering a: this.scene.event.emit('key_<name>'); on a keypress every time a key is pressed.
  9. s4m_ur4i

    Dynamic Text Size

    For me, I choosed a higher Text size and just scaled it down (0.1) so you can use values below scale = 1 01. - 1.0 I think this is because the rendered text (scale 1.0) is threatened like a sprite. When scaling it up, it gets blurry too. By making the text just bigger by default and working with lower scale values, I did not see any pixelation. Hope that helped
  10. s4m_ur4i

    Exclude graphics from Camera Shake

    Personally, I found that using multiple scenes is a lot more comfortable for many things, like UI elements etc. because it can get messy if your game gets bigger. It kind of sorts it. And also is not affected by the camera of the other screen - as Rich already pointed out. The only thing is, that you have to get sure the new scene (if your game is bigger than the view) is aligned with the underlying scene.
  11. s4m_ur4i

    How to align game in webpage

    add "rel=stylesheet" to your <link> element. Get sure that the path to your CSS-File is correct. The CSS seems not to be loaded as of the background of the text-boxes should be black. also: I think you need to give your canvas an ID and put it in the phaser game config, not sure about that, since I never used it that way. Maybe someone else can clarify. and add this to your CSS to get rid of browser defaults * { margin: 0; padding: 0; outline: none; text-decoration: none; border: 0; }
  12. s4m_ur4i

    How to tween scale in Phaser 3

    this.scene.tweens.add({ targets : this , scale : 10 ease : 'Linear', duration : 500, }); You can simplify it. targets only needs to be an array if it's multiple targets. scale: 1 does both X&Y yoyo default is false, as 0 of repeat and "this" of callbackScope.
  13. After digging through the documentation: I think this is not intended behavior. At least, if you have a game were the camera zoom out and in because of multiplayer or having an action platformer, there is no way to fix any sprite to the camera's view. If a sprite is set with sprite.setScrollFactor(0) it should be kept in view when the sprite's position is initially in view. Even if the camera is zoomed.Zoom is an option on the game config, and useful in a lot of cases to have your game with a base zoom. Rather than taking the scrollX and scrollY of the camera, which are minus values by zoom > 1, setScrollFactor should align to the worldview. Or at least it would be helpful to have a value that can be set to be fixed on zoom. Because, as far as I am aware, there is nothing to calculate the offset of the current zoom right now. solution: use a second scene for UI stuff, or alignment
  14. I am on WebGL mode, with a camera.zoom(7) and put some sprites to setScrollFactor(0) they disappear. So I had a look at the camera, in the top left corner of the game, it has a .scrollX/Y of high minus values. I already recalculated the world bounds and camera bounds, but that won't help. For me, this seems like a bug right now, but maybe I am again just missing something. I also noticed that the: this.camera.main.worldView.width // also height Is not set correctly, it is set some milliseconds after create is initiated, but if I log it directly in create it just holds the whole window width in pixels, not the zoomed calculation. Can someone else have a look at this? It's reproducible as far as I can see. Thanks in advance EDIT: as I see, this intended behavior, not a bug: setZoom( [value]) Set the zoom value of the Camera. Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. Changing to a larger value, such as 2, will cause the camera to 'zoom in'. A value of 1 means 'no zoom' and is the default. Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. https://photonstorm.github.io/phaser3-docs/Phaser.Cameras.Scene2D.Camera.html#setZoom__anchor But is there a way to get scrollFactor to work with a zoom? Reason: I got a camera permanently on zoom, which needs some UI displayed.
  15. So I assume it's the same for phaser3. Don't really get why. Because you would want to check an overlap with all the Tiles that are existing in that layer. Or not? Nonetheless. For me, this question is answered. thanks samme