Game Development Community

dev|Pro Game Development Curriculum

Enhanced Weapons Resource for TGE

by Ronald J Nelson · 09/13/2009 (6:13 am) · 24 comments

This is the second version of my original Enhanced Projectiles resource. It has a ton of updates, improvements, and additions. A ton of it is my own work, but just as much is work I updated that was created by others.

I already posted a blog on it with a couple of videos here.
www.garagegames.com/community/blogs/view/18239/

I won't go into all of the details of what it contains here because I am including a very thorough manual with the kit. It covers everything from installation to usage and any known issues.

I do not own T3D so I will not be doing an upgrade. However, I have been in communication with deepscratch and he is already working on a T3D version that he has my permission to post as a resource update to this one.

Before asking me any questions, please read the manual first.

Right now the upload files option is working on this thing so I am hosting it on my personal webspace.
members.cox.net/rjnelson68/Enchanced%20Weapons%20System%20TGE.zip

UPDATE 21 Sept 09:
I fixed a bug in the animated crosshair code and changed the mode system so it is not limited to vehicle mode only. Look at the weapons.cs file in the client/scripts directory for an example.

I also decided to look into speeding up the performance of using Polysoup on ShapeBase objects. Since the system does not replace the original collision system and is used primarily for access to a Polysoup polygon set for raycasting, I removed the adding of the convex to the working collision set and convex list for ShapeBase objects. It still works as needed, but is a ton faster so more complex objects can be used without a performance loss.

Additionally, Deepscratch pointed out that the TriRayInfo raycasts I was using were causing a bug very noticeable in T3D. I confirmed this in my own tests. The method was not really needed, so it has been removed.

UPDATE 10 Oct 09:
I added a small boost to the particle code Deepscratch pointed out will boost the particle performance with the resource additions.

The new version has been uploaded to my personal server.
Page «Previous 1 2
#1
09/13/2009 (7:29 am)
Ron, I can host the files for you if you want. You could also upload it to EB's site. ( http://torque.abigholeintheweb.com/public_system/useruploads/ - I hope he doesn't mind me putting a link here)
#2
09/13/2009 (12:26 pm)
Thanks Ron,
I was just looking through the manual and this looks like a fantastic resource. going to add it to a clean build later to try it out.
#3
09/13/2009 (9:01 pm)
Thanks Konrad but it looks like that has a 3MB limit. I forgot I had just the right amount of room on my personal web space that I never use. So that will do until they fix this site.
#6
09/14/2009 (5:29 am)
I'm getting a few errors when I build,

..\engine\game\projectile.cc(1047) : error c2039: 'mControlClient' : is not a member of 'Explosion'

I get the same error in 8 places, if I add S32 mControlClient to explosion.h it builds, but I'm not sure if that's what I should be doing.
#7
09/14/2009 (12:19 pm)
Sorry it seems I forgot to add those files. The download has been updated.
#8
09/14/2009 (5:43 pm)
ok i have it in my engine, (AFX btw) and im getting a error on start up, after compiling. The opcode.DLL is in the exe folder, and there was a successful compile for all files.

Loading compiled script creator/ui/GuiEditorGui.gui.
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Failed to load profile bitmap ((null))

Any suggestions if this is related to my compile or something else?
#9
09/14/2009 (5:55 pm)
Edward - I didn't touch any of that kind of stuff so I would have to say that it must be related to your compile.

I tested all of this on a totally clean version of TGE 1.52 and it ran perfectly without any errors.
#10
09/14/2009 (6:22 pm)
I updated the file on my server too.
- Konrad, the system is there for people to use. ;)
#11
09/15/2009 (4:03 am)
I just downloaded the updated files and it compiles without any errors now, thanks again for this fantastic resource Ron.
#12
09/15/2009 (10:57 pm)
ok got it compiled, got it turning on.. is anyone else getting a..

starter.fps/server/scripts/weapons/crossbow.cs (907): Unable to find object: '0' attempting to call function 'getMountedImage'
Warning: (d:\torque\infinite_1_5_2\engine\console\consoleobject.cc @ 62) Couldn't find class rep for dynamic class:
starter.fps/server/scripts/weapons/crossbow.cs (918): Unable to instantiate non-conobject class .
Set::add: Object "0" doesn't exist

now i checked the upload, and i checked the winmerge. this is a clean install as well. There is no changes to Console/consoleobject.cc... did anyone else get this error in thier console. or Is this something i missed..
#13
09/16/2009 (4:43 am)
Edward, I just checked my console and I don't get any errors from this resource, so I can only assume that you've made a mistake.
#14
09/19/2009 (10:33 pm)
Edit: Had a problem finding the opcode.lib but after looking through the vc compile console I saw that it was already compiling and it showed me the location of the new file... compiled fine and checking out some of the features now.

BTW: Thanks for adding TGE support for your resource Ron!
#15
09/20/2009 (3:35 am)
OK, Just tested out the resource and I noticed right away that there were late and double explosions happening(most noticeable with fast-firing weapon and moving the screen pretty quick), also noticed that I'm having some major issues with the player getting stuck on polysoup meshes.(which is an art/model problem judging by polysoup threads)

Is there any possible way to only apply PolySoup upon Projectile collision for performance reasons?

Either way, awesome resource, its educational value is well worth the download itself!(let alone all the other cool stuff that I havnt used yet)
#16
09/20/2009 (8:15 am)
Well I must admit I have never seen late or double explosions. Honestly, I can't see how it would even be possible if the resource is used as I laid out. I have been using it with automatic weapons and chainguns in my work and have never had an issue.

As for the polysoup question, I am afraid not. Polysoup has to be added when the object is being added to the scene, thats not my rule, but the polysoup code's.

It is true that very complex meshs will cause a performance loss, thats been true with any sort of triangle collision system I have seen so far whether, Opcode polysoup, PhysX Triangle Cooking, or even Bullet Triangle mesh.

If you are going to use the polysoup system, you have to use simplified meshs, otherwise you may have to come up with another solution from the one I have given here.
#17
09/20/2009 (10:59 am)
Appreciate the help, its probably just be a problem on my side then.

I'll have to check out the resource with a stock version, as I was trying to incorporate it into my custom version and may have been creating problems.

#18
09/21/2009 (6:41 pm)
(updated the package for the secondary link)
#20
10/10/2009 (8:51 pm)
Posted another update. Thanks Deepscratch.
Page «Previous 1 2