Thread View: comp.lang.c
3 messages
3 total messages
Started by fir
Tue, 03 Nov 2026 03:21
[programming in c] small spacecraft piloting
Author: fir
Date: Tue, 03 Nov 2026 03:21
Date: Tue, 03 Nov 2026 03:21
64 lines
3871 bytes
3871 bytes
as i said i find programming in c a valid topic on comp.lang.c though i understand maybe it will get no many answers as c is like commo denominator and programing a thing not necessary but if i got some things i may share, maybe it will get some outcome though probbly not here is video on it https://www.youtube.com/watch?v=vJ-Q-OA5ONY i added a small spacecraft piloting to my (fully pure c) rasterizer and it simply opens some problems that are near "walls" by walls i name such situation when you want to obtain something but you hit the wall and it stops you.. here im not exactly hit the walls maybe but may be near so i maybe name some (and if someone want may comment on this) 1) as i said i want to obtain a "juicy" result and piloting a ship is near some wall here becouse i noticed that flyin in emptu space just by camera for some reasons looks better, i dont know its maybe becouse concentration of viewer is not focused on a ship in the centre so more engagement is put in viewing the 3d scenery - observing that ship in the centre spoils it though aside there is also some advantage of it as ships has its side and when it flyies thru scenery closely the size of the scenery is better illustrated..but the first problem stays (the question is how to improve this?) 2 second problem is steering... this is quite serious problem..it is how to steer the ship to make all go look good... right now camera is pinned to the ship but when i move a mouse its rotating around it and only if i press right mouse button the ship began to turn in stright looking direction - so i f i need him to turn 20 degrees right i just look the camero 20 degrees right and press right button...the routines according to which he changes its angular velocities also need to work i also stop the whole scene when nor right mouse button is pressed without that it all wass to fast (i mean enemies dont need to stop and look around, they move ans shoot too fast, so pause is imo good way) (how to improve it?) 3. third problem is the algorithm for bots - how they should behave.. i mean they should be skillful fighters so they should go out when im on them, they should also turn ad shoot and generally make good lookin space fights this is also open question 4. there are potential more topics here - like i dont added any potentially costly things like collisions - but as to this i dont wanna burdem my code with it yet (as it wil be burden so maybe i should work first on mentioned problems.. they are hard enough)
Re: [programming in c] small spacecraft piloting
Author: fir
Date: Tue, 03 Nov 2026 12:07
Date: Tue, 03 Nov 2026 12:07
102 lines
5417 bytes
5417 bytes
fir pisze: > as i said i find programming in c a valid topic on comp.lang.c > though i understand maybe it will get no many answers as c is like commo > denominator and programing a thing not necessary > > but if i got some things i may share, maybe it will get some outcome > though probbly not > > here is video on it > > https://www.youtube.com/watch?v=vJ-Q-OA5ONY > > i added a small spacecraft piloting to my (fully pure c) rasterizer and > it simply opens some problems that are near "walls" > > by walls i name such situation when you want to obtain something but you > hit the wall and it stops you.. here im not exactly hit the walls maybe > but may be near > > so i maybe name some (and if someone want may comment on this) > > 1) as i said i want to obtain a "juicy" result and piloting > a ship is near some wall here becouse i noticed that flyin in emptu > space just by camera for some reasons looks better, i dont know > its maybe becouse concentration of viewer is not focused on a ship > in the centre so more engagement is put in viewing the 3d scenery > - observing that ship in the centre spoils it > > though aside there is also some advantage of it as ships has its side > and when it flyies thru scenery closely the size of the scenery > is better illustrated..but the first problem stays > > (the question is how to improve this?) > > 2 > > second problem is steering... this is quite serious problem..it is how > to steer the ship to make all go look good... > right now camera is pinned to the ship but when i move a mouse its > rotating around it and only if i press right mouse button the ship > began to turn in stright looking direction - so i f i need him > to turn 20 degrees right i just look the camero 20 degrees right and > press right button...the routines according to which he changes its > angular velocities also need to work > > i also stop the whole scene when nor right mouse button is pressed > without that it all wass to fast (i mean enemies dont need to stop and > look around, they move ans shoot too fast, so pause is imo good way) > > (how to improve it?) > > 3. third problem is the algorithm for bots - how they should behave.. > i mean they should be skillful fighters so they should go out when im > on them, they should also turn ad shoot and generally make good lookin > space fights > > this is also open question > > 4. there are potential more topics here - like i dont added > any potentially costly things like collisions - but as to this i > dont wanna burdem my code with it yet (as it wil be burden so maybe i > should work first on mentioned problems.. they are hard enough) > > well it seem to be a hard problem generally as i said the plan would be to search "juicy" things - but it would invlve many code and tries what is juicer and what is less juicy... and that searching costs some things for example 1. i may miss /omit very best ideas just not thinkin on them (very probably) 2. thise i try make some mess in code (then i can clean t but it cost a tim) and overally cost a time so like this sip im myslef in a space of more and less juicy things couldn quite find a way to more juicy regions easily ;c but no stress, as i sai im doint it like 'toying ' attempt and if so it mean i can just do things slowly (if i yet find a time on this) code some and see the results -still it gaves some research values at least whay i got is standable imo (standable level of juicinesss) though i should be carefull becouse random additions sometimes put juiciness down as to those points above 1 - its hard to find, i could teast some other ways of camere movement i guess (as i tmay depend on this), but probably not now 2 - what i got is also not best but standable so i meybe also put it lower on the list 3 - that i for sure must focus (though maybe it can be not easy to observing) 4 - this worries me as for example geometry collisions are needed but may be cpu costly and this is depressing
Re: [programming in c] small spacecraft piloting
Author: fir
Date: Tue, 03 Nov 2026 12:39
Date: Tue, 03 Nov 2026 12:39
120 lines
6055 bytes
6055 bytes
fir pisze: > fir pisze: >> as i said i find programming in c a valid topic on comp.lang.c >> though i understand maybe it will get no many answers as c is like >> commo denominator and programing a thing not necessary >> >> but if i got some things i may share, maybe it will get some outcome >> though probbly not >> >> here is video on it >> >> https://www.youtube.com/watch?v=vJ-Q-OA5ONY >> >> i added a small spacecraft piloting to my (fully pure c) rasterizer and >> it simply opens some problems that are near "walls" >> >> by walls i name such situation when you want to obtain something but >> you hit the wall and it stops you.. here im not exactly hit the walls >> maybe but may be near >> >> so i maybe name some (and if someone want may comment on this) >> >> 1) as i said i want to obtain a "juicy" result and piloting >> a ship is near some wall here becouse i noticed that flyin in emptu >> space just by camera for some reasons looks better, i dont know >> its maybe becouse concentration of viewer is not focused on a ship >> in the centre so more engagement is put in viewing the 3d scenery >> - observing that ship in the centre spoils it >> >> though aside there is also some advantage of it as ships has its side >> and when it flyies thru scenery closely the size of the scenery >> is better illustrated..but the first problem stays >> >> (the question is how to improve this?) >> >> 2 >> >> second problem is steering... this is quite serious problem..it is how >> to steer the ship to make all go look good... >> right now camera is pinned to the ship but when i move a mouse its >> rotating around it and only if i press right mouse button the ship >> began to turn in stright looking direction - so i f i need him >> to turn 20 degrees right i just look the camero 20 degrees right and >> press right button...the routines according to which he changes its >> angular velocities also need to work >> >> i also stop the whole scene when nor right mouse button is pressed >> without that it all wass to fast (i mean enemies dont need to stop and >> look around, they move ans shoot too fast, so pause is imo good way) >> >> (how to improve it?) >> >> 3. third problem is the algorithm for bots - how they should behave.. >> i mean they should be skillful fighters so they should go out when im >> on them, they should also turn ad shoot and generally make good lookin >> space fights >> >> this is also open question >> >> 4. there are potential more topics here - like i dont added >> any potentially costly things like collisions - but as to this i >> dont wanna burdem my code with it yet (as it wil be burden so maybe i >> should work first on mentioned problems.. they are hard enough) >> >> > > > well it seem to be a hard problem > > generally as i said the plan would be to search "juicy" things > - but it would invlve many code and tries what is juicer and > what is less juicy... and that searching costs some things > > for example > 1. i may miss /omit very best ideas just not thinkin on them (very > probably) > > 2. thise i try make some mess in code (then i can clean t but it cost a > tim) and overally cost a time > > so like this sip im myslef in a space of more and less juicy things > couldn quite find a way to more juicy regions easily ;c > > but no stress, as i sai im doint it like 'toying ' attempt and > if so it mean i can just do things slowly (if i yet find a time on this) > code some and see the results -still it gaves some research values > > at least whay i got is standable imo (standable level of juicinesss) > though i should be carefull becouse random additions sometimes put > juiciness down > > as to those points above > > 1 - its hard to find, i could teast some other ways of camere movement i > guess (as i tmay depend on this), but probably not now > the problem may be the camera isnt sooth? (as int isnt though i mede basic smoothing maybe not enough) the ship turns also not enough smooth? could work on that 2 maybe but im not sure if smoothing resolves all problems here..there may be also a problem with area of view, dynamic and possibly other things it needs a more carefull research maybe (to do some dynamic i would like doing more complex moves of the camera than just smoothing) > 2 - what i got is also not best but standable so i meybe also put it > lower on the list > > 3 - that i for sure must focus (though maybe it can be not easy to > observing) > > 4 - this worries me as for example geometry collisions are needed but > may be cpu costly and this is depressing
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads