Creating bullets in Blitz3D

Started by
1 comment, last by Sneftel 17 years ago
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.
Advertisement
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.
Create-ivity - a game development blog Mouseover for more information.
Moved to For Beginners.

This topic is closed to new replies.

Advertisement