Novels2Search
Path of Somnus: God's Death
Step 10: Operating System

Step 10: Operating System

Congratulations on completing your first real program.

We can get started with a new game, that is complicated but plays quite simply. But you probably aren't looking forward to spending months making another program so soon.

So... we will do something else.

This chapter. We will do something a bit more fun.

We will work on ECHO.

There are a few core elements we want to work on.

Those being 'execute', 'desktop', 'task manager', and 'navigation'.

What exactly do I mean by 'execute'?

Well, it is just like the examples with functions.

We won't be doing pseudo code in this example as it isn't necessary.

But you will create a function:

ECHO.start();

This entire time. You have been visualizing a chess board in your sea of consciousness. It is time to reap the benefits of all that work.

Think of ECHO like a computer.

This entire time... it hasn't really been launched. You have been using the basic barebone functions.

Essentially a safe mode.

So what happens when you turn on the computer?

The power supply is sent to the various components of the computer.

BIOS... or what is known as the basic input/output system.

You then have the operating system load up. The OS then initializes its components/programs/drivers.

Do you see the issue here?

POWER! COMPONENTS! BIOS!

You have none of these things really...

Well... you have a certain 'form' of them.

You are a biological machine. So you aren't using electricity for this system. So... you must think about the SOURCE.

What powers your brain?

Glucose and oxygen delivered through the blood.

I want you to do a simple exercise here (optional):

DO NOT DO THIS TASK IN A POOL OR UNDERWATER.

Breathe rapidly for 30 seconds.

Exhale.

Then hold your breathe for 3 minutes.

Visualize your brain as you do this. Visualize your entire body. Your cells create CO2 as they make energy. Your blood cells carry this to your lungs where you breathe it out.

The author's tale has been misappropriated; report any instances of this story on Amazon.

By not breathing... this builds up in the blood and is rather uncomfortable.

The average person finds this overwhelming. By rapidly breathing, you exhale a lot of the CO2 out and are less affected by the increase. But eventually, you will become uncomfortable.

During these three minutes. Design the loading screen of ECHO.

[ECHO]: Initializing...

When you lose consciousness for a few milliseconds due to holding your breath...

Your brain 'restarts'.

This is where you take advantage.

You're going to want to design a login screen.

As well as a desktop.

Your also going to want to design a command prompt.

A trash can.

Shortcuts to your programs.

A cursor.

This is far simpler then what we have done before. So it should only take a few seconds.

There are a few core functions we need to add to ECHO.

One of them is Math.

RNG.

Random

Number

Generator

Remember, your guardian uses randomness to make moves and through changes in its fitness level, it improves.

But there is a HUGE problem here.

How exactly do you make it move randomly? Think of a number between 1 and 100.

Let's say you picked 37.

You might think you truly picked a random number there. But that isn't correct at all. Humans themselves aren't random number generators. Even computers aren't capable of generating truly random sequences.

What they can generate can be, best described as pseudorandom.

Computers can generate these numbers using mathematical formulas. They aren't random at all. Before you make a decision. Your subconscious mind has already made its choice.

So your going to want to make a program that generates pseudorandom numbers for you.

We will need a 'seed' for this.

What is a seed? Think of it as the key to getting the same set of values from our generator.

We will have two different seeds. One is called the 'parent' seed. The other is called the 'child' seed.

The parent seed will never change. While the child seed can evolve.

The parent seed is also 'infinite' in a sense.

ECHO.programs.Math = {};

ECHO.programs.Math.parentSeed =[0, 1, 1, 2, 3, 5, 8, 13, 21, 34...];

ECHO.programs.Math.childSeed =ECHO.programs.calendar.getDate();

The getDate function will return a string that is the date. It is important to remember the date. For example. Let's say it is march 1st 2024.

The getDate function will return the string:

"03012024"

This means that ECHO will produce a different set of numbers every single day. If you want, you can change getDate, with getTime. But, that would require you to keep track of time 24/7. While, it would make things more random... that'll take years of additional practice for just a slight increase in realism in the technique.

If the date isn't available as data in your mind (which can happen occasionally). It'll just return this:

"00000000"

So the function for generating random numbers is quite simple:

ECHO.programs.Math.RNG(min, max);

The 'min' is the lowest number. The max is the highest number. So if you do:

var test = ECHO.programs.Math.RNG(0, 10);

The 'test' will return either 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.

There is also Math.random(); That returns a number between 0 and 1.

You can then do something like:

var test = Math.floor(Math.random()*11));

This will make test return a number from 1 to 10.

Unfortunately... our mind doesn't work exactly like a computer. So coding an algorithm isn't necessary for the randomness.

The bulk of the logic behind these random generators isn't really math in this case.

You'll want to base it off something in real life.

For example. Close your eyes and rapidly move them around. As you rotate them as fast as possible. They will move in 'random' directions.

I want you to visualize a small grid.

This is where we will use the parent/child seeds.

We will 'execute' the program here.

First I want you to count in milliseconds...

You have one second to perform this operation.

There are a thousand milliseconds in a second.

As you are counting... visualize the parent seed as a row.

Move along it as if you were playing a 2-D game of pong.

It is 'infinite' and grows larger the further go. But you can only go so far in a single second.

After you land on a value.

You take the value behind and ahead.

In this case I made it to '21'.

Now you make it like this in your mind:

'13', '21', '34'

You now take this and the child seed and imagine essentially a gordian knot. But instead of it being rope. You make the rope be text.

The text is a weird fusion and shouldn't be legible.

Make a 3x3 grid of these knots overlap your vision with your eyes closed.

Then rapidly move your eyes dozens of times...

Whichever knot you land on. Cut it open and extract the hidden value.