📜 ⬆️ ⬇️

What to do an IT specialist in the army or how I wrote games on a VBA

More than two months have passed since my demobilization. I already accustomed to freedom, it's time to tell the truth. I served in intelligence! .. “Secret” military unit of the Osnaz GRU. According to the distribution, he got to the department of the CCP (Radio Interception Center). The job is not dusty, you sit at night in headphones and listen to the enemy. But it's not about that.

Each operator of a radio interception station (we were listed as such) had a computer with radio control devices (radio receiving devices) connected to it. On the computer was spetssoft + Excel. Everything else was blocked. After the N-th duty, I began to get bored ... My arms were combed.

I remembered that I once dealt with VBA. Never further writing of the elementary function did not come. I decided to see what can happen with a more detailed study. After a night of torment, I gave birth to a snake turtle ! Classic snake, implemented by filling the desired cells. There was an opportunity to create obstacles for oneself, again, just painting over the necessary cells.


')
After the snake there were a couple of small toys, but all this stuff ...



Co-workers went and begged me to throw them all off, everyone was tired of playing the headscarf. I did not know how to do this. USB ports are hardware disabled. But, as it turned out, all the computers were connected to a local network. Having run the command line through Excel, I was able to go to a nearby computer and drop the necessary files there. And then it dawned on me ... Excel, VBA, reading / writing files, local area network ... Do you know?

Sea battle
I implemented the first version in the same way by filling in the cells of the sheet. For a long time did not show anyone, debugged deep in the night with a friend.



Everything worked with dignity, but before I rolled out the game to the masses, I saw the project of the guys who served before me. It was a file manager neatly hidden by a shift manager on a computer, implemented on forms:



Respect these guys. Until now, I have not seen the possibility of using forms on VBA. Did not immediately notice, and did not think about it. That same night, it was decided to rewrite the sea battle on the forms. The code is more compact, the interface is friendlier, the performance is higher.



Work in the department got up! Everybody loves sea battle ... except me. Well, I do not like these silly shootouts. In general, I did not stop on it. But, looking ahead, I will say that the sea battle was the most popular.

Bomber man
Someone jokingly said, “but weakly write a Bomber Man?”.
Challenge accepted! The month of leisurely torment and he came out.





Miniatures are drawn in Paint. The game is designed for simultaneous connection of 4 people from different computers. Client-server application. The server was launched in a separate application. The number of lives is not limited (I think the number of gravestones is understandable).
But things are not as smooth as they seem. When writing / reading files, errors occurred due to simultaneous access and I could not achieve more than 10 frames per second. If the game was played on two people, then everything fit in 25-30 frames, but on four it was not possible to achieve good speeds. The lack of Internet has not given the opportunity to find a solution.

Then I was asked to make tanchiki, but I decided to refuse to develop action games, in view of the problems described above.

Texas Holdem Poker
I really like poker. In the army I missed him badly. I saw the implementation of poker for 9 people not so difficult. Is that over the search algorithms for the collected combination had to break his head, but it was interesting. The lack of internet made it a little bit hard. One night I spent on drawing a deck of cards. Another on the table and chips. And then began the process of writing. I got poker faster than Bomber Man. One night we tested it for the maximum number of players, the tests were quite successful.



But here it was not possible to fully play. I got pneumonia. After returning to combat duty (for radio interception), I never returned, and before demobilization I went to dresses.

Generally speaking, it was a very dangerous and painstaking business, God forbid someone burned for such an occupation, and even on duty. Who served, he will understand. For the usual kerchief was removed from duty and put on outfits, and here it is ... Thank you one good man for having thrown all these screenshots on a flash drive and sent it to me by mail. I will leave to myself for memory.

To be continued.

Source: https://habr.com/ru/post/237641/


All Articles