Hi all.
I'm intrasting, how create bullet class.
I develop the game in C#. I need bullets. But I don't know formulas, algorithm.
Please help me!
Pages 1
You are not logged in. Please login or register.
AudioGames.net Forum → Developers room → Create bullet class
Hi all.
I'm intrasting, how create bullet class.
I develop the game in C#. I need bullets. But I don't know formulas, algorithm.
Please help me!
It's importante to define a direction that your bullet will travel constantly during it's automatic movimentation. It will depend on your game's movement type. If it's without rotation, use vectors.
BTW I always wanted to get access to ectors but honestly I couldn't. Which library should I use??
System.Numerics.Vectors, perhaps?
I'm not sure if you'd want each bullet to be an object, would you? It depends how many bullets you expect to be spat out. But I'd say a bullet's extremely short lifespan would mean you don't want thousands of bullet objects sat around waiting for garbage collection. In any language.
With one potential exception, that is, and that's if you want bullets that last a little longer, ricocheting around and bouncing off things and doing crazy stuff like that. In that case, and if they're the exception rather than the norm, it might be okay to have them as a class.
HTH
Porting BGT vectors would not be very hard, as it’s pretty much just variables and operator overloading
I really have to try this thing. Vectors are really handy when it comes to game creation. The last bullet system i wrote came as an object. Actually a class and it's veriables, and a list which contains the class itself (I mean the list <>) and a checkloop or what ever you call it in the main class I wrote it like the bullet system in bgt where if that hits a wall or something, It removes from the list. Although i think this way is a real mess. Do any of you have any ideas about calling functions and such from the main form, one of the class functions i mean(Not the main class). I don't know how to explane it better but if you know how to do that, let me know please..., I tryed sevral ways like form1.sound but that didn't work.
AudioGames.net Forum → Developers room → Create bullet class
Generated in 0.034 seconds (32% PHP - 68% DB) with 12 queries