Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Advice for weapon changing system #365765
03/29/11 03:30
03/29/11 03:30
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Hello there, I am in need of some feedback when it comes to a weapon creation/changing system for my FPS. In short, the player will be allowed 3 weapons; a Primary, a Secondary, and a Melee weapon. The weapons are spawned on the map and the players get to customize their abilities before the game starts. Think like Halo:Reach but more in depth. Now, when the player is spawned each player is given the basic setup of the 5 starter options (based on the players class type). But they are allowed to pickup other weapons which have spawned on the map. So here is the question which I am asking...

Would it be better to create the weapons by...

1. Preloading every available weapon before the game starts then just setting the weapons invisible flag on/off if its selected or not.

2. Creating a dummy entity then changing it with ent_morph if a player picks up another weapon. (System im using now)

3. Calling an ent_remove to remove the weapon pointer, then recreate it with the new weapon model.

Im not sure which way would be the best. Currently, I have 3 dummy entities set up (primary, secondary, melee) then I just change them with ent_morph when a player picks up a new weapon. But that creates a tiny bit of lag/freeze so the weapon can load. Are there any other ways to do it that I am missing? Any kind of advice would be EXTREMELY helpful. Keep in mind, this is an online FPS.

Re: Advice for weapon changing system [Re: exile] #365768
03/29/11 06:59
03/29/11 06:59
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
I'd go for first. Preloading removes any lag, and in a (fast paced) FPS any lag or flicker will cause a hindrance and in worst cases, kill the player.


"Yesterday was once today's tomorrow."
Re: Advice for weapon changing system [Re: Inestical] #365854
03/29/11 18:15
03/29/11 18:15
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
you can use also option 2, but doing ent_morph for all possible weapons with a wait(1) between them in the beginning of the action. This way all entities are already preloaded and there won't be lag when they appear.


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Advice for weapon changing system [Re: painkiller] #365937
03/30/11 14:37
03/30/11 14:37
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Hmmm, I see. Well the problem I am facing is the weapons have at least 100 frames of animation minimum. Not only that but their respective textures are a pretty good size too. So the problem I am having with preloading the models is it takes FOREVER to load. Well, at least a full 30-45 second pause.

Re: Advice for weapon changing system [Re: exile] #365940
03/30/11 14:43
03/30/11 14:43
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
What is the size of your models? 5MB? 10MB? How many of them you have?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Advice for weapon changing system [Re: 3run] #365945
03/30/11 15:48
03/30/11 15:48
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Try 30-45MB!!! There are 16 of them frown The largest texture is 1024x512 and the average texture size is 512x512. Not only that, but the models have 2 skins, one for the hands and one for the weapon. I was considering making the hands completely separate from the weapon models, animating them with EVERY weapon animation, then just place the weapon at the proper bone positions. Not sure what I should do anymore frown The thing that makes the model sizes so big are the animations.

Re: Advice for weapon changing system [Re: exile] #365947
03/30/11 15:55
03/30/11 15:55
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
Save skins in .DDS, that will reduce size extremely laugh
I hope you use bones for animations, cause vertex is big..
I'm using models with size around 10-15MB, with few skins.
I make function which creates all of them right before I launch the level
And deletes them all after creation, works good and fast laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Advice for weapon changing system [Re: 3run] #365950
03/30/11 16:52
03/30/11 16:52
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
and use external textures, that way you can use a single file for all hands models


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB

Moderated by  checkbutton, mk_1 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1