• Register
Post news RSS DevelData 03

Hello everyone! I hope you had a nice holiday! Let's go with the first develdata of the year.

Posted by on

Hello everyone!
I hope you had a nice holiday!. Let's go with the first develdata of the year.

Synchronizing clocks
All dates registered in the game that are related to events, such as the date of a system log, need to be synchronized between all the players that share the world.

So far I was using the actual date as a placeholder but I was beginning to be uncomfortable testing certain things related to time, for example, to try an event that will happen in two hours. I had to go modify certain parts of the code so as not to wait for time.

At this point of development it was time to implement a dedicated clock system.

Although the default speed of the game will be accelerated with respect to the real time, when a person sets up a Gray Hack server, certain aspects such as the speed time, or the start date among other things, can be configured. If desired it can be configured to pass in real time.

Currently, as a default value, approximately 2 seconds will equal one minute ingame.

The system is already created and working, at first there were problems since the timer was affected by the framerate of the server and also of the client. Finally I have come up with a fairly simple solution that according to the tests allows the synchronization between all the clients and server with a minimum network usage and independent of the framerate.

Improving world system
Until now npcs are always present on their computers and did not do much. We will give them work and leisure time.
This means that the npcs will go to work, go grocery shopping or go for a drink out there. This will mean that they will not always be online and can help us get into a system unnoticed by taking advantage of those moments.

This will also be useful to finish implementing the system that we could call "cause-effect". For example, provoking the dismissal of a person, or provoking chaos in a company's system can trigger other actions in the world, which may be what we want although other times could produce unexpected results.

See you next week!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.