The game Minesweeper is actually very classic, but the overall design difficulty is not high.
There are a few things to pay attention to, for example, how to achieve it, click on the absence of light, the blank is extended, and the plots without mines are expanded.
"Throughout the minesweeping, we laid out four layers, the overlay layer, the mine layer, the digital layer and the background layer." Jiang Cheng held the design drawings and communicated with Zhu Jian.
"The interface framework these, we can use the Picturebox component to implement, this piece, I can try." Zhu Jian nodded and contracted the interface.
Jiang Cheng is naturally no problem, "I'll handle these header documents." The
first time he designed a game, Jiang Cheng didn't think about how big a game he wanted, nor did he think about innovation or anything, so he honestly referred to the classic scanning game to do it again.
First, a simple game with a 9*9 grid was designed, and then the two people enriched the code and expanded to intermediate and advanced.
The two had a simple communication and planned to start with the basic interface of game initialization and mouse gesture definition.
are not very experienced, in terms of programming, Zhu Jian is more experienced.
At the beginning, Jiang Cheng was also a little stumbling, after all, although he had tried a lot of programming experiments in the internal computer, it was generally practice problems, which was somewhat different from the current practice.
Practice by implementing one or two small functions.
But really developing games is different, and there are all kinds of needs.
A header file, also known as a header file, is the reuse of global variables (functions) in multiple code files to prevent conflicting definitions.
Although Jiang Cheng had contact before, his grasp was not very good, and at this time, in order to do this program well, he was also learning and experimenting, and slowly sorted out the header file.
#include < stdio.h>
#include < stdib.h>
#include < time.h>
............
Freshman year is on track.
According to the class schedule, Jiang Cheng coordinated the participation of computer and software engineering courses (some courses were taken together), and at the same time according to his own study plan, he was more exposed to software engineering courses, and the rest of the time, he and Zhu Jian perfected the minesweeping game together.
Progress is fast.
By the end of September, Jiang Cheng's minesweeping game was ready to be debugged.
Hao Yongjun provided some image material to make the simple frame interface look a little good.
For example, the cover block on the mine is more three-dimensional, and when the mine is pressed, there will be a small explosion effect.
Jiang Cheng copied the code, connected directly to the local area network, and imported it into the computer in the body.
Start the simulation run.
After all, it is an internal computer, and Jiang Cheng can quickly debug according to the requirements of his mind.
Soon, he found a lot of minor problems or areas where the code was not optimized enough.
"Fourth, if you look at this paragraph, what I thought about before was to expand the four directions one by one according to the blank space, but there is too much code and it is not optimized enough," Jiang Cheng pointed to one of the paragraphs, "I think we used an idea to do this algorithm."
While speaking, Jiang Cheng began to change the code
if(test(mine, x, y)==0)
{ board[x][y] = ' ';
for (i = x-1; i <=x+1; i++)
{ int j;
for (j = y-1; j <=y+1; j++)
............
Zhu Jian looked straight and nodded, "Not bad, this is better."
Hao Yongjun ate the apple, a little impatient, "How is it, okay?" Let's try it, shall we? Zhu
Jian raised his eyebrows, "Come on, it'll be good right away."
After all, it is the first game design, although it is developed according to the classic game, but in the end, it comes out of the first code in his own hands, does not copy the code, does not cover the world, and has a feeling of joint participation.
After a while, a program with a size of no more than 1M was released.
Through the buckle shared with Hao Yongjun and Xu Siyuan, everyone started the game.
Click on the program and a sky blue frame interface opens.
It's about the same as classic minesweeper, but there are not so many options, only the 9*9 junior version.
The game has three options: low, medium and high, 10 thunders for low level, 20 for intermediate level, and 40 for high level.
Hao Yongjun played for a while, "It feels good, especially this thunder explosion animation, well, I just got it right..."
"Superficial." Xu Siyuan snorted lightly, and quickly clicked in his hand, and he played through at once, "Minesweeper master, second pass."
Jiang Cheng smiled, "I'll look back and add an online function, the four of us can still compare the speed of mine clearance and become a demining master."
"This can have, let's just practice, how to achieve these functions online?" Zhu Jian's eyes lit up.
The practice of this mini-game has also allowed him to gain a lot of experience, although Jiang Cheng has contributed more to the main program, but he has also participated in the development and basically mastered it.
Hao Yongjun was a little anxious, "Don't be too fast, Siyuan and I are also learning, learning, wait for us together."
He can see that Jiang Cheng has strong learning ability and hands-on ability, and only by following him can he really master the skills quickly.
If it is only by attending classes, it is generally not possible to enter the team of project experiments until after the sophomore year.
But now it's only been a month, and Jiang Chengcheng has begun to take everyone to clean up.
"Next time we choose another project, then we can ask the teacher to help guide us." Jiang Cheng nodded, "It's better to engage in a small minesweeper now, really big programs or games, our experience is still too lacking."
Zhu Jian said with a smile, "Who let you, a pervert, take us to engage in game development as soon as school starts."
"Let's do this, it will be easy to make money in the future!" Jiang Cheng blinked his clean eyes.
"That's true, too." Zhu Jian smiled, "But I don't want to become a coder in a game company."
Jiang Cheng suggested, "Let's rest for a few days and continue to study on our own." During the National Day period, think about what project we will work on next, do you have any good suggestions?
"No, Mistress, let's see what to do, let's just follow it." Hao Yongjun said, "Although the pressure of class is not great, there are many people who have to study by themselves after class, and there is no time.
"No more talk, I'm looking at unary calculus." Xu Siyuan spoke very little, turned off the minesweeper game, and continued to read hard.
----------------------------
Since the beginning of the school, Jiang Cheng has devoted himself to the learning process, making one or two calls back every week, and most of the time, he is in self-study and programming practice.
"Chengzi, do you have a holiday on National Day?" Chen Ru took the phone and asked.
"There are seven days off, I don't know what to do, maybe it's self-study at school." Jiang Cheng also knew that in the past few days, it was not realistic to go back.
After all, Guanglin Prefecture is too far from Kyoto.
"You still have to move around, don't stick headlong in the book."
"Okay, I see. I'll go back and visit Kyoto. Jiang Cheng immediately accepted his mother's criticism and suggestion.
"It's about the same, it's about to be winter, you have to buy a few more sets of clothes, the clothes before were all from high school, now I am in college, I have to dress up myself." Chen Ru said, "If you can't pick yourself, you can find Xinran to accompany you..."
"Well, Mom, where did you go?" Jiang Cheng sweated.
"That's, I've heard people say, you guys who study computers, it's hard to find a girlfriend, you want..."
"Hey, Mom, my signal here is not good, I'll call you next time ha." Jiang Cheng hurriedly hung up the phone.
This is only a freshman, and my mother is so worried about herself.
As soon as the call ended, Qin Jin's call came again.
This kid's major is also computer science and technology, which can be regarded as following the rhythm of Jiang Cheng.
Jinghua North College is not in Kyoto, but in Langhe City, Hebei Province.
But not too far away, in Yanjiao.
"Chengzi, how are you doing! Let's play on our side after the National Day, right?
"I haven't thought about the National Day yet, so I should continue to read most of the time."
"Still reading, you're going crazy, I've been dying of that calculus recently, heaven, earth, why do you want me to study mathematics, I want to change majors..."
You'll Also Like
-
Elf: My Healing Farm
Chapter 135 1 hours ago -
Zongman: Start with Sakurasou and pick up a female high school student
Chapter 352 1 hours ago -
Yue Buqun: I'm already cultivating immortality, why do I still want to be the leader?
Chapter 517 1 hours ago -
Football: Xiao Junguang template, Real Madrid begs me to let him go
Chapter 154 1 hours ago -
Collapse of iron: simulation of being watched, starting from supporting jadeite
Chapter 167 1 hours ago -
Daqin: Upgrade the entry and intercept Yan Lingji
Chapter 176 1 hours ago -
Collapse of Iron: Shen Ce Tian Ji comparison, Jing Yuan Chu breaks the defense
Chapter 312 1 hours ago -
Bengtie: Add points to become stronger, I collect all the fate
Chapter 284 1 hours ago -
Bengtie: Interview with Huanyu, Aha's sharp comments on the stars
Chapter 274 1 hours ago -
Comparison of the two versions of Honkai Impact 3: Otto, the false god at the beginning
Chapter 172 1 hours ago