r1sc / Open76

Interstate '76 engine reimplementation
GNU General Public License v3.0
52 stars 3 forks source link

Basic Weapon Firing #24

Open JJJohan opened 5 years ago

JJJohan commented 5 years ago

With most of the interior car interface out of the way now (with exception of the speedo/tacho) I figured I'd have a go at one of the real fun bits - the weapons.

We've got the models in place now and I've been able to squeeze even more data out of the GDF files through trial and error of editing the files in a hex editor and then observing the changes in the original retail version of the game (it's a lot easier to do that when the ZFS file isn't compressed)

We've got all the basics needed to at least make an attempt of firing the weapons.

Useful GDF bits:

What I've got implemented in a branch so far:

I've found that some weapons do not have meshes for the projectiles. Rockets generally do, but things like the 30-cal machine gun does not have a mesh - it only has a texture. Right now creating a 1x1x1 cube and texturing that, then shooting that out of the machine gun. It doesn't look great.

Some misc notes:

What I'd like to get done for a first pass & pull request:

I'll be ignoring 'drop' weapons for the time being as they're a bit more complicated - e.g. oil slicks, fire, landmines

I'm not going to try and get XDF files for rocket smoke or projectile hit effects working yet. I just want the weapons to fire correct looking projectiles - after that I'll probably look at the missing bits.

I'll get some juicy screenshots in later - there's a few things implemented as noted above but I'd like to get it a little further along first.