Sign in to follow this  
TaeKwonDo

Creating bullets in Blitz3D

Recommended Posts

I'm creating a simple astroids clone game on blitz3D and I am having troubles figuring out how to create bullets. I know i'll need to use types and probably a function, but i'm having difficulty putting everything together if that makes any sense? any simple tutorials or advice would be appreciated.

Share this post


Link to post
Share on other sites
Why not note down what you really need? I mean, for a serie of bullets, you need to store a location and a direction/speed for each bullet, and you need to display a bullet image or model on each of these locations.

A good approach would be to creat a bullet class, that contains the location and direction, and a reference to the model (since you don't want to load the same model for every bullet ;)). Then, when firing, you create Bullet objects and store them in a list (a std::vector or std::list), updating their positions, and rendering them, each frame. Now I'm not familiar with Blitz 3D so the exact how and why is up to you, but that's more or less the basic approach.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this