• Content Count

  • Joined

  • Last visited

About Lightnet

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. There is this.cameras.main.setViewport(200, 150, 400, 300);. It took me a while to google search to find their examples which I like and hate way it display as folder. Link:\camera\set viewport.js
  2. Was testing the firefox and chrome to get game work but the inputs for firefox stop working. It work when click outside for phaser render seem to work. When UI menu disable input keyboard. Not sure how to get it enable again? Here my project build.
  3. Hello! I am sharing my project template builds which tends to try out if worth trying out to develop game projects for prototyping things. I made a Nodjes project build script for easy way to setup the project on local pc build develop. The build is babel es5/6 javascript. I used gulp task build for auto scripts. Gulp default task will build the files and start a server. Just need to install nodejs and run command line. If you have Visual Studio Code that is setup by the project. Those projects are build to compile into bundle.js to put everything in to one file for client since loading and creating each scripts is time consuming. Here the simple project test build work folder. Simple Example game. I made another project that is multiplayer network but still a bit buggy and few messy code script that will try to clean up later. It base on lance-gg client and server. I ported the spaaace game github to used Phaser 3.x to render the game. There are links references and credits in the file. It just a space ship shooter game. As 2D physics for phaser 3.4.0 server side it doesn't have it. 2D physics is very simple collision using lance-gg package.
  4. Could not find destroy function in the particle Emitter and is there best way to remove from scene?
  5. I like to know about it. I only found camera follow function object but wanted to have object move around a bit. But not sure how visible check when sprite disappear when camera is following the player.
  6. yeah .on should not be in the update and and emit is sending server. It should be in create function for .on event. Just think of the .on is array that has a list and you kept added to it. Just need to assign in once. But you need to think differently since the socket will listen to event that will trigger on list that has be assign or added. Client: create(){ socket.on('move', data=>{ console.log(data); //this.cameras.main.scrollX = data.scrollX; //this.cameras.main.scrollY = data.scrollY; }); } update(time, delta){ if (this.cursors.left.isDown){ this.player.flipX = false; if (this.player.facing != 'left'){ socket.emit('move', 'left');'moveleft'); this.player.facing = 'left'; } } } But you nee to setup a different way if your doing server and client if there conflict that there should be manger list for players.
  7. The socket should not be in the update since it will add more event array and should be in create event.
  8. @Sonic_Serpentine oh, that might help if reworking. I had to switch to cannon.js since I can't find terrain height map to work well for Oimo. I doing some open world terrain zone visible thing that is mostly manual scripting. Just odd error saying that sphere error. Saying sphere only collision with another sphere only. And it gone.
  9. I seeing the position still off and using the example that show me. Using the simple example of 32 spacing that some area didn't move but I find 64 spacing is not right just.
  10. Much better movement? ---- It works I guess for model.physicsImpostor.setLinearVelocity(v2);. But I am not sure how to deal with the rotation mesh should be fixed. Just I don't like adding more work load to it. Tested import model and it fail to stay on the ground and keep falling that I try to create the box and it didn't as same result of the ground. It just a sphere collision that I set to. --- Here for what it look like but add more mesh to scene seem a waste. Two mesh one for not visible with physics and add one for visible mesh move in the the point direction. It will update the object mesh since there some rotation I can't get to know where to disable it.
  11. I wonder if the layout has some bugged. Since I am debug in console log it hard to determined it. The offset is bit way much to align right. Not perfect corner.
  12. For my experience new user. You mostly be digging a lot in this forum and there quite people are one or two can help. As well what you depend on the skill and experience in javascript. Basically you have create your own custom build engine or some simple stuff since you need to learn more than just wanted to build the game. It does math coding and handling error that seem to not try catch. There is not in depth deep code or how to setup the right way it all depend on skill and looking for right setup. Animations mesh is tricky and you can blend if you know how to add weight for each bones. I have not see any better updates. Knowing they have their jobs to do while trying to work the people who trying to make some games or some apps. For you should not create a big game but think small since I feel lag in the new version of 2.5 babylonjs. So you need to optimize how to setup your own scene and manage the object to be visible or not to reduce lagging. There no good handling error in loop function that seem missing something as the scene tend to disappear and you might not find the bug you were looking for. Or it just me since I doing some just text editor without much IDE. Script build for it.
  13. Nope it does not work. I read on the class of it and it over ride it I think. There should be better way to do it. I get the feeling it need some lead way for handling collisions. Example attaching collision while there animation but just trigger collision to update to bone location and rotation and not world physics.
  14. Need to help disable mesh rotation from physics. It used for character rotation for 3rd person camera control direction. It would help if there any thing about it. The controls are a bit hard to movement around. Here an example: A,S,D,W = movement.