Rebirth of America, this is my time

Chapter 91 I like prostitution for free

When Pac-Man involves AI technology, what should this game do?

Ethan doesn't know.

But when Evelin pulled him into the garage of his new home, which was the girl’s new base, the girl who spread out the design drawings on the production table already had an idea, “Ethan, levels, scores, models, we will reward these things All can be made slowly, but these four intelligent ghosts must be considered first, because I feel that without them, the entire game will have no soul.

Ethan agrees.

As he nodded in agreement, Evelin smiled again and said: Then let's start with the production of ghosts? The first question, I want to know, in your inspiration, how many things do these four ghosts have in common? model?

Because once the common pattern is determined, the code for this section can be copied directly.

Ethan thought he understood, but not completely.

The so-called understanding means copying.

There was no way. Who told him that in his previous life, there were too many jokes about programmers copying code?

As for not understanding it...

Oh Evelyn, I wonder what you mean by common patterns?

Ethan asked decisively.

Common patterns? This actually refers to the behavior of ghosts. Is there anything in common in your designs?

Since Ethan didn't understand, Evelin patiently explained, For example, four ghosts chasing the player, this is actually a common pattern, but when it comes to our case, the term common pattern does not apply, because you give four ghosts The ghosts set up different properties.”

The characteristic you set for the red ghost is to chase directly. Then when writing the code, its characteristic is to calculate the shortest distance between itself and the player in real time, and then keep moving forward along this path.

The feature you set for the pink ghost is to ambush the player, so when writing the code, its calculation method is to calculate the player's position in real time, and then determine some pixels forward according to the player's orientation, and then move this void to the player The possible forward goal becomes the destination of the ghost, allowing the pink ghost to go to this location. At the same time, every time the player changes, the pink ghost's forward position will also change.

The characteristic you set for the blue ghost is to cooperate with the red ghost for containment. In this case, the point where the player is located must be confirmed as the center point, and one end is connected to the red ghost and the other is connected to the blue ghost. In this case, During the process, the red ghost's path must be calculated first. If it moves horizontally, it is the X-axis. If it moves vertically, it is the Y-axis. In this case, the blue ghost's path must be consistent with his. Symmetry to create a right-angled intersection. When the right-angled intersection appears, the containment effect you want can be reflected, and the blue ghost can hunt players in a double-team manner in the game.

The last orange ghost, the characteristic you designed is to station, then when writing the code, its characteristic is to station near the birthplace, and set a detection radius with it as the center. When the player enters the radius, this orange ghost will The ghost will calculate the shortest distance and start chasing. When the player leaves his determination radius, the orange ghost will stop chasing until the player appears again.

Because their chasing modes are different, we cannot call the ghost's chasing a common mode. On the other hand, as long as the ghost's action mode is exactly the same, then these codes are...

Evelin lengthened her voice.

Ethan nodded in understanding and added: It's common.

Bingo! Evelin smiled and snapped her fingers, So... in your opinion, what are the common patterns?

Evelin had already made it so clear, so it would be much easier for Ethan to describe it.

Although he only played the game Pac-Man in his previous life and did not try to make it, but even so, the common patterns of the four ghosts are still very easy to judge, such as escaping and being caught.

1. The so-called escape means that the character played by the player eats the glowing beans in the four corners of the map and gives a layer of DeBuff to the ghost.

When the player eats the glowing beans and becomes invincible, the four ghosts will enter a state of fear and avoidance, because at this time, the role played by the player can kill them. In this way, the four ghosts change color and escape. A common pattern for ghosts.

Second, being caught, this refers to the death state of the ghost after eating the ghost when the player is in an invincible state.

Because in Pac-Man, ghosts can be resurrected after death, but they must return to their lair in the middle to rest.

Therefore, this process is also the common pattern of the four ghosts.

Tell the truth! Although Ethan had written a lot of content eloquently before, this kind of segmented analysis was really not available on the draft paper.

Therefore, when he recalled the common patterns of these four ghosts under Evelin's questioning, Evelin quickly recorded them there.

At the same time, Evelin’s mouth did not stop and kept saying: “If you break it down, the escape mode is a mode in which four ghosts detect the disappearance of any one of the four luminous points on the map, and then run in the opposite direction. Behavior……

Being captured is the overlapping feedback of the four ghosts and the player character at the same coordinate on the map during their escape. This needs to be distinguished from the capture of the player by the ghost, because the detection of coordinate determination is the same and cannot make mistakes, so... ...Add a time detection? For example, for a period of time after the map's glowing point disappears, once the ghost overlaps with the player, will it be caught?

Looking at his sister's figure writing furiously, Ethan felt a little emotional.

Because when he decided to make the game Pac-Man, he never expected that this game would be so difficult.

Write the judgment separately?

This workload is too much!

But at the same time, a curiosity arose in his heart.

Evelin. He called the girl's name.

Ang? the girl replied subconsciously.

Can I ask you a question?

explain.

I want to know, why did you choose the time detection method when deciding whether to be arrested?

