Thoughts on weapon visuals versus game machanics
- Second Chance
- Topic Author
- Offline
- King of Space
18 years 10 months ago #18686
by Second Chance
Thoughts on weapon visuals versus game machanics was created by Second Chance
Contrary to the way the thread title sounds, the two are not entirely at odds. But I wanted a place to discuss what we can do to meet the needs of both Star Wars style visuals and Flux game mechanics.
I think I may have come up with a good way to get the bolts visually much smaller (for more reasonable looking Star Warsy sized bolts) without hurting their ability to register a hit with the server. I don't know why it never occured to me before. It seems so obvious now. I only need to shrink the visible sprite avatar of the bolt, which has nothing to do with the game mechanics. The actual collision size (set in the bolt's INI parameters) could theoretically be of any size needed to make sure hits register with the engine. That's the theory anyway. But I think it should work very well, and look nice to boot.
Now, in the interest of trying to reduce server loads for fired weapon bolt volumes, I thought I would propose the following. Since the Tie Fighter chin guns are sooo physically close together (under 2 meters), is there really any good reason to make them 2 seperate guns? That's twice the amount of work and calculations for a set of guns where, if one hits, the other is definitely going to hit also. So I thought it might be more practical to make the pair into a single gun with two visible bolts in the avatar of a single bolt (like the EoC gatling canon avatar). You could name it something like "Twin Blaster" so it looks right when only one gun shows up on the HUD when selected. This would effectively cut the volume of bolts to be tracked by the server in half for all Tie Ships (except the Interceptor, which has additional guns). How's that sound?
The Y-Wing and YT-1300 would have similar setups for their multi-barreled turrets.
mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.
I think I may have come up with a good way to get the bolts visually much smaller (for more reasonable looking Star Warsy sized bolts) without hurting their ability to register a hit with the server. I don't know why it never occured to me before. It seems so obvious now. I only need to shrink the visible sprite avatar of the bolt, which has nothing to do with the game mechanics. The actual collision size (set in the bolt's INI parameters) could theoretically be of any size needed to make sure hits register with the engine. That's the theory anyway. But I think it should work very well, and look nice to boot.
Now, in the interest of trying to reduce server loads for fired weapon bolt volumes, I thought I would propose the following. Since the Tie Fighter chin guns are sooo physically close together (under 2 meters), is there really any good reason to make them 2 seperate guns? That's twice the amount of work and calculations for a set of guns where, if one hits, the other is definitely going to hit also. So I thought it might be more practical to make the pair into a single gun with two visible bolts in the avatar of a single bolt (like the EoC gatling canon avatar). You could name it something like "Twin Blaster" so it looks right when only one gun shows up on the HUD when selected. This would effectively cut the volume of bolts to be tracked by the server in half for all Tie Ships (except the Interceptor, which has additional guns). How's that sound?
The Y-Wing and YT-1300 would have similar setups for their multi-barreled turrets.
mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.
Please Log in or Create an account to join the conversation.
18 years 10 months ago #14521
by MajorTom
Replied by MajorTom on topic Thoughts on weapon visuals versus game machanics
Actually one has nothing to do with the other.
You don't need a reason to create a dual bolt Avatar. Just do it and have fun with it.
You can make them as large or small as you want and see how they look.
As far as the theory goes however:
We've been here before and found a solution for both problems. I've mentioned the good reason for two seperate guns many times: we have to mount guns in pairs, otherwise the server app won't create the ship sim.
On the TIE the guns had to be so close together so we just set the "fire_position_translation" a little farther apart than the guns are so we had two separatly visible bolts.
That is the Solution for the problem and I'm not interested in re-inventing the wheel all over again
The functionality is more like this:
The game mechanics "bolt" is only a point in space. It has neither length nor width. The only physical charachteristic it has in the simulation is a "mass". That mass is used to determine the inertia when the bolt collides with another sim. If you remember we had problems with the little ships spinning around when hit with a stock EOC bolt. We fixed that by reducing the bolt mass by a factor of 1000.
The visual effect of a bolt is the graphic representation coupled to the bolt by means of the specific subsim .ini (not the bolt .ini) which is a flash of color, Brighter or darker, larger or smaller or whatever you create as a bolt grafic. The server does not render any grafic whatsoever so it doesn't care how big, fat and bright the grafics are. The only load on the server is the number of bolts. Grafics effect only the client instance of the game. So the size and number of bolt grafics is a question of the clients ability to render them
The problem is every client is different, more or less CPU, weaker or stronger grafic card. (now you know why consoles are so popular with game designers).
We could take a vote and formally decide what PC setup we want to use as a reference but I think your's is a good example. So just try it out and see how many bolt avatars you can create in the game without getting bad stuttering preformance when six or eight other ships are flying around.
Iwar2 Multiplayer Fan Site
You don't need a reason to create a dual bolt Avatar. Just do it and have fun with it.
You can make them as large or small as you want and see how they look.
As far as the theory goes however:
We've been here before and found a solution for both problems. I've mentioned the good reason for two seperate guns many times: we have to mount guns in pairs, otherwise the server app won't create the ship sim.
On the TIE the guns had to be so close together so we just set the "fire_position_translation" a little farther apart than the guns are so we had two separatly visible bolts.
That is the Solution for the problem and I'm not interested in re-inventing the wheel all over again
The functionality is more like this:
The game mechanics "bolt" is only a point in space. It has neither length nor width. The only physical charachteristic it has in the simulation is a "mass". That mass is used to determine the inertia when the bolt collides with another sim. If you remember we had problems with the little ships spinning around when hit with a stock EOC bolt. We fixed that by reducing the bolt mass by a factor of 1000.
The visual effect of a bolt is the graphic representation coupled to the bolt by means of the specific subsim .ini (not the bolt .ini) which is a flash of color, Brighter or darker, larger or smaller or whatever you create as a bolt grafic. The server does not render any grafic whatsoever so it doesn't care how big, fat and bright the grafics are. The only load on the server is the number of bolts. Grafics effect only the client instance of the game. So the size and number of bolt grafics is a question of the clients ability to render them
The problem is every client is different, more or less CPU, weaker or stronger grafic card. (now you know why consoles are so popular with game designers).
We could take a vote and formally decide what PC setup we want to use as a reference but I think your's is a good example. So just try it out and see how many bolt avatars you can create in the game without getting bad stuttering preformance when six or eight other ships are flying around.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
- Second Chance
- Topic Author
- Offline
- King of Space
18 years 10 months ago #14523
by Second Chance
Also, any 3D object (including a bolt) must have a volume for collision detection calculations. That's why changing the bolt length and speed in the INI affects it's ability to hit things. If the bolt is too short and/or moving too fast, the distance it travels between each physics calculation or rendered frame can cause it to simply pass through another object without registering a collision. Since a bolt can be on one side of a ship at one frame (or cpu cycle), then far past the other side at the next frame or cycle. For EoC, the bolt sprite graphic may or may not be part of the collision system. If the system used is polygon to polygon intersection, then it is. If the system used is bounding or spherical volumes, then it isn't. Since EoC only specifies a length, it's probably the latter.
btw - The bolt graphic is specified in the bolt INI. From the pbc_bolt.ini:
This setup scene contains the null the sprite get attached and scaled to. The light flash is what's specified in the subsim's INI.
mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.
Replied by Second Chance on topic Thoughts on weapon visuals versus game machanics
I did not know this, sorry. I also didn't know there was a problem to be solved here. This was just a suggestion to reduce server load. If it's not useful, forget it. Stop getting so upset. It's not like we're going to run out of space to discuss things in. And we've discussed that before.we have to mount guns in pairs, otherwise the server app won't create the ship sim.
Also, any 3D object (including a bolt) must have a volume for collision detection calculations. That's why changing the bolt length and speed in the INI affects it's ability to hit things. If the bolt is too short and/or moving too fast, the distance it travels between each physics calculation or rendered frame can cause it to simply pass through another object without registering a collision. Since a bolt can be on one side of a ship at one frame (or cpu cycle), then far past the other side at the next frame or cycle. For EoC, the bolt sprite graphic may or may not be part of the collision system. If the system used is polygon to polygon intersection, then it is. If the system used is bounding or spherical volumes, then it isn't. Since EoC only specifies a length, it's probably the latter.
btw - The bolt graphic is specified in the bolt INI. From the pbc_bolt.ini:
Code:
[Avatar]
name=lws:/avatars/standard_pbc_bolt/setup
mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.
Please Log in or Create an account to join the conversation.