Hi,
I just created a 3d version of the first phaser game tutorial.
You can play it here and take a look at the source code here.
Hope you it!
Hi,
I just created a 3d version of the first phaser game tutorial.
You can play it here and take a look at the source code here.
Hope you it!
Good job @yannick !!
Just one point:
Out of curiosity, I was analyzing the game’s performance, to compare 3d vs 2d, and I think there is some kind of memory leak.
I started the game with a JS heap size of 21MB and without doing anything at 20 minutes it was already 253MB. In between, the GC cleared some memory, but not enough.
Regards.
Thanks
Yes you are right. There are many leaks. This is because of ammo.js.
But, I do already know how to fix it and will do it soon.
As I promised, thanks for your exploration …
Refer to the following pioneers who are building 3D Phaser Games.
Just to clarify. From all the examples mentioned above, enable3d.io is the only one using “real” 3d objects and physics.
@yannick : an you make this run @ 60 FPS? I LOVE the 3D being used in Phaser 3, but it is really slow. I use NVidia GeForce 960M.
Help me to clarify that in my books since this Appendix runs throughout 15 different books on Phaser Gaming Framework.
Neat idea tying this back to the “first” phaser tutorial. This really deserves a good 3d model of Phaser Dude.
Great job
please make some video tutorial in udemy
I will buy it, thanks
Hey @jjcapellan, I almost forgot. I have updated the example. Can you analyze it again and compare it to your old results? Would help a lot!
I have tested it for 20 minutes. All time, memory between 17MB/52MB. Now there aren’t any memory leaks. Well done!!
Maybe I use your extension enable3d in a chess game, to test it and refresh my knowledge of blender by modeling the pieces. It can definitely be interesting.
Regards.
@yannick : for some reason, not only am I only getting 30 FPS on the character controller example as well as other examples while using my NVidia GeForce 960M, the character is also shaking for some reason.
Glad to hear
I’m happy to help if you have questions.
For a chess game you probably won’t need physics. But you will probably need the TweenManager.
Here a snippet that will help you.
// create box
const box = this.third.add.box()
// clone position
let tmp = box.position.clone()
// tween the position
this.tweens.add({
targets: tmp,
duration: 1000,
x: '+=2',
z: '+=2',
onUpdate: () => {
box.position.set(tmp.x, tmp.y, tmp.z)
}
})
You already mentioned that you have issues with your device.
Here some more reasons why it could run buggy.
The source code is not available, the page is not found.
Click on the <>
in the right bottom corner of the game.