Request new SIM_BulletModule


#1

Is it possible to create a slightly modified version of SIM_BulletModule so we can assign a bullet texture rather than bullet.dds? That way modders can make guns that shoot all kinds of interesting things.


#2

That would be incredibly useful. The Star Blazers mod required some very tedious trial-and-error to achieve some of the required effects, and I believe that the above proposal would have been a great help. Sooo…seconded, with enthusiasm!


#3

Ideally we’d be able to specify a texture for any weapon type, be it bullet or plasma. To me it sounds as simple as adding one line of code to the module text (something like texture = awesomebullets.dds), but to enable it to work might take considerably more work.


#4

the problem is one of texture atlasing. Thats when a bunch of textures all get bunched in a single image. Texture-changes in game engines are very slowl, so ideally you don’t do many each frame. If you have 100 ships and 2 different bullet textures, its possible that this means 100 changes every frame, or just 1, depending on what order they are in. In theory, you would just sort them by texture, but gsb uses the ‘painters algorithm’ to facilitate very cool texture blending, which means you can’t :smiley:
Some very fancy engines have automatic texture-atlas composition, where the game creates atlases at runtime from existing oft-used textures. This gets complicated by mipmaps.
In any case, GSB doesn’t have that, so the danger with allowing different textures for a bullet would be a possible drawing slowdown. That’s not to say it could never happen, but thats the reason it isn’t in there by default.


#5

Just a quick stupid question, but what exactly does the engine use mipmaps for? Does it function like Level of Detail settings would in 3D engines?


#6

That’s too bad then. Well it was worth asking I guess.


#7

Would it be possible then to enable a SIM_BulletWeaponModule to use graphics from something other than bullets.dds ?
For example:
classname = “SIM_BulletWeaponModule”
bullet_sprite = “heavybullets.dds”
color = 1