iiceman Posted December 23, 2014 Share Posted December 23, 2014 Hi everybody, I am currently playing around with babylon and it's really fun. I managed to reboot an old game project of mine based on the the awesome tutorial from temechon (http://pixelcodr.com/tutos/physics/physics.html) and a bunch of other great (basic) tutorials from the github wiki. The game is basically a remake of the classic dynablaster (aka bomberman). You control a player avatar that can place bombs to destroy blocks. Here is what I got so far: http://p215008.mittwaldserver.info/bbomberman/ I am kinda happy with it for now, but I got a little trouble controlling the particles that make the effect for the bomb detonation. I want them to stop on blocks they destroy and not just go trough them. I tried to mange that by setting a certain particle life time based on the distrance to the block that the bomb is going to destroy (line 544 in the code). Most of the time it works but sometimes it's just not accurate enough. I am wondering now if there is a better way to control the length of this "ray of fire" or how i could improve the accurity. A bit more info on how to play if somebody wants to try it out: - you control the green player with WASD, plant bombs with SPACE- for the blue player its 8456 and 0 for planting bombs- you destroy blocks, sometimes you find powerups- blue powerup is planing an additional bomb (you start with a limit of 1 bomb at a time, pick up a blue power up and you get to lay 2 bombs simultaneously)- yellow power up increases the range of the fire blast (the problem seems to occur mostly with longer rays)- you can't kill yourself or the other play (yet) Yeah, well, that's it. I hope somebody can help me out here. I love playing with babylon and I really want to make that game happen PS: Sorry for the messy code, I guess I'll have to go over it and structure it a bit better.PPS: if you have any suggestion in general how to improve the code or for cool features for the game, I would love to hear them!! Dad72 1 Quote Link to comment Share on other sites More sharing options...
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.