Cherreads

Chapter 13 - Chapter 13: Module Interface

Estello leaned back in his chair, rubbing his hands together before pointing at Jack and Richard.

"Alright, you two," he said, his voice firm but relaxed, "you should settle your belongings on the third floor. Jackie already told me you're planning to go shopping for computers, servers, or… whatever that tech stuff is."

Jack grinned, nodding.

Estello shifted his gaze toward his grandson. "Jackie, the basement is mostly cleared now. Plenty of space, except for the cars, of course. You'll have to make do with what's left."

Jack smirked. "That's more than enough, Grandpa."

Estello let out a satisfied hum. "Good. Tomorrow, I'll transfer some funds to your account."

Jack perked up. "Thanks, Grandpa."

Then, Estello's gaze shifted toward Richard. Unlike his casual demeanor with Jack, this time his eyes were sharp, firm, penetrating.

"And you, Richie," he said, his tone taking on a fatherly weight, "save your money."

Richard hesitated. "I—"

"Save it." Estello repeated, the authority in his voice leaving no room for argument.

Richard nodded. "Got it."

"Good." Estello leaned back again. "I'll add yours to Jackie's account as well. No need to fuss about it."

Jack clapped his hands together and stretched. "Alright then, we're set."

Estello waved them off. "Go on, now. I've got my own mission—convincing your mother to stay. Hopefully, she listens to reason." He sighed. "I doubt it, though."

Richard exchanged a glance with Anita, but neither said anything.

Jack grabbed his backpack, then reached for Richard's duffel bag and his mother's stroller bag.

"Come on," he said, nodding toward the stairs.

Without another word, they headed to the third floor. As Richard and Jack stepped onto the grand staircase, Richard couldn't help but feel like he had just walked into a king's mansion straight out of a movie.

The sheer opulence and grandeur of the house surrounded him, from the finely polished wood beneath his feet to the ornate chandeliers casting a warm golden glow overhead.

They turned right down a long hallway lined with closed doors.

Jack gestured lazily. "Guest rooms. The lounge is at the far end. Movies, karaoke, whatever you want to do when you're not crunching code."

They reached a spiral staircase with sleek tinted glass walls. The view outside was breathtaking—a vast, landscaped garden bathed in moonlight. Water fountains shimmered, and carefully arranged flower beds formed patterns like something out of a royal estate. From here, Richard could see nearly the entire property.

"Damn," he muttered.

Jack smirked. "Wait till you see our rooms."

At the third floor, Jack pushed open a set of dark wooden doors and flicked on the lights.

Inside, two spacious bedrooms awaited them, separated by a common living space with a couch and a coffee table. The back wall was a giant glass window overlooking the garden below. The moonlight poured in, giving the space an almost dreamlike atmosphere.

"This used to be my dad's and Uncle Edmundo's room when they were kids," Jack said, tossing his bags onto one of the beds.

Richard walked to the window, taking it all in. "They really picked the best view, huh?"

Jack flopped onto his bed with a sigh. "Yeah, they did. Anyway… I'm dead. I need sleep." He didn't even bother changing, just lunged onto the mattress and buried his face in a pillow.

Richard, on the other hand, had other plans.

He set his laptop on the desk beside his bed, adjusted the soft spinning chair, and cracked his neck and knuckles. He powered up the laptop, and as the familiar hum of the machine filled the room, he exhaled sharply.

"Alright… back to work."

The Vector Core engine was far from complete. Tonight, he would focus on Module Interfaces.

He stared at the screen. "Init(), Update(), Shutdown()… simple, on the surface. But the devil's in the details."

His fingers hovered over the keyboard. How do modules communicate? How do they share data? How do I enforce a consistent lifecycle?

Richard began drafting the Module Interface.

"It's about creating a standard, a common language between different systems," he murmured. "But it has to be flexible… physics, rendering, game logic—they all have different needs."

His mind raced through the possible designs.

Virtual functions? Abstract classes? Templates?

Each option had its own trade-offs. Virtual functions allowed easy extension, but had performance overhead. Abstract classes kept things clean but forced strict structure. Templates were powerful but could quickly become a nightmare.

He exhaled. "I need to find the right balance."

After much deliberation, he settled on a pure virtual interface—a clean separation of concerns.

"Define the 'what', not the 'how.' Each module implements its own logic."

Next: ModuleManager.

"The orchestrator," he muttered, opening a new file. "The conductor of this symphony."

The ModuleManager had to be responsible for:✔ Loading and unloading modules✔ Managing dependencies✔ Ensuring smooth execution

But how should it store them?

"A simple vector? A map? A linked list?" he whispered, weighing the options.

