🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1292

Re: [programming in c] small spacecraft piloting

#1292
From: fir
Date: Tue, 03 Nov 2026 12:39
120 lines
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
Technical Details
Message-ID: <11cckmq$3ofg1$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11cbk0d$3eaqo$1@dont-email.me> <11ccipa$3no4c$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: [programming in c] small spacecraft piloting
Date: Tue, 3 Nov 2026 13:39:51 +0100
Organization: A noiseless patient Spider
Lines: 120
Message-ID: <11cckmq$3ofg1$1@dont-email.me>
References: <11cbk0d$3eaqo$1@dont-email.me> <11ccipa$3no4c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 03 Nov 2026 12:39:55 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3948033"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+GStihrpwEePhmyoxWbfCCA0d253zt1SI="; posting-host="74e0b903fc41719bd550775fdb1cba7e"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:3CsdXo3euJXwauztI8weZt/eJvc= sha256:XHnBgqtLrFOox5JjBrqcyRRnNErDKrIxx4qIJr2lGLU=
	sha1:zNhqOA+2Q2AZRfr5RFxdAqgkWgk= sha256:88z/G1LsK4iGnQlO6L0kGkhYh2hs5HjeR7vICzB/ZJc=
In-Reply-To: <11ccipa$3no4c$1@dont-email.me>