Nikos123

Members
  • Content Count

    111
  • Joined

  • Last visited

Everything posted by Nikos123

  1. This is the game https://quantuminformation.github.io/youtube-space-invaders/ Have I made a mistake here: <svg xmlns="http://www.w3.org/2000/svg"> <!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ --> <g> <title>Player ship</title> <!-- &lt;!&ndash;ship body&ndash;&gt; <path d="M0 30 L 10 10 L 20 20 L 30 5 L 40 20 L 50 10 L 60 30 Z" stroke-width="2" stroke="#555" fill="#BBB"/>--> <!--canopy--> <path d="M11 13 Q 15 -2, 19 13 Z" stroke="#0CF" stroke-width="2" fill="#7CF"/> <!--body--> <path d=" M0 0 Q 15 35 30 0 Q 15 25 0 0" stroke="#5EFF34" /> <!--outline (helpful for drawing)--> <!-- <path d="M0 0 H 30 V 20 H 00 L 0 0" stroke="#FFF" fill="transparent"/> --> </g> </svg>
  2. @jerome any ideas how many nodes you could draw before things start to die? Usage on a mabbook 2017 with a GPU.
  3. Thanks mate, I will check it out! Sorry this site doesn't send me email notificationa
  4. If any of you have use http://gource.io/ you will know of the pretty graphs you can draw. How can I do the same in babylon? I would like to have real time interaction as much as is possible. Ie if I move a node then the rest of the graph will move too. The data is non github stuff. The reason I want it in 3d is that I will have a z axis props on the nodes
  5. In this code here, on the 1st frame of the animation the mesh being animated instantly jumps to the location at the end of the animation, then the next frame it goes back to frame2 at the interpolated location. Any ideas? let unit = selectedUnits[i] // use pythagoras to work out the realtive speed for the units to arrive at roughly the same time let distance = Math.sqrt(Math.pow(pickResult.x - unit.mesh.position.x, 2) + Math.pow(pickResult.z - unit.mesh.position.z, 2)) let framesNeeded = Math.round((distance / common.MEDIUM_SPEED) * common.ANIMATIONS_FPS) // console.log('dist: ' + distance + ' frames' + framesNeeded) let animationBezierTorus = new BABYLON.Animation('animationCore', 'position', common.ANIMATIONS_FPS, BABYLON.Animation.ANIMATIONTYPE_VECTOR3, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT) let keysBezierTorus = [] keysBezierTorus.push({ frame: 0, value: unit.mesh.position }) keysBezierTorus.push({ frame: framesNeeded, value: unit.mesh.position = formation[i] }) animationBezierTorus.setKeys(keysBezierTorus) unit.mesh.animations.push(animationBezierTorus) this.scene.beginAnimation(unit.mesh, 0, framesNeeded, true) // todo move animation to server side You can see this effect by trying to move any of the blue spheres: http://quantuminformation.github.io/Density-Wars/
  6. How can I get people to sponsor my servers?
  7. Yeah it's been a while but here it is!
  8. Basically its because I'm using canvas width 100%, canvas prefers actual pixel values.
  9. Found the issue My rectangle was been drawn offscreen due to the x,y value been inflated somehow.
  10. If you run this project on webpack --watch --watch-poll mode then it first compiles fine. However if I make any change, the next compilation gives this error, but the app still works and is updated. Any ideas?
  11. Or just make it open source.
  12. Basically after this line runs, I expect a rectangle to be drawn on screen https://github.com/QuantumInformation/Density-Wars/blob/master/client/hud/GameOverlay.ts#L70 However I see no rectangle drawn to screen, even though the code seems to run fine, any ideas? No issue with z-indexes.
  13. I just use a vanilla Canvas so I don't need to depend on babylon.
  14. Ok, for me this is the only forum that doesn't work. (
  15. I basically need to host a Node app that updates the clients with world variables. You will get full credits when I make videos on this popular topic:
  16. I decided to do it this way: export default class Ground { mesh: BABYLON.Mesh click: (e: MouseEvent) => void defaultMaterial: BABYLON.StandardMaterial constructor (scene) { // Creation of a plane with a texture this.mesh = BABYLON.Mesh.CreatePlane('ground', common.MEDIUM_SIZE_MAP, scene) let matGround = new BABYLON.StandardMaterial('matGround', scene) matGround.diffuseTexture = new BABYLON.Texture(url, scene); (matGround.diffuseTexture as Texture).uScale = common.MEDIUM_SIZE_MAP_SUBDIVISIONS; (matGround.diffuseTexture as Texture).vScale = common.MEDIUM_SIZE_MAP_SUBDIVISIONS matGround.specularColor = new BABYLON.Color3(0, 0, 0) this.mesh.material = matGround this.mesh.rotation.x = Math.PI / 2 this.mesh.position = new BABYLON.Vector3(0, 0, 0) } } var url = require("file-loader!./assets/img/background.png");
  17. MOnster, its got taurine and vit B so its healthy!
  18. I would to bundle images into textures using Webpack, without loading them at runtime. I can't do it like the attached. Any recommendations? In vanilla js you can do it like this with the draw image api on canvas 2D: https://github.com/QuantumInformation/youtube-space-invaders/blob/master/src/gameObjects/Player.ts#L78 https://github.com/QuantumInformation/youtube-space-invaders/blob/master/src/gameObjects/Player.ts#L28
  19. Thanks @AlbertTJames! Its a bit more complex than I need atm! One thing I am looking for is a nice little world-state-sync node server for my RTS game. I will be running animations server side and updating the client from the server. Does anyone know of any good node libs for this, and/or ideally a dockerised container that wraps the basics up?
  20. I'm making a server but it doesn't need to load babylon. I will only store objects easy to translate into the game using a world-server thing