Saturday, January 13, 2024

NPC flight and other

I have been implementing NPC flight system now. Quite a struggle, but got it to work now somehow. Next up in the endless task list will be Station Management, meaning that player will be able to buy a station and follow and (micro)manage station issues and also hopefully earn cash in the progress, when things go well.

I though it could be fun to show my raw dev notes from my VS code project. So these notes are for myself to remember and organize things. The content is really "raw"/unedited :)  So here they are


01.01.2024
==========
BUGS:
- Every sound sample is played twice,WTF!?!?! => FIXED

4.1.2024 thu
============
TODO
- First ship maintenance service and hull repair service => DONE
- Then start NPC ship stuff...needs design first

Update: NPCs now buy ships, does not fly with them yet...

- BUG: If player has no ship, player pos is not updated according to station pos
=> station drifts away...

Update:
NPCs now taking of, everything is screwed up... does not work.. particle effects ws.
ships...ships does not move...

Issues:
-ParticleSystem uses always Vertex::transform => transform_other should be used in
case of other Ship...
-For some reason, NPC ships do not move even if thrust is applied -OK... needed to
modify thrust as NPCs not handled every frame...
 TODO BUG still with NPC ship Particle System being affected by player movement...


10.1.2024 wed
=============
NPCs now flying..but something severely wrong with either coordinate system or
updating of them or both..
Sometimes NPCs stop without no apparent reason even if thrusting seems to be on.
And sometimes their movements are badly screwed up, some hyperjumps seems to appear...
=> fixed now...

11.01.2024 thursday
===================
NPCs now dock. Some shortcuts had to be made, so that they can eventually dock.
They dock if they are on station and it is set as waypoint, regardless of speed.
Will address/refine that "later"..
Still issues, with NPCs getting stuck on longer journeys...

I have now debug settings all over the place in the code...damn. Those should be
zeroed back when everything works(tm)
Update: Stuck problem solved, ship thrust was growing too big => velocity didnt
get updated any more..
There IS light at the end of the tunnel, is seems :)

 TODO: BUG still with NPC ship Particle System being affected by player movement...

12.1.2024 friday
================
TBD what to do next (apart from general fixes/enhancements)...
- Maybe station management first?
- Maybe hyperspace to other system?

13.1.2024
=========
Bug fix: planet position was not updated when it is rotating around star =>
NPCs got confused when accelereated time is on and planet rotates fast...fixed now.

Sunday, January 7, 2024

NPC development

 Christmas break over now and works to be started (both day-job and this hobby-project ) :)

Some random ramblings about things done and to be done.

Already started to implement NPC flying mechanism. Firstly, NPCs must buy ships and related stuff, like fuel for ships. Some randomness had to be added to the procedures so that not every NPC goes to buy ships and start to fly around at the same time. Actual travel destination selection need to be done based on what NPC is doing (trading or completing other missions).  Flying logic need to include some kind of smooting / filtering algorhitm for direction selection, so that ship movement does not appear to be "jerky" when direction is applied continuously based on calculated heading.


Saturday, December 23, 2023

Christmas update

 Added a video clip to Youtube which demonstrates draft of ship market.

Link here: https://youtu.be/5EoGdLnp5vc?feature=shared

Next thing to do is add those poor NPCs stuck in stations paying residential taxes the "brains" to buy ships and fly around Galaxy :)

Time for Christmas break.

Merry Christmas!


Thursday, December 14, 2023

Ships, docks and more

 Some changes to ship docking. Ships are pulled "inside station" and are not visible when docked. Nice zooming out/in as a bonus :)

Also started to design NPC ship system and also general improvements for Ship logic. Player now starts with no ship in possession, so he must buy one to be able to travel between stations.
More on this later after I have managed to implement my plans..




Friday, December 8, 2023

Bulletin board, NPC "AI" and missions

I have been implementing Bulletin Board System to stations. It is used for general communication between player and NPCs and also for providing tasks and missions for player (and other NPCs).  Also first mission type, delivery missions now implemented, or rather first subset of delivery missions.

System is quite complex, in that mission instances pass between, for example NPC -> station -> Player -> other NPC, with loosely coupled handling logic. I think it provides good ground for more complex scenarios still.

Also started to implement NPC "AI". NPCs now can set messages within a certain set of rules to BBS system. Also, stations are owned by an NPC.

Graphics are still "programmers art", but that have to do at least for the time being.

Below is a screenshot from Bulletin board system in action..

BBS in action


Also, made a Youtube -video demonstrating the BBS and  a delivery mission. Link: https://youtu.be/xIgxCIkWahE?feature=shared


.


Wednesday, November 29, 2023

DeFinibus November summary

After last update, some improvements on status screens and waypoint handling done. Waypoint can now be selected from system map and it is also displayed in the system map.

Some ship equipment also added (can be purchaced from stations): cargo bay updates and fuel tank updates.  Larger cargo bay enables the more efficient trading, if that is what you are aiming for.

I also want to add some kind of "economy simulation" to game. I.e. goods to station does not appear from nowhere, but require producing, which in turn requires funds. Station gets funds from docking fees, residential taxes and from Stockmarket commissions, etc.. This need more planning still.


Friday, November 24, 2023

Worked on universe improvements; now nearest 100 light years is charted within the galaxy. The rest is unknown.  Eventual goal, as described in the introduction posting is to be able to chart unknown systems and build space stations.

Also started to work on NPC habitants. Habitants are now created to stations, but they do not do anything yet. Also started to work on infrastructure preparing for the station managing. Plus some status view improvements etc.. Lotsa work still ahead :D


A while since last post. DeFinibus project has not been progressing at all, but it is not dead yet. Planning to revive the doings soon. Mean...