xtreemze Posted June 5, 2018 Share Posted June 5, 2018 Hi everyone, Been away for a while but I've kept practicing with Babylon. This is at a prototype phase with no 3d/sound/artwork. Just pure javascript code for now. Trying to get the mechanics working properly first. One question I have is how the projectile rotationQuaternion is cloned. It seems to follow the lookAt() quaternion from the origin tower even after the quaternion is cloned. How can I ensure that the rotationQuaternion is not linked to the original quaternion it is taken from? This causes problems when a tower shoots a projectile and then rotates to target another enemy. The previously mentioned projectile rotates in midair still copying the rotation of the tower. Here's the relevant code taken from line 53 of https://github.com/xtreemze/defend/blob/master/src/js/main/projectiles.ts const clonedRotation = originMesh.rotationQuaternion.clone(); clonedRotation.normalize(); projectile.rotationQuaternion.copyFrom(clonedRotation); Comments, questions are welcome! The project is hosted here with open source: https://github.com/xtreemze/defend View the project here: https://xtreemze.github.io/defend jerome, NasimiAsl, Nabroski and 4 others 7 Quote Link to comment Share on other sites More sharing options...
jerome Posted June 5, 2018 Share Posted June 5, 2018 excellent ! xtreemze 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2018 Share Posted June 5, 2018 Really cool! can you create a repro on the problem in the PG? xtreemze 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 6, 2018 Share Posted June 6, 2018 Nice! I like the graphic style. xtreemze 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted June 11, 2018 Author Share Posted June 11, 2018 On 6/5/2018 at 6:00 PM, Deltakosh said: Really cool! can you create a repro on the problem in the PG? Thanks, I solved it by delaying the firing of the projectile to give the lookAt function some time to complete. Don't think it's anything wrong with the engine, just too many position queries on the meshes on every frame to measure distances and acquire the nearest target. The delay is not noticeable. Updated: now with generated sound thanks to the WASFX library by @fenomas Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2018 Share Posted June 11, 2018 Woot! really cool xtreemze 1 Quote Link to comment Share on other sites More sharing options...
QuintusHegie Posted June 11, 2018 Share Posted June 11, 2018 Nice start already of your prototype game! Cool arcade style. Like it! Can't wait to see how it is played. I was working on the gun emplacement operation controls of my Model Train Simulator webgame in BabylonJS and stumbled upon your post... :-) xtreemze 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted July 11, 2018 Author Share Posted July 11, 2018 This is playable now with proper win and loss states. Enjoy! Play here: https://xtreemze.github.io/defend jerome, GameMonetize, brianzinn and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 11, 2018 Share Posted July 11, 2018 nice xtreemze 1 Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted July 13, 2018 Share Posted July 13, 2018 I like this style of game very much, beautiful! xtreemze 1 Quote Link to comment Share on other sites More sharing options...
abhivaidya Posted July 13, 2018 Share Posted July 13, 2018 This is lovely! Well done! xtreemze 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 14, 2018 Share Posted July 14, 2018 what a fun game - thanks for sharing! xtreemze 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted August 7, 2018 Author Share Posted August 7, 2018 Thanks everyone for having a look! I've done a lot of work on balancing and improving the feel to increase fun and reduce frustrations. Veteran John Romero says your first 10 - 20 games will suck, and this one still isn't #20 yet. With that in mind, comments that may improve this game, or my approach for future games would be greatly appreciated ?. Just as well if you see this and wonder how something works, I'd be more than happy to help. You're welcome to give it a try again if you've played before because it's a very different feel since I last updated this post. Play here: https://xtreemze.github.io/defend Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 7, 2018 Share Posted August 7, 2018 Very cool xtreemze 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2018 Share Posted August 7, 2018 You should add a link from our homepage https://github.com/BabylonJS/Website xtreemze 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted August 7, 2018 Author Share Posted August 7, 2018 21 minutes ago, Deltakosh said: You should add a link from our homepage https://github.com/BabylonJS/Website Ah, to be included on the BabylonJS homepage would be an honor! ? I'll get some screenshots together Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2018 Share Posted August 7, 2018 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted August 7, 2018 Author Share Posted August 7, 2018 7 minutes ago, Deltakosh said: Should have a pull request waiting for you now. Hope I did it correctly. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2018 Share Posted August 7, 2018 perfect! you'll be live in a few minutes Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 9, 2018 Share Posted August 9, 2018 oh, this new version is a big improvement! it's a lot more clicky to get a victory - only thing is that it would be harder if the base didn't regenerate so fast and also it seems the new attackers come predominately from two opposing sides, whereas before it felt more balanced. anyway, it's lots of fun - thanks for sharing!! xtreemze 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted August 9, 2018 Author Share Posted August 9, 2018 3 hours ago, brianzinn said: oh, this new version is a big improvement! it's a lot more clicky to get a victory - only thing is that it would be harder if the base didn't regenerate so fast and also it seems the new attackers come predominately from two opposing sides, whereas before it felt more balanced. anyway, it's lots of fun - thanks for sharing!! Good feedback, thanks @brianzinn! I did try to make the game more forgiving but based on your feedback I'll increase the difficulty so it feels more rewarding in the end. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.