-
Content Count
15 -
Joined
-
Last visited
About msanatan
-
Rank
Member
- Birthday 01/31/1991
Contact Methods
-
Website URL
https://msanatan.com
-
Twitter
marcussanatan
Profile Information
-
Gender
Male
-
Location
Trinidad and Tobago
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
-
msanatan reacted to a post in a topic: |WIP] Open source 3D space sim Interstellar Armada: Galactic Ace
-
msanatan reacted to a post in a topic: |WIP] Open source 3D space sim Interstellar Armada: Galactic Ace
-
-
Hey everyone! I used a variety of methods to load custom fonts in Phaser games. After some reading and experimenting, the FontFace object is literally the best thing to happen to me. I decided to write a blog about it because I don’t want to forgot how I did it haha, and hopefully it helps you too. https://msanatan.com/2020/11/08/loading-fonts-in-phaser-with-fontface/ My usual setup involved NPM + TypeScript. However, it shouldn’t be a hard jump if you’re one to load Phaser with the script tag.
-
Just sharing here in case anyone else clicks, https://ourcade.co is a great resource for Phaser tutorials! They got videos, blog posts (though it was stopped in favour of vids, the content is still good) and books! I've subscribed to their newsletter and it's been great.
-
-
-
Thanks for the feedback, it's greatly appreciated! I got a couple of things to fix, so I'll double check that logic and be sure it speeds up every 15 points or so
-
-
-
Yea, game jams are fun! Thanks for playing
-
-
https://msanatan.itch.io/hyper-match I like participating in game jams whenever I could. Luckily, I had time for Devtober! I've been doing lots of Phaser work recently, so I figured a chilled casual game would be a nice project to keep me going. Even with this simple mobile game, I still learned a lot in the process! What's your highest score?
-
Simple fun, good work! Works well for your goal
- 3 replies
-
- ghosts
- one button
-
(and 1 more)
Tagged with:
-
-
-
The switch up is a good touch. Well done!
- 3 replies
-
- black and white
- pong
-
(and 2 more)
Tagged with:
-
-
-
Sounds good @selgkr. I once did an experiment with Phaser + socket.io, I think I hosted it on Heroku as it was pretty simple to update via Git. I primarily use AWS nowadays, mostly ECS. It can get expensive 😒. Hey, whatever works
-
Hey @a.lead, I worked on a game where I took objects from Tiled and put them into sprite groups. Like you, I used the createFromObjects() function. I then looped through each object and enabled physics via the Scene object. After they were enabled, I added them to a sprite group. The code structure may not be super clear without the full context, but I figure it would still help: // This function makes a Tiled object a sprite with a physics body // We need a scene object to enable physics const createSpike = (spike, scene) => { spike.setOrigin(0.5, 0.5); scene.physics.world.enable(spike, Phaser.Physics.Arcade.DYNAMIC_BODY); spike.body.setSize(32, 30); spike.body.setImmovable(true); spike.body.setAllowGravity(false); }; // The code below was called in my create() function of my game let spikeObjects = tilemap.createFromObjects( TILED_SPIKES_LAYER, TILED_SPIKES_Key, { key: SPIKE_KEY }, this ); // If the createFromObjects method fails, it returns null // We just set it to an empty array to not deal with errors if (!spikeObjects) { spikeObjects = []; } spikeObjects.forEach((spike) => { createSpike(spike, this); }); const spikes = this.physics.add.group(spikeObjects); I get the body once I call scene.physics.world.enable() on my object. If your code is in one file, then instead of scene you can just reference this inside the create() or update() functions. Hope this helps!
-
Hey @selgkr, luckily (or unluckily) you got a lot of options to share your Phaser game. I had games on my website https://msanatan.com, which is hosted by GitHub Pages. It's simple as I use git extensively and free. I also created an account with https://itch.io, a great place to discover and upload indie games. However, any web hosting service will do. Netifly, S3 and maybe others host static websites for free. But I'd recommend itch.io because you'll be with a larger community of game developers.
-
Glad you found that thread! I haven't used them myself but I figure Containers would be what you're looking for. I remember reading about them from this devlog: https://phaser.io/phaser3/devlog/120
-
I had the same issue and posted the location of the custom properties here if anyone is still interested Note that I found it in the `data` property with the current Phaser version, 3.23. I'm not sure if it was always set in earlier iterations of Phaser 3.
- 3 replies
-
- physics
- custom properties
-
(and 3 more)
Tagged with:
-
custom properties Tiled object custom properties get phaser 3 code
msanatan replied to zsoltkiraly's topic in Phaser 3
I should add that I got that output with Phaser version 3.23.0 (the most recent one at the time of writing). It's possible that it may not have been in the version you used at the time -
Just pitching in, a lot of HTML game frameworks are built upon technology that was introduced with HTML5. For 2D there's the Canvas API and for 3D (and also 2D) there's the WebGL API. For sound there's the Web Audio API and even one to make your game go fullscreen. I definitely say start with Phaser 3 like the others did. It's very intuitive, you'll quickly see results and have fun using it. But the tech underneath it is fairly accessible too! It's totally possible to make games with just the HTML5 APIs, although anything substantive will be lots of work. If you're curious, have a look at those too 🙂
-
msanatan changed their profile photo
-
custom properties Tiled object custom properties get phaser 3 code
msanatan replied to zsoltkiraly's topic in Phaser 3
I had the same problem! So in put a console.log() for the object I loaded and saw this: The custom data from Tiled goes to your sprite's data property. You can read the docs for more info on the data management component. Hope this helps!