Ethan asked doubtfully: In my settings, when the player eats the glowing points, the ghosts will have a layer of negative status. At the same time, they will also change their appearance. Therefore, we cannot set the detection to A change in appearance? When the player encounters a ghost whose appearance changes, the ghost will die. Doesn’t this logic work?”

Of course. Evelin understood what Ethan wanted to say.

But at the same time, she also explained: But with this setting, there will be a problem in game detection. Suppose that when the player and the ghost with negative status collide with each other, the ghost's negative status just disappears, then how should the game determine at this time? ?”

The ghost will determine that there is no negative status on itself, and the overlapping code that collides at the same time will determine that the ghost has a status.

Because both codes are calculated simultaneously.

In this case, did the player eat the ghost, or did the ghost kill the player?

The machine can't figure it out.

This kind of rough judgment without prioritization may cause judgment problems in the game, so I think the best anchor point to detect is the time with the highest priority. If set like this, the code only needs to judge one variable and not Error-prone.

So that’s it?

Ethan understood.

In this case, will less code be written?

Of course. Evelin nodded: After all, our memory is limited, and if we can give 4K, we can never give 8K.

A little more, and that means an increase of more than thirty dollars in cost.

Good guy! Does this count as a cost?

Ethan was shocked.

But Evelin’s confidence reassured him a lot.

After the two people communicated, they analyzed the AI ​​of the four ghosts that night.

The next day, Evelin began to stay at home and try to write code.

To be honest, if it were any other game company, when faced with a game like Pac-Man that requires writing code, the production progress would not be very fast, because the penetration rate of personal computers on the market is quite high. Low.

Even if those commercial companies wanted to jump from circuit board arcades to CPU arcades, they would have to first purchase personal computers, and then recruit engineers who know programming to make games.

In the process, they may also face various problems such as the cheating of joystick computers like Altair and CPU adaptation.

As for Ethan and the others...

No such concerns at all.

Because the personal computer Evelin uses is the APPLE 1 that Steve Wozniak handmade and gave to Ethan.

Not only that, MOS 6502 is their own product.

When the most important CPU inventors who make games and the personal computer inventors who provide production tools can be easily found, Ethan really can't think of anyone in the world who can stop him from making Pac-Man a thing. Made for you?

Especially when he called Chuck Paido and asked about the assembly language of MOS 6502, and the other party sent the 151 operation codes and 56 instructions in the form of fax in less than an hour...

Even if Evelin has never been exposed to MOS 6502, she can quickly get started with the instruction set.

And when Ethan called Steve Wozniak and asked him to install a disk interface for the APPLE 1, the other party had already got all the external devices for Ethan in less than three hours. …

Evelin doesn't have to worry, the data will be lost.

Of course, Ethan's call also made others a little curious.

Chuck Paido asked him on the phone if he had any new ideas.

Ethan smiled and said yes, and said he would give him a copy after finishing it.

Steve Wozniak was more abrasive and wanted to see Ethan's inspiration.

Although this did not comply with the rules of trade secret protection, Ethan agreed.

After Steve Wozniak finished reading, the little fat man was immediately excited——

Oh! Sxxt! Is this your fucking inspiration?

Oh! My! God! This design of yours makes me want to play with it!

How about you take me with you for game production?

I don't want money! I just want to make it!

You can ask me to take charge of any project! Whether it's writing the path of the four ghosts, designing the basic panel, or creating map levels, I can complete these projects!

real!

I'm very good at coding!

This suggestion made Ethan overjoyed, and Evelin was also happy to have someone share the work for her.

As a result, on the first day of game production, the Pac-Man team grew from two people to three people.

Similarly, on this day, Steve Wozniak, a little fat guy, discovered a problem as soon as he got started.

“Ethan, Evelin, did you miss something?”

Because in your design, the four ghosts start from the small room in the middle of the map just like the player. However, among the four ghosts, only red, pink and blue will keep chasing the player, and orange is the range. Surveillance.”

So, when the game starts and the player runs out of the middle, the three ghosts will chase after the gate is opened, and the fourth orange one will only be on standby in the middle. In this case, wouldn't it be very easy for the player to avoid it?

My suggestion is that if possible, it will come out of the haunted house, and then move forward along the walls in the maze at regular intervals. For example, thirty seconds when the difficulty is low? Move forward for ten seconds and then rest for thirty seconds. Seconds? When the difficulty becomes higher, it will be changed to twenty seconds? Ten seconds?

We can make it an aimless wandering creature. When the player enters its range, it will hunt it ferociously. In this way, will it be more vivid?

This suggestion stunned Ethan on the spot.

Although he doesn't know whether the little orange ghost in Pac-Man was designed this way in his previous life, it doesn't matter, right?

Because Steve Wozniak’s suggestion is so fun to hear!

very good!

“It feels very oppressive!”

I'll leave this matter to you!

Ethan patted Steve Wozniak on the shoulder and entrusted the little fat man with important tasks.

It’s all free prostitution anyway!

The technical boss is willing to do more, so how can he be polite to the other party?

It doesn’t exist, okay!

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like