• Content Count

  • Joined

  • Last visited

About Kreeba

  • Rank
    Advanced Member

Recent Profile Visitors

1320 profile views
  1. *note to self: don't target webvr... ..problem solved I think this is a little overkill for my needs, however its great to add it to the thread. I am targeting Desktops and low powered mobiles, then trying to keep them in sync with the server.
  2. Thanks. I am looking to standardise my physics terminology. I like your little guide . Do you have any resources for setting up a physics loop for non physicists? I have found that I am now getting a little bit of rubber banding when the server syncs with the client, so I think it is working. I now need to compensate for the network delay
  3. What is the difference between impulse and force and how are they calculated?
  4. Hi. I get the concept of Delta Time, but one thing I have always struggled with is exactly where to apply the multiplier on movement calculation. For example, this is my movement code: protected updatePosition(deltaTime: number = 1) { //Speed if (this.state.targetSpeed != 0) { if (this.state.targetSpeed > this.state.currentSpeed) { this.state.currentSpeed += this.characteristics.handling.acceleration } if (this.state.targetSpeed < this.state.currentSpeed) { this.state.currentSpeed -= (this.characteristics.handling.acceleration * 2) } } else { this.state.currentSpeed = 0 } //Calculate Acceleration let accelerationVector = { x: this.state.currentSpeed * 0.02 * Math.cos((this.state.currentHeading - 90) * (Math.PI / 180)), z: this.state.currentSpeed * 0.02 * Math.sin((this.state.currentHeading - 90) * (Math.PI / 180)) } //Apply Acceleration Vector onto Movement Vector this.state.movement.x += accelerationVector.x this.state.movement.z -= accelerationVector.z //Multiply Drag (also corrects momentum issues) this.state.movement.x *= this.characteristics.handling.drag this.state.movement.z *= this.characteristics.handling.drag //Apply movement vector to position this.state.position.x += this.state.movement.x this.state.position.z += this.state.movement.z } My delta time is leavling out as '1' if the game is running correctly at 60fps. Where do I add the deltaTime multiplier? On every caclulation, on just the application at the end?
  5. What is the best practice in picking up this gesture, and infact gestures in general? I know that the Pinch-to-zoom is already implemented as the sorta camera radius increase/decrease on the universal and touch camera, however I want to use the gesture on an orthographic camera, so need to pick up the event. How?
  6. Just updating this thread as it is well indexed on Google for GUI searches. Babylon 3 has introduced the Babylon.GUI module, which has official support from the Babylon Team. This should be considered the 'defacto' choice as it will be developed alongside Babylon with VR/AR cameras.
  7. Hi. I have created this quick video just to show you my solution if anyone else comes across the same problem. I apologise if it seems very obvious to anyone with TypeScript experience, but this is squarely aimed at TypeScript beginners who just want to get on with game dev:
  8. Congratulations. It looks great. Keep your energy up!
  9. Thanks. I got it working. I basically stripped out all referencing and started again. What worked for me was to do a /// reference in the source files to the Babylon typescript definitions so the IDE/TSC was happy. Then separately I used the online build tool to build a version of Babylon with GUI already in. Then linked that in the html container file. I will make a video later just to help anyone coming after me with the same issue.
  10. Thanks. Sent my email back to you. I won't release the game like this, I just want get back to developing. By the time I am close to releasing I am sure they would have refactored the code base to support modular NPM packages.
  11. You also asked about an IDE. Lots of people have different preferences, however VSCode has emerged itself as a frontrunner for a great IDE with typescript.
  12. At the basic level you can just code exactly like you do in JS but you can also specify what type of data you would expect in a function parameter or variable. Have you ever done a strictly typed language before, like c# or Java? Lots of the 'gibberish' on using typescript comes from its association with angular 2/4, which is a library for developing front end web applications. You don't need this to use TypeScript at all. The other side of TS, and more importantly for me, is the more 'classical' implementation of classes. I have worked with a number of languages in the past and c#'s syntax is my personal favourite. TS makes JavaScript like c#. Again, if you have done anything in OOP before, then you will pick this up quickly. I brushed up using this course Don't pay full price though you can get codes to get any udemy courses for $10. PM me if you decide to go with the course and need help getting it.
  13. Thanks. I have opened this thread to, basically, ask if there is anything I can do now to get it up and running so I can continue my project.