• [p.i.c] ships flyin and faitin

    From fir@3:633/10 to All on Monday, November 16, 2026 20:37:34
    i toy with this 3d rasterizer and get some 3d ships (kinda like aeroplanes/jets but in space) and want to code them interesting flying behaviours

    maybe some will have some thoughts on it (then i eventually my try some
    ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example some
    basic algortihm that work is

    void FlyPass2(int i)
    {
    float3 player_pos=PlayerPos();
    float3 to_player=sub(player_pos,bag[i].p.pos);
    float distance=length(to_player);
    if(distance<0.001f) return;
    normalize(&to_player);

    if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass' && bag[i].combat_state!='turn') bag[i].combat_state='approach';

    if(bag[i].combat_state=='approach')
    {
    YawPitchAccelerate(i,to_player,30/3);
    if(distance<20*150) bag[i].combat_state='pass';
    }

    if(bag[i].combat_state=='pass')
    {
    YawPitchAccelerate(i,to_player,60/3);
    if(distance<20*70) bag[i].combat_state='turn';
    }

    if(bag[i].combat_state=='turn')
    {
    float3 direction=mul(to_player,-1.0f);
    YawPitchAccelerate(i, direction, 45/3);

    if(distance>20*600) bag[i].combat_state='approach';
    }
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what is
    the ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float arrival_distance)
    {
    if(!points || point_count<=0) return;

    int point=(int)bag[i].mode;

    if(point<0 || point>=point_count) point=0;

    float3 destination=points[point];
    float3 direction=sub(destination,bag[i].p.pos);

    if(length(direction)<arrival_distance)
    {
    point++;
    if(point>=point_count) point=0;

    bag[i].mode=(unsigned)point;
    destination=points[point];
    }

    FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Ross Finlayson@3:633/10 to All on Monday, November 16, 2026 12:10:07
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like aeroplanes/jets but in space) and want to code them interesting flying behaviours

    maybe some will have some thoughts on it (then i eventually my try some
    ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example some basic algortihm that work is

    void FlyPass2(int i)
    {
    float3 player_pos=PlayerPos();
    float3 to_player=sub(player_pos,bag[i].p.pos);
    float distance=length(to_player);
    if(distance<0.001f) return;
    normalize(&to_player);

    if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass'
    && bag[i].combat_state!='turn') bag[i].combat_state='approach';

    if(bag[i].combat_state=='approach')
    {
    YawPitchAccelerate(i,to_player,30/3);
    if(distance<20*150) bag[i].combat_state='pass';
    }

    if(bag[i].combat_state=='pass')
    {
    YawPitchAccelerate(i,to_player,60/3);
    if(distance<20*70) bag[i].combat_state='turn';
    }

    if(bag[i].combat_state=='turn')
    {
    float3 direction=mul(to_player,-1.0f);
    YawPitchAccelerate(i, direction, 45/3);

    if(distance>20*600) bag[i].combat_state='approach';
    }
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what is
    the ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float arrival_distance)
    {
    if(!points || point_count<=0) return;

    int point=(int)bag[i].mode;

    if(point<0 || point>=point_count) point=0;

    float3 destination=points[point];
    float3 direction=sub(destination,bag[i].p.pos);

    if(length(direction)<arrival_distance)
    {
    point++;
    if(point>=point_count) point=0;

    bag[i].mode=(unsigned)point;
    destination=points[point];
    }

    FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more


    The "Master Execution Scheduler" with about 250+ programs
    is off a bunch of main-frame scheduling routines, about
    the roll-ups and the parts in carts and takt-fully.

    It doesn't even have a unit of time more granular than "day",
    "mdays".

    Not my business.



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Monday, November 16, 2026 13:06:54
    On 11/16/2026 12:10 PM, Ross Finlayson wrote:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting flying
    behaviours

    maybe some will have some thoughts on it (then i eventually my try some
    ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example some
    basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙ float3 player_pos=PlayerPos();
    ˙˙˙˙ float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙ float distance=length(to_player);
    ˙˙˙˙ if(distance<0.001f) return;
    ˙˙˙˙ normalize(&to_player);

    ˙˙˙˙ if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass'
    && bag[i].combat_state!='turn')˙˙˙˙˙˙˙ bag[i].combat_state='approach';

    ˙˙˙˙ if(bag[i].combat_state=='approach')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙ }

    ˙˙˙˙ if(bag[i].combat_state=='pass')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙ }

    ˙˙˙˙ if(bag[i].combat_state=='turn')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙ }
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear
    acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its max
    accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what is
    the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more


    The "Master Execution Scheduler" with about 250+ programs
    is off a bunch of main-frame scheduling routines, about
    the roll-ups and the parts in carts and takt-fully.

    Huh?


    It doesn't even have a unit of time more granular than "day",
    "mdays".

    Not my business.




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Monday, November 16, 2026 13:08:07
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like aeroplanes/jets but in space) and want to code them interesting flying behaviours
    [...]
    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more

    Just ask your AI to do it for you... Right? Why even think about doing
    it yourself... Sigh...


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Monday, November 16, 2026 22:57:34
    Ross Finlayson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting flying
    behaviours

    maybe some will have some thoughts on it (then i eventually my try some
    ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example some
    basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙ float3 player_pos=PlayerPos();
    ˙˙˙˙ float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙ float distance=length(to_player);
    ˙˙˙˙ if(distance<0.001f) return;
    ˙˙˙˙ normalize(&to_player);

    ˙˙˙˙ if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass'
    && bag[i].combat_state!='turn')˙˙˙˙˙˙˙ bag[i].combat_state='approach';

    ˙˙˙˙ if(bag[i].combat_state=='approach')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙ }

    ˙˙˙˙ if(bag[i].combat_state=='pass')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙ }

    ˙˙˙˙ if(bag[i].combat_state=='turn')
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙ }
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear
    acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its max
    accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what is
    the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more


    The "Master Execution Scheduler" with about 250+ programs
    is off a bunch of main-frame scheduling routines, about
    the roll-ups and the parts in carts and takt-fully.

    It doesn't even have a unit of time more granular than "day",
    "mdays".

    Not my business.



    are ou here to troll? if so trolls are not so easy welcome imo


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Monday, November 16, 2026 23:00:22
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting flying
    behaviours
    [...]
    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    Just ask your AI to do it for you... Right? Why even think about doing
    it yourself... Sigh...


    i can ask ai but i want to have people some chance for fun..

    besides things need some proportion..and some need sometimes to go slow
    and try something other etc ..usenet thinking resolves problems slower
    but like more deep than talk with ai - and i need some slower and deeper thought

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Tuesday, November 17, 2026 00:33:03
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours
    [...]
    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    Just ask your AI to do it for you... Right? Why even think about doing
    it yourself... Sigh...


    i can ask ai but i want to have people some chance for fun..

    besides things need some proportion..and some need sometimes to go slow
    and try something other etc ..usenet thinking resolves problems slower
    but like more deep than talk with ai - and i need some slower and deeper thought

    one i could think is for example:

    the most strightforward attempt for ship to fight is to just 100% aim at target (my ship) and shoot...ewentually slow speed up if im far and slow
    down if im close - i see the bullets incoming on hud (as a linear 3d
    stream so i could try to dodge if im far)
    (speed of bullets right now 150 m/s my ship speed like typically 60 m/s)

    speeding up eventually makes sense as from far distance its harder to
    hit, slowing down when close eventually yet more sense

    some problem is some could say if incoming ship is fire'ing it only
    shots in direct way stright of his flight so he cant dodge if its aiming
    at me, coz if its turns the bullet stream points in another direction
    (which in fact if turnings are small may be good, say tutning in some
    area could make a trap of bullats, i mean wider bullet stream, cone
    instead of line


    eventually is ship want to aim me he could make strafe moves and
    correct turning to aim me atill strafe moves making him moves and
    make it harder to hit

    that could be a basic piece of theory

    IN FACT i could run the bot vs bot space fights and obserwe ho will win
    so this could b a good programming contest..alghoritm vs algorithm
    and i can put a video which one wins ;c

    also possible to run alghoritms for whole escadres fight

    its not so hard though it need some focus


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Tuesday, November 17, 2026 00:53:24
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours
    [...]
    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    Just ask your AI to do it for you... Right? Why even think about
    doing it yourself... Sigh...


    i can ask ai but i want to have people some chance for fun..

    besides things need some proportion..and some need sometimes to go
    slow and try something other etc ..usenet thinking resolves problems
    slower
    but like more deep than talk with ai - and i need some slower and
    deeper thought

    one i could think is for example:

    the most strightforward attempt for ship to fight is to just 100% aim at target (my ship) and shoot...ewentually slow speed up if im far and slow down if im close - i see the bullets incoming on hud (as a linear 3d
    stream so i could try to dodge if im far)
    (speed of bullets right now 150 m/s my ship speed like typically 60 m/s)

    speeding up eventually makes sense as from far distance its harder to
    hit, slowing down when close eventually yet more sense

    some problem is some could say if incoming ship is fire'ing it only
    shots in direct way stright of his flight so he cant dodge if its aiming
    at me, coz if its turns the bullet stream points in another direction
    (which in fact if turnings are small may be good, say tutning in some
    area could make a trap of bullats, i mean wider bullet stream, cone
    instead of line


    eventually is ship want to aim me he could make strafe moves and
    correct turning to˙ aim me atill strafe moves making him moves and
    make it harder to hit

    that could be a basic piece of theory

    IN FACT i could run the bot vs bot space fights and obserwe ho will win
    so this could b a good programming contest..alghoritm vs algorithm
    and i can put a video which one wins ;c

    also possible to run alghoritms for whole escadres fight

    its not so hard though it need some focus

    here are basik video of this

    https://www.youtube.com/watch?v=3k6OlNCLzE4

    there are two drones and 2 lame fighters as enemy

    drones have algorithm/procedure to sit on tail and they are too agile to
    dodge them they sitt on tail like flies - thoug here they exploded
    probbaly catching the ranndom bullets or i got soem error in algorith
    and they exploded on own bullets maybe (need to check it later)

    two lame fighters are easy to shot (they use this algorithm fly near 500
    m to 200 m if less than 200 m shoting go away 600 m and repeat)


    o got not strong cpu so this video dropped many frames it seems

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Tuesday, November 17, 2026 00:56:08
    fir pisze:
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours
    [...]
    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    Just ask your AI to do it for you... Right? Why even think about
    doing it yourself... Sigh...


    i can ask ai but i want to have people some chance for fun..

    besides things need some proportion..and some need sometimes to go
    slow and try something other etc ..usenet thinking resolves problems
    slower
    but like more deep than talk with ai - and i need some slower and
    deeper thought

    one i could think is for example:

    the most strightforward attempt for ship to fight is to just 100% aim
    at target (my ship) and shoot...ewentually slow speed up if im far and
    slow down if im close - i see the bullets incoming on hud (as a linear
    3d stream so i could try to dodge if im far)
    (speed of bullets right now 150 m/s my ship speed like typically 60 m/s)

    speeding up eventually makes sense as from far distance its harder to
    hit, slowing down when close eventually yet more sense

    some problem is some could say if incoming ship is fire'ing it only
    shots in direct way stright of his flight so he cant dodge if its
    aiming at me, coz if its turns the bullet stream points in another
    direction
    (which in fact if turnings are small may be good, say tutning in some
    area could make a trap of bullats, i mean wider bullet stream, cone
    instead of line


    eventually is ship want to aim me he could make strafe moves and
    correct turning to˙ aim me atill strafe moves making him moves and
    make it harder to hit

    that could be a basic piece of theory

    IN FACT i could run the bot vs bot space fights and obserwe ho will
    win so this could b a good programming contest..alghoritm vs algorithm
    and i can put a video which one wins ;c

    also possible to run alghoritms for whole escadres fight

    its not so hard though it need some focus

    here are basik video of this

    https://www.youtube.com/watch?v=3k6OlNCLzE4

    there are two drones and 2 lame fighters as enemy

    drones have algorithm/procedure to sit on tail and they are too agile to dodge them they sitt on tail like flies - thoug here they exploded
    probbaly catching the ranndom bullets or i got soem error in algorith
    and they exploded on own bullets maybe (need to check it later)



    those drones though very agile but has lesslinear speed so the option is
    to speed up left them behind turn on them and shoot them in front until
    they jump on tail - though if they approaching they shoot ofc

    (they literally never escape..unlike lame fighters)


    two lame fighters are easy to shot (they use this algorithm fly near 500
    m to 200 m if less than 200 m shoting go away 600 m and repeat)


    o got not strong cpu so this video dropped many frames it seems


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Tuesday, November 17, 2026 11:59:43
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Thursday, November 19, 2026 09:22:54
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Thursday, November 19, 2026 12:37:50
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai use instancing for the asteroids?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Thursday, November 19, 2026 22:06:16
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai use instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write some implemenations of functions i tell it to provide but i need to orgaanize
    it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you to
    test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather
    obvious

    its all cpu..and i got very old PC must buy new one and that will be
    fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly slows
    down) but also becouse of collision detection - wchich is square and
    may make it all choke (esp if i will shot a lot of bullets need a lot of collision checks with everything..so it is even an option i will hit the
    wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but if
    i will see it takes 10 ms of frame time or mor i may end up depressed ;c

    though on positiveside i got some hope some things like coding
    'flock'/crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually)




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Thursday, November 19, 2026 14:01:55
    On 11/19/2026 1:06 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding >>>> -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure, >>>> maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai use
    instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write some implemenations of functions i tell it to provide but i need to orgaanize
    it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you to test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather obvious

    its all cpu..and i got very old PC must buy new one and that will be fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly slows down) but also becouse of collision detection - wchich is square and
    may make it all choke (esp if i will shot a lot of bullets need a lot of collision checks with everything..so it is even an option i will hit the wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but if
    i will see it takes 10 ms of frame time or mor i may end up depressed ;c

    though on positiveside i got some hope some things like coding 'flock'/ crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually)




    You need to ask AI what instancing is. Think of one model, and a buffer
    to the vertex shader with say, a shit load of mat4's. The single model
    can be placed in many places with one single shader pass.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Thursday, November 19, 2026 14:03:14
    On 11/19/2026 2:01 PM, Chris M. Thomasson wrote:
    On 11/19/2026 1:06 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding >>>>> -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not
    sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai
    use instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write
    some implemenations of functions i tell it to provide but i need to
    orgaanize it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you
    to test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather
    obvious

    its all cpu..and i got very old PC must buy new one and that will be
    fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly
    slows down) but also becouse of collision detection - wchich is square
    and
    may make it all choke (esp if i will shot a lot of bullets need a lot of
    collision checks with everything..so it is even an option i will hit
    the wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but
    if i will see it takes 10 ms of frame time or mor i may end up
    depressed ;c

    though on positiveside i got some hope some things like coding
    'flock'/ crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually)




    You need to ask AI what instancing is. Think of one model, and a buffer
    to the vertex shader with say, a shit load of mat4's. The single model
    can be placed in many places with one single shader pass.

    Depending on the buffer, one single model, can be in many places each
    with different scales, rotations, etc. Also, it works with models that
    have bones.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Thursday, November 19, 2026 14:11:11
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    It looks good to me.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Thursday, November 19, 2026 21:57:35
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like aeroplanes/jets but in space) and want to code them interesting flying behaviours

    maybe some will have some thoughts on it (then i eventually my try some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙float distance=length(to_player);
    ˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙normalize(&to_player);

    ˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass'
    && bag[i].combat_state!='turn')˙˙˙˙˙˙˙ bag[i].combat_state='approach';

    ˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙{
    ˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙}

    ˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙{
    ˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙}

    ˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙{
    ˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45 meters/s)

    ˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its max accalarations


    i need good ideas what such ships can do..i not yet thought on this seriously (becouse it took me a time to build this setup and see what is
    the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float arrival_distance)
    {
    ˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙ float3 destination=points[point];
    ˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙ {
    ˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙ }

    ˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to another
    and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when I
    was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, November 20, 2026 09:23:38
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting flying
    behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example
    some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!='pass'
    && bag[i].combat_state!='turn')˙˙˙˙˙˙˙ bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and linear
    acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its
    max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what
    is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though im
    not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when I
    was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, November 20, 2026 09:28:35
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example
    some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' &&
    bag[i].combat_state!='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its
    max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what
    is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though
    im not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when
    I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    i could say the diffetence is probably such then when using stright
    winai you will deal with quirks (or own lack of experiance) of winapi
    and with side library with quirks of this librarary

    hovever im not saying people should write on cpu rasterisation
    its for learning purposes if i owuld buiuld something, test a things i
    will probbaly "port " to gpu just to have much more geometry
    (gpu probably handle 10x more than cpu)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, November 20, 2026 09:33:21
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example
    some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' &&
    bag[i].combat_state!='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its
    max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though
    im not sure those strafe moves i defined well, also by acceleration
    + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when
    I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    i could say the diffetence is probably˙ such then when using stright
    winai you will deal with quirks (or own˙ lack of experiance) of winapi
    and with side library with quirks of this librarary

    hovever im not saying people should write on cpu rasterisation
    its for learning purposes if i owuld buiuld something, test a things i
    will probbaly "port " to gpu just to have much more geometry
    (gpu probably handle 10x more than cpu)

    i also only use one core

    now im weirdly tired, and if i would not i probbaly should testing
    routines for ships avoiding collisions..i only also have only
    bullets-ships collisions and ships-asteroids and thosw collisions worry
    me becouse rasterisation is linear but collisions are square and optimising
    it makes code much more rigit/stiff im afraid so this can be a worry

    9also using more cores makes code imo more rigid/stfii so i also dont
    want to do it unles maybe final stepp...now im only toying and
    experimenting)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, November 20, 2026 09:42:18
    fir pisze:
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example >>>>> some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' &&
    bag[i].combat_state!='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45 >>>>> meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its >>>>> max accalarations


    i need good ideas what such ships can do..i not yet thought on this >>>>> seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though >>>>> im not sure those strafe moves i defined well, also by acceleration >>>>> + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    i could say the diffetence is probably˙ such then when using stright
    winai you will deal with quirks (or own˙ lack of experiance) of winapi
    and with side library with quirks of this librarary

    hovever im not saying people should write on cpu rasterisation
    its for learning purposes if i owuld buiuld something, test a things i
    will probbaly "port " to gpu just to have much more geometry
    (gpu probably handle 10x more than cpu)

    i also only use one core

    now im weirdly tired, and if i would not i probbaly should testing
    routines for ships avoiding collisions..i only also have only
    bullets-ships collisions and ships-asteroids and thosw collisions worry
    me becouse rasterisation is linear but collisions are square and optimising it makes code much more rigit/stiff im afraid so this can be a worry

    9also using more cores makes code imo more rigid/stfii so i also dont
    want to do it unles maybe final stepp...now im only toying and experimenting)

    computers are to slow now:

    it is like you do some thing here and it cost 5-7 ms (say so)
    if your frame budget it 15-20 ms (its more 15 ms as i need to put some
    sleep for cpu not to run it 80%-100%) so you cant put to much

    BUT IF cpu would be 10x faster then you can put much more of it
    ad that would be a big difference

    (probably more new cpu than mi old i3 are like twice faster
    so at least if i buy some i will have some more space)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Friday, November 20, 2026 15:04:38
    On 11/20/2026 12:33 AM, fir wrote:
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example >>>>> some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45 >>>>> meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its >>>>> max accalarations


    i need good ideas what such ships can do..i not yet thought on this >>>>> seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though >>>>> im not sure those strafe moves i defined well, also by acceleration >>>>> + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    i could say the diffetence is probably˙ such then when using stright
    winai you will deal with quirks (or own˙ lack of experiance) of winapi
    and with side library with quirks of this librarary

    hovever im not saying people should write on cpu rasterisation
    its for learning purposes if i owuld buiuld something, test a things i
    will probbaly "port " to gpu just to have much more geometry
    (gpu probably handle 10x more than cpu)

    i also only use one core

    now im weirdly tired, and if i would not i probbaly should testing
    routines for ships avoiding collisions..i only also have only bullets-
    ships collisions and ships-asteroids and thosw collisions worry me
    becouse rasterisation is linear but collisions are square and optimising
    it makes code much more rigit/stiff im afraid so this can be a worry

    9also using more cores makes code imo more rigid/stfii so i also dont
    want to do it unles maybe final stepp...now im only toying and experimenting)

    Well, is your engine multithreaded?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Friday, November 20, 2026 15:07:03
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example
    some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its
    max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see what
    is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though
    im not sure those strafe moves i defined well, also by acceleration +
    dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when
    I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Saturday, November 21, 2026 00:41:11
    Chris M. Thomasson pisze:
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example
    some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn') bag[i].combat_state='approach'; >>>>
    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45
    meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its
    max accalarations


    i need good ideas what such ships can do..i not yet thought on this
    seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though
    im not sure those strafe moves i defined well, also by acceleration
    + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back when
    I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    its much simpler than you think - its mainly triangle rasterization
    routine (rasterizatio it is drawing with depth buffer also basic
    cliping).. light you can count using triangle normal and lights you
    define..

    one of the main advantages it is just get know how simple it is and how
    it works..other advantage is in fact you can do what you want define
    thousand lights , defina routines for lightning like you want etc..try
    to think on rasterisation not triangles but bezier patches etc ..you can
    d what you want in pure c so its theretical freedom but ofc it will slow
    down

    more hard than basic rasterisation is maybe the transformation and
    projection by camera and camera movement as it needs imo a carefull understanding of x y z coordinates

    so this is kinda low level, simple transparent but you need to
    understand those few functions well..overally it also should be no point
    of focus more focus is higher layer of those ships and their
    interactions (which need some work, rasterization in turn is well known
    and not really hard problem, well resolved and described)




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Friday, November 20, 2026 16:23:20
    On 11/20/2026 3:41 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example >>>>> some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45 >>>>> meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its >>>>> max accalarations


    i need good ideas what such ships can do..i not yet thought on this >>>>> seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though >>>>> im not sure those strafe moves i defined well, also by acceleration >>>>> + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    its much simpler than you think - its mainly triangle rasterization
    routine (rasterizatio it is drawing with depth buffer also basic
    cliping).. light you can count using triangle normal and lights you
    define..

    one of˙ the main advantages it is just get know how simple it is and how
    it works..other advantage is in fact you can do what you want define thousand lights , defina routines for lightning like you want etc..try
    to think on rasterisation not triangles but bezier patches etc ..you can
    d what you want in pure c so its theretical freedom but ofc it will slow down

    more hard than basic rasterisation is maybe the transformation and projection by camera and camera movement as it needs imo a carefull understanding of x y z coordinates

    so this is kinda low level, simple transparent but you need to
    understand those few functions well..overally it also should be no point
    of focus more focus is higher layer of those ships and their
    interactions (which need some work, rasterization in turn is well known
    and not really hard problem, well resolved and described)




    When you port over to say modern opengl, learning the raw pipeline might
    help you out?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Friday, November 20, 2026 16:47:00
    On 11/20/2026 3:04 PM, Chris M. Thomasson wrote:
    On 11/20/2026 12:33 AM, fir wrote:
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try >>>>>> some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for
    example some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20
    (45 meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from >>>>>> 0.0..1.0 can be passed if ships qould be said only use parts of
    its max accalarations


    i need good ideas what such ships can do..i not yet thought on
    this seriously (becouse it took me a time to build this setup and >>>>>> see what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves
    (though im not sure those strafe moves i defined well, also by
    acceleration + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float >>>>>> arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    i could say the diffetence is probably˙ such then when using stright
    winai you will deal with quirks (or own˙ lack of experiance) of
    winapi and with side library with quirks of this librarary

    hovever im not saying people should write on cpu rasterisation
    its for learning purposes if i owuld buiuld something, test a things
    i will probbaly "port " to gpu just to have much more geometry
    (gpu probably handle 10x more than cpu)

    i also only use one core

    now im weirdly tired, and if i would not i probbaly should testing
    routines for ships avoiding collisions..i only also have only bullets-
    ships collisions and ships-asteroids and thosw collisions worry me
    becouse rasterisation is linear but collisions are square and optimising
    it makes code much more rigit/stiff im afraid so this can be a worry

    9also using more cores makes code imo more rigid/stfii so i also dont
    want to do it unles maybe final stepp...now im only toying and
    experimenting)

    Well, is your engine multithreaded?

    One core on the CPU. Fine. Yes there is a way to multithread the CPU
    side. Learning about a proper pipeline is good as well.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Friday, November 20, 2026 17:37:31
    On 11/19/2026 2:11 PM, Chris M. Thomasson wrote:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding
    -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    It looks good to me.

    For sheer inspiration!

    https://youtu.be/SIxi2uqFVmc?list=RDcRAmtrnOXWc

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Saturday, November 21, 2026 08:14:28
    Chris M. Thomasson pisze:
    On 11/20/2026 3:41 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try >>>>>> some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for
    example some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20
    (45 meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from >>>>>> 0.0..1.0 can be passed if ships qould be said only use parts of
    its max accalarations


    i need good ideas what such ships can do..i not yet thought on
    this seriously (becouse it took me a time to build this setup and >>>>>> see what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves
    (though im not sure those strafe moves i defined well, also by
    acceleration + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float >>>>>> arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    its much simpler than you think - its mainly triangle rasterization
    routine (rasterizatio it is drawing with depth buffer also basic
    cliping).. light you can count using triangle normal and lights you
    define..

    one of˙ the main advantages it is just get know how simple it is and
    how it works..other advantage is in fact you can do what you want
    define thousand lights , defina routines for lightning like you want
    etc..try to think on rasterisation not triangles but bezier patches
    etc ..you can d what you want in pure c so its theretical freedom but
    ofc it will slow down

    more hard than basic rasterisation is maybe the transformation and
    projection by camera and camera movement as it needs imo a carefull
    understanding of x y z coordinates

    so this is kinda low level, simple transparent but you need to
    understand those few functions well..overally it also should be no
    point of focus more focus is higher layer of those ships and their
    interactions (which need some work, rasterization in turn is well known
    and not really hard problem, well resolved and described)




    When you port over to say modern opengl, learning the raw pipeline might help you out?

    ofc it helps you a lot


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Saturday, November 21, 2026 13:03:40
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding >>>> -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not sure, >>>> maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai use
    instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write some implemenations of functions i tell it to provide but i need to orgaanize
    it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you to test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather obvious

    its all cpu..and i got very old PC must buy new one and that will be fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly slows down) but also becouse of collision detection - wchich is square and
    may make it all choke (esp if i will shot a lot of bullets need a lot of collision checks with everything..so it is even an option i will hit the wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but if
    i will see it takes 10 ms of frame time or mor i may end up depressed ;c

    though on positiveside i got some hope some things like coding
    'flock'/crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually)


    sadly now i feel an ability to code but the drive to invest myself into
    longer state of concentration and push forward decreased so it shows i
    need some rest

    though i maybe found some basic interesting ideas ..i will see after
    some rest


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Saturday, November 21, 2026 20:20:58
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal coding >>>>> -like normally you cut through and write it - turns into 'research'
    where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not
    sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai
    use instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write
    some implemenations of functions i tell it to provide but i need to
    orgaanize it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you
    to test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather
    obvious

    its all cpu..and i got very old PC must buy new one and that will be
    fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly
    slows down) but also becouse of collision detection - wchich is square
    and
    may make it all choke (esp if i will shot a lot of bullets need a lot of
    collision checks with everything..so it is even an option i will hit
    the wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but
    if i will see it takes 10 ms of frame time or mor i may end up
    depressed ;c

    though on positiveside i got some hope some things like coding
    'flock'/crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually)


    sadly now i feel an ability to code but the drive to invest myself into longer state of concentration and push forward decreased so it shows i
    need some rest

    though i maybe found some basic interesting ideas ..i will see after
    some rest


    some idea made by me and ai is that maybe those moves can be composite like


    moveShip(int i)
    {
    ChaseTarget(i, j);
    AvoidObstacles(i);
    ShotIfAimed(i);

    }


    trying it a bit but the avoidance code dont quite work

    https://www.youtube.com/watch?v=v1CIw4jFlik

    overally sadli best is to code after longer break if someone code to
    much its get slowa as snail..so maybe this is nonsense to code snail
    mode (though i m also a bit interested in results)




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Saturday, November 21, 2026 20:23:51
    fir pisze:
    fir pisze:
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/19/2026 12:22 AM, fir wrote:
    fir pisze:
    this is overally all not hard but its such kind of things that
    (for some not quite known for me reason) liek turns from normal
    coding
    -like normally you cut through and write it - turns into 'research' >>>>>> where you can research it for weeks or months

    (and im not saying cutthrough or research are better ways, im not >>>>>> sure,
    maybe some in the middle)

    new version

    https://www.youtube.com/watch?v=T0f6Hx_KrvI

    Love it! :^)

    I give the AI props. Btw, how many lines of code did it make for you?

    Actually, you rendering all of this on the cpu, right? Did that ai
    use instancing for the asteroids?

    its not exactly written by ai you see it wrong..ai is used to write
    some implemenations of functions i tell it to provide but i need to
    orgaanize it in code test it and so on..invent design and more

    its 40k lines of code all made in 2 months though i got a lot of
    experience and i generated things i wrote myself years back also
    (whole rasterizer/window setup/utility function and more)

    its 40k lines but a lot of it its the code for 3d models i tested and
    not use - i will use some only... so its much more code ai allows you
    to test than the final you use probbly few times more...

    i dont know what is instancing but if you mean that given model is in
    fact one array (in fat two vertex array and triangle aray) its rather
    obvious

    its all cpu..and i got very old PC must buy new one and that will be
    fortinate becouse im afraid it can clow down not only becouse of
    geometry (like it can handle about 100k triangles but it obviusly
    slows down) but also becouse of collision detection - wchich is
    square and
    may make it all choke (esp if i will shot a lot of bullets need a lot of >>> collision checks with everything..so it is even an option i will hit
    the wall and get a bit resigned...

    though i have basic experience i collision detection optimisation but
    if i will see it takes 10 ms of frame time or mor i may end up
    depressed ;c

    though on positiveside i got some hope some things like coding
    'flock'/crowd of flying a bit synchronised entities may have good
    look, so there is a potential in it and this is only a base
    (2 months of coding , though i must say i began to feel weary so
    maybe i will drop it and will return to it after some months eventually) >>>

    sadly now i feel an ability to code but the drive to invest myself
    into longer state of concentration and push forward decreased so it
    shows i need some rest

    though i maybe found some basic interesting ideas ..i will see after
    some rest


    some idea made by me and ai is that maybe those moves can be composite like


    moveShip(int i)
    {
    ˙ ChaseTarget(i, j);
    ˙ AvoidObstacles(i);
    ˙ ShotIfAimed(i);

    }


    trying it a bit but the avoidance code dont quite work

    https://www.youtube.com/watch?v=v1CIw4jFlik


    in case it is 3d it is kinda tedious tod ebug as you dont see easily
    whole 3d space

    overally sadli best is to code after longer break if someone code to
    much its get slowa as snail..so maybe this is nonsense to code snail
    mode (though i m also a bit interested in results)





    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Saturday, November 21, 2026 14:36:51
    On 11/20/2026 11:14 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/20/2026 3:41 PM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like >>>>>>> aeroplanes/jets but in space) and want to code them interesting >>>>>>> flying behaviours

    maybe some will have some thoughts on it (then i eventually my
    try some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for
    example some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state! >>>>>>> ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 >>>>>>> (45 meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given >>>>>>> direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and >>>>>>> linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value
    from 0.0..1.0 can be passed if ships qould be said only use parts >>>>>>> of its max accalarations


    i need good ideas what such ships can do..i not yet thought on
    this seriously (becouse it took me a time to build this setup and >>>>>>> see what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves
    (though im not sure those strafe moves i defined well, also by
    acceleration + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float
    speed,float arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to >>>>>>> another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    its much simpler than you think - its mainly triangle rasterization
    routine (rasterizatio it is drawing with depth buffer also basic
    cliping).. light you can count using triangle normal and lights you
    define..

    one of˙ the main advantages it is just get know how simple it is and
    how it works..other advantage is in fact you can do what you want
    define thousand lights , defina routines for lightning like you want
    etc..try to think on rasterisation not triangles but bezier patches
    etc ..you can d what you want in pure c so its theretical freedom but
    ofc it will slow down

    more hard than basic rasterisation is maybe the transformation and
    projection by camera and camera movement as it needs imo a carefull
    understanding of x y z coordinates

    so this is kinda low level, simple transparent but you need to
    understand those few functions well..overally it also should be no
    point of focus more focus is higher layer of those ships and their
    interactions (which need some work, rasterization in turn is well known
    and not really hard problem, well resolved and described)




    When you port over to say modern opengl, learning the raw pipeline
    might help you out?

    ofc it helps you a lot


    ;^D

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Sunday, November 22, 2026 06:07:42
    fir pisze:
    Chris M. Thomasson pisze:
    On 11/20/2026 12:23 AM, fir wrote:
    Chris M. Thomasson pisze:
    On 11/16/2026 11:37 AM, fir wrote:
    i toy with this 3d rasterizer and get some 3d ships (kinda like
    aeroplanes/jets but in space) and want to code them interesting
    flying behaviours

    maybe some will have some thoughts on it (then i eventually my try
    some ideas and post a video how it work)

    the api you need to code such behaviour is quite simple for example >>>>> some basic algortihm that work is

    void FlyPass2(int i)
    {
    ˙˙˙˙˙float3 player_pos=PlayerPos();
    ˙˙˙˙˙float3 to_player=sub(player_pos,bag[i].p.pos);
    ˙˙˙˙˙float distance=length(to_player);
    ˙˙˙˙˙if(distance<0.001f) return;
    ˙˙˙˙˙normalize(&to_player);

    ˙˙˙˙˙if(bag[i].combat_state!='approach' && bag[i].combat_state!
    ='pass' && bag[i].combat_state!='turn')
    bag[i].combat_state='approach';

    ˙˙˙˙˙if(bag[i].combat_state=='approach')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,30/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*150) bag[i].combat_state='pass';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='pass')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i,to_player,60/3);
    ˙˙˙˙˙˙˙˙ if(distance<20*70) bag[i].combat_state='turn';
    ˙˙˙˙˙}

    ˙˙˙˙˙if(bag[i].combat_state=='turn')
    ˙˙˙˙˙{
    ˙˙˙˙˙˙˙˙ float3 direction=mul(to_player,-1.0f);
    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    ˙˙˙˙˙˙˙˙ if(distance>20*600) bag[i].combat_state='approach';
    ˙˙˙˙˙}
    }


    if c would have basic vector arithmetic it would look better

    20*600 mean 600 meters as the world 1.0 unit is like 5 cm

    45/3 means 45 m/s speed -as its about 60 fps so 45/3*60 = 45*20 (45 >>>>> meters/s)

    ˙˙˙˙˙˙˙˙ YawPitchAccelerate(i, direction, 45/3);

    do most work it just make ship starting to yaw-pitch into given
    direction and accelerate/deacce;erate for given speed

    (it is handled by simple 'engine' which has limited angular and
    linear acceleration and there is also dumping factor)..

    here above it uses its max accelerations but eventually value from
    0.0..1.0 can be passed if ships qould be said only use parts of its >>>>> max accalarations


    i need good ideas what such ships can do..i not yet thought on this >>>>> seriously (becouse it took me a time to build this setup and see
    what is the˙ ground around that

    ship eventually also can make 'roll' moves and strafe moves (though >>>>> im not sure those strafe moves i defined well, also by acceleration >>>>> + dumping..it may be bad approach)


    one of interesting tiny algorithm i tested it yet this



    void Patrol(int i,float3 *points,int point_count,float speed,float
    arrival_distance)
    {
    ˙˙˙˙ if(!points || point_count<=0) return;

    ˙˙˙˙ int point=(int)bag[i].mode;

    ˙˙˙˙ if(point<0 || point>=point_count) point=0;

    ˙˙˙˙ float3 destination=points[point];
    ˙˙˙˙ float3 direction=sub(destination,bag[i].p.pos);

    ˙˙˙˙ if(length(direction)<arrival_distance)
    ˙˙˙˙ {
    ˙˙˙˙˙˙˙˙ point++;
    ˙˙˙˙˙˙˙˙ if(point>=point_count) point=0;

    ˙˙˙˙˙˙˙˙ bag[i].mode=(unsigned)point;
    ˙˙˙˙˙˙˙˙ destination=points[point];
    ˙˙˙˙ }

    ˙˙˙˙ FlyToward(i,destination,speed);
    }


    it just take array of 3d points and if near some then it turn to
    another and it in fact looks well...but i need some more

    For fun I closed my work and opened an old project of mine. Back
    when I was experimenting with PBR:

    https://i.ibb.co/bM0vxPRV/image.png

    Btw, how are you drawing to the screen?

    windows has a blitter and you have normal buffer i ram

    unsigned* buf= NULL;

    whuch you then alloc and blit

    acces is buf[w*y+x] = color;

    but if some want not use winapi but some librery that allows to
    use this cpu/ram buffers it will be just about the same thing
    (assuing they wrote this libs sensible and they probably did)


    Ahhh. Okay. Thanks. For learning, that's neat. Almost like you are
    trying to build the pipeline directly on the CPU. Do you have a
    pipeline? You should model at least vertex shader to frag shader.

    its much simpler than you think - its mainly triangle rasterization
    routine (rasterizatio it is drawing with depth buffer also basic
    cliping).. light you can count using triangle normal and lights you
    define..

    one of˙ the main advantages it is just get know how simple it is and how
    it works..other advantage is in fact you can do what you want define thousand lights , defina routines for lightning like you want etc..try
    to think on rasterisation not triangles but bezier patches etc ..you can
    d what you want in pure c so its theretical freedom but ofc it will slow down

    more hard than basic rasterisation is maybe the transformation and projection by camera and camera movement as it needs imo a carefull understanding of x y z coordinates

    so this is kinda low level, simple transparent but you need to
    understand those few functions well..overally it also should be no point
    of focus more focus is higher layer of those ships and their
    interactions (which need some work, rasterization in turn is well known
    and not really hard problem, well resolved and described)


    i found a page that allows me upload executable ,


    https://lord-fir.itch.io/

    here it can be checked (its for win32 but is working in linux wine afaik)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)