61
Brutal AI / Re: Compiling Brutal-OXCE 8.2.1
« on: February 06, 2024, 12:24:56 pm »
Both, recent version of VS have bug, recent version have work around for this bug
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
- update: STR_BLASTER_BOMB
power: 10
blastRadius: 2
vaporColorSurface: 6
vaporDensitySurface: 10
vaporProbabilitySurface: 100
scripts:
vaporParticleAmmo: |
var int temp;
set subvoxel_velocity subvoxel_trajectory_forward;
muldiv subvoxel_velocity -3 2;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addX temp;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addY temp;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addZ temp;
begin;
var int last 6000;
sub last subvoxel_trajectory_distance_max;
add last subvoxel_trajectory_distance;
if gt last 0;
set temp 100;
muldiv temp last 6000;
random.randomChance temp;
if gt temp 0;
muldiv subvoxel_velocity last 6000;
end;
else lt subvoxel_trajectory_distance 6000;
muldiv subvoxel_velocity subvoxel_trajectory_distance 6000;
end;
end;
subvoxel_velocity.addZ 200;
return;
- update: STR_LASER_RIFLE
vaporColorSurface: 5
vaporDensitySurface: 1
vaporProbabilitySurface: 100
scripts:
vaporParticleAmmo: |
# noting
return;
- update: STR_RIFLE_CLIP
vaporColorSurface: 2
vaporDensitySurface: 17
vaporProbabilitySurface: 100
scripts:
vaporParticleAmmo: |
var int off;
var int temp;
if lt particle_number 3;
var Position up subvoxel_trajectory_up;
var Position right subvoxel_trajectory_right;
var int sin;
var int cos;
set sin subvoxel_trajectory_distance;
set cos subvoxel_trajectory_distance;
wavegen_sin sin 10000 8;
wavegen_cos cos 10000 8;
mul up sin;
mul right cos;
set subvoxel_offset up;
add subvoxel_offset right;
set subvoxel_velocity 0 0 0;
set subvoxel_acceleration 0 0 0;
set subvoxel_drift 10;
set subvoxel_velocity subvoxel_trajectory_forward;
mul subvoxel_velocity -1;
else lt particle_number 5;
add vapor_color -2;
set subvoxel_drift 50;
set subvoxel_velocity subvoxel_trajectory_forward;
else lt particle_number 12;
# set off subvoxel_trajectory_distance;
# wavegen_sin off 1200 5;
set vapor_color -1;
# add vapor_color +1;
# set subvoxel_velocity 0 0 150;
# set subvoxel_acceleration 0 0 off;
else;
var int sin;
var int last 6400;
sub last subvoxel_trajectory_distance_max;
add last subvoxel_trajectory_distance;
if gt last 0;
#hit point
add vapor_color -2;
set subvoxel_offset subvoxel_trajectory_forward;
muldiv subvoxel_offset last 256;
random.randomRangeSymmetric temp 500;
subvoxel_velocity.setX temp;
random.randomRangeSymmetric temp 500;
subvoxel_velocity.setY temp;
random.randomRangeSymmetric temp 500;
subvoxel_velocity.setZ temp;
set subvoxel_acceleration subvoxel_velocity;
muldiv subvoxel_acceleration -1 50;
else lt subvoxel_trajectory_distance 6000;
add vapor_color +1;
#start trajectory
set subvoxel_velocity subvoxel_trajectory_forward;
mul subvoxel_velocity -4;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addX temp;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addY temp;
random.randomRangeSymmetric temp 100;
subvoxel_velocity.addZ temp;
set subvoxel_acceleration 0 0 -10;
else;
# set sin subvoxel_trajectory_distance;
# wavegen_sin sin 1000 -12;
# add vapor_color -1;
# set subvoxel_acceleration 0 0 sin;
# set subvoxel_drift 1000;
# set vapor_color -1;
end;
end;
return;
In next week I prepare more concrete examples of some popular weapons trails.
It then gets into this part of C++ I have difficulty understanding. With the Lambdas. For reasons I don't understand I can hover over some of the parameters to see their values but not all of them.I meet problems like this when compiler optimalize out variable I like to look on. some times `volatile` to keep compiler hands away from it.