Real Time SFB Questions
Posted: Wed Jun 13, 2012 8:53 am
So I'm tinkering around, and I can assure you nothing great will come from it, but I had some questions I thought ya'll could help me with.
I'm trying to make a real time method to simulate a game like SFB on the computer. I'm just not real sure how to do some of it and wanted some input.
I am not using hexes, so all movement will be fluid. By default a turn will be 64 seconds, an impulse 2 seconds, though the turn length can be changed (and impulses are really ignored). I'll be updating all properties each frame based on the ticks (1/10,000 of a second) elapsed since the previous frame.
Here is how I was planning on dealing with movement:
Accelerate
- Maximum of 10 or current speed, multiplied by % of Turn Elapsed
Decelerate
- Half current speed, multiplied by % of Turn Elapsed
Reversing Direction
- Slow down to 0, can then accelerate in reverse
Quick Reverse
- If speed <=5, can perform
- Immediately makes speed 0
- Braking energy worth of unused warp/impulse power must be available
- 8 impulse cooldown (shared with HET)
Base Rotations
- Each rate is 60 degrees per turn of turning
Zero-Energy Turns
- Turns unit 60 degrees over 1 Turn
Sublight Tactical Maneuvers
- Turns unit 60 degrees over 1/2 Turn, cumulative with Warp Tactical Maneuvers
Warp Tactical Maneuvers
- Turns unit 60 degrees over 1/4 Turn, cumulative with Warp Tactical Maneuvers
High Energy Turns
- If unused warp move power available, can perform at any time
- 8 impulse cooldown (shared with quick reverse)
- Turns to face any direction
Erratic Maneuvers
- If unused warp/impulse move power, can start/stop at any time
Directed Turn Modes
- Turning is simply a degrees per second based on current turn mode, though I'd like to have a formula instead of having a turn mode "jump" a full point between 2 speeds.
Emergency Deceleration
- Instantly go to speed 0, and stay there 16 impulses, but power returns at standard decel rate
Sideslip (Ignored)
Positron Flywheel (Ignored)
Mid turn speed changes (Ignored)
Docking (Ignored, For Now)
Pinwheel (Ignored, For Now)
However reserve power throws a wrench into things. Basically since I can track the power in real time, the unit could have power at any given moment for any purpose, or dynamically redirect it where needed. Obviously doing this in the board game would be, well, horribly slow, but in a computer real time I can do it easily.
One of the things that's giving me headaches is how to deal with the power. For example, 1 warp generates 1 power in a single SFB turn. In real time, I'm tracking it by frame, so should the engine generate 1 power over an entire turn, or constantly generate 1 power. If constant things like move power costs are easier, but if you want to charge a weapon that values has to be divided up. I guess I'm just not real sure the best method to convert power in SFB, to power in "real time". Any ideas?
Thanks!
I'm trying to make a real time method to simulate a game like SFB on the computer. I'm just not real sure how to do some of it and wanted some input.
I am not using hexes, so all movement will be fluid. By default a turn will be 64 seconds, an impulse 2 seconds, though the turn length can be changed (and impulses are really ignored). I'll be updating all properties each frame based on the ticks (1/10,000 of a second) elapsed since the previous frame.
Here is how I was planning on dealing with movement:
Accelerate
- Maximum of 10 or current speed, multiplied by % of Turn Elapsed
Decelerate
- Half current speed, multiplied by % of Turn Elapsed
Reversing Direction
- Slow down to 0, can then accelerate in reverse
Quick Reverse
- If speed <=5, can perform
- Immediately makes speed 0
- Braking energy worth of unused warp/impulse power must be available
- 8 impulse cooldown (shared with HET)
Base Rotations
- Each rate is 60 degrees per turn of turning
Zero-Energy Turns
- Turns unit 60 degrees over 1 Turn
Sublight Tactical Maneuvers
- Turns unit 60 degrees over 1/2 Turn, cumulative with Warp Tactical Maneuvers
Warp Tactical Maneuvers
- Turns unit 60 degrees over 1/4 Turn, cumulative with Warp Tactical Maneuvers
High Energy Turns
- If unused warp move power available, can perform at any time
- 8 impulse cooldown (shared with quick reverse)
- Turns to face any direction
Erratic Maneuvers
- If unused warp/impulse move power, can start/stop at any time
Directed Turn Modes
- Turning is simply a degrees per second based on current turn mode, though I'd like to have a formula instead of having a turn mode "jump" a full point between 2 speeds.
Emergency Deceleration
- Instantly go to speed 0, and stay there 16 impulses, but power returns at standard decel rate
Sideslip (Ignored)
Positron Flywheel (Ignored)
Mid turn speed changes (Ignored)
Docking (Ignored, For Now)
Pinwheel (Ignored, For Now)
However reserve power throws a wrench into things. Basically since I can track the power in real time, the unit could have power at any given moment for any purpose, or dynamically redirect it where needed. Obviously doing this in the board game would be, well, horribly slow, but in a computer real time I can do it easily.
One of the things that's giving me headaches is how to deal with the power. For example, 1 warp generates 1 power in a single SFB turn. In real time, I'm tracking it by frame, so should the engine generate 1 power over an entire turn, or constantly generate 1 power. If constant things like move power costs are easier, but if you want to charge a weapon that values has to be divided up. I guess I'm just not real sure the best method to convert power in SFB, to power in "real time". Any ideas?
Thanks!