Vectors offered fast iteration.Maps provided quick lookups.Linked lists were great for insertions and deletions.

But in a real-time game engine, iteration speed was key. He went with a vector—contiguous memory for efficiency.

He coded for a while before stopping to think. "What about insertion and deletion? Dependencies?"

A simple mistake here could crash the entire engine.

He implemented LoadModule().

Dynamic library loading… a nightmare across platforms.

Windows DLLs, Linux shared objects… different quirks, different conventions.

Error handling was a must.

"If a module fails to load, the engine should fail gracefully. No silent errors. No cryptic crashes."

UnloadModule() came next.

Releasing resources, cleaning up memory—but in the right order.

Modules often depended on one another, meaning unloading had to be done carefully.

A dependency graph. That was the answer.

Topological sorting… ensuring modules were unloaded in a safe sequence.

Circular dependencies?Conflicting requirements?

He spent hours debugging, staring at interconnected nodes on the screen.

Finally, the Update Loop.

Each frame, every loaded module had to run Update().

But what if one module crashed?

A single faulty module could take down the whole game.

Richard implemented try-catch blocks to isolate failures.

He leaned back. "Robust. Reliable. Safe."

But the job wasn't done.

Testing.

He started writing unit tests for the ModuleManager.

How do I test dynamic library loading? Simulate module dependencies?

Mock modules. Edge cases. Every possible failure scenario.

A notification popped up on his screen. 3:42 AM.

"A whole week…" he sighed, rubbing his temples. "A week on just this one part… but it's critical. If this fails, the whole engine fails."

He glanced at the hundreds of lines of code now on his screen.

"One step closer to Vector Core."

The moonlight streamed through the glass window, reflecting off the polished wooden floor.

Jack snored softly in the background.

Richard checked his code one last time, scanning for any errors. Satisfied, he closed the IDE and put his laptop in sleep mode. He let out a deep breath, rolling his shoulders to shake off the tension.

Before heading to bed, he quietly stepped out of the room and opened the door opposite his.

Inside, Anita lay peacefully under the soft glow of a night lamp, her gentle breathing the only sound in the room. Richard watched for a moment, a small smile forming on his lips. For the first time in years, his mother looked truly at peace.

He carefully closed the door and made his way back to his room.

Throwing himself onto the silky-smooth mattress, he sighed in relief. The sheer comfort of the bed threatened to knock him out in seconds.

"Damn… this is dangerous…" he muttered, already sinking into the softness.

Just as he was about to drift off, a familiar interface popped up in his vision.

A new panel flashed before him.

[Daily Quest Failed]-10,000 SP. Available SP: 0

"What?!" he whispered harshly, eyes widening.

Then it hit him. He had forgotten about the daily quest.

"Damn it," he groaned, slapping his forehead in frustration.

Before he could dwell on it, the system panel shifted, revealing his full status.

[Status]

Name: Richard Santamo

Age: 23

Weight: 135 lbs

Height: 5'11

SP: 0

[SHOP] [SKILLS]

Stat Points: 5

Attributes:

STR: 10

CON: 15 → 18 (+3)

AGI: 9

PER: 9

VIT: 10 → 12 (+2)

INT: 13

Technology Learned: Vector Core

Skills: Information Processing, Knowledge Acquisition, Keyboard Warrior

"Alright, let's assign these stat points," Richard muttered, rubbing his chin.

He distributed +3 to Constitution and +2 to Vitality.

Immediately, a warm sensation coursed through his body. His muscles didn't grow or anything drastic, but he felt more solid, more resilient. Like his body had been reinforced from within.

"Interesting…" he whispered.

Next, his attention shifted to his skill list.

He tapped on [Information Processing].

[Information Processing (Level 1)]– Enhances your ability to quickly analyze and process large amounts of data. Upgrade: 2 Skill Points (Available SP: 11)

Without hesitation, he pressed 'Upgrade.'

The moment he did, a sharp pain struck his head.

"Ugh!" he groaned, gripping his temples. It wasn't unbearable, but it felt like his brain was rewiring itself, recalibrating.

Then, in an instant—it was over.

Clarity.

Suddenly, the world around him seemed sharper, clearer.

His eyes darted around the room, taking in details he normally would have overlooked. The slight wear on the wooden desk, the subtle crack on the ceramic vase, the gentle rise and fall of Jack's chest as he snored.

Everything was faster.

His thoughts felt more structured, more efficient. It was like his brain had optimized itself.

A wide grin spread across his face.

With this… I can work even faster.

Excitement surged through him, but exhaustion quickly caught up.

He sank back into the bed, letting the soft mattress swallow him whole.

Tomorrow, he'd push his system even further.

But for now—he closed his eyes.

More Chapters