📜 ⬆️ ⬇️

A hundred lines of code for the beloved

I could read her poetry. I could book a table in a restaurant, have a candlelit dinner: good wine, helpful waiter, decent people around. Gently touch her hands and whisper:
- Favorite ...


But when a colleague approached me and said:
“Look what I coded for my woman. ...”
I realized that this is love. It is forever.
I want it too.

Clone


In the mobile application, the girl was asked to choose from two joint photos the one that was taken earlier.
The calculation was simple:


The game definitely hit the target audience, and I, as a professional game designer, it was obvious - this idea needs to be tilted. But before it was worth assessing the risks.
My questionHis answerMy thoughts
How long did it take?Five o'clock at night.Fine! One night to sit.
What kodil?Unity3dBehind me - 12 years in Game Maker.
I can handle him even faster!
She liked it?What are you, she was delighted!
I did not think that this is possible.
She and her Androyd on "you."
The game does not play.
Only sms writes and VKontakte sits.
F * ck Yeah!

The last answer dispelled all doubts: the game was worth the candle, even as it was worth it! There are technical details.
Tap on the photo displays the text directly on top of it. If the correct photo, praise and memories are chosen. If the girl did not guess, the text is in the spirit: “Little sunshine, do you really not remember?” And, again, pleasant memories. No negatives. Replayability (interestingly, what is said about other images). Intuitive interface.
Only twenty photos. Two on the screen. Clicked - the selected photo is scaled and flies down. The second photo immediately disappears. Two more appear. And so on.

At the end, when the best moments of life are selected, the photos soar upward, to the very center of the stage, to turn over there, like tablets, making the main words:
')

- Stop, and how did you make a coup?
- Just changing the scale cards on x.
- Phew ... relieved.

First blood


I took to the gift on the first gloomy night. Pretended that there is an urgent job.
I was waiting for the hellish prorva animation. But once a colleague could, and I can. I remember he connected the LeanTween library for Unity3D . I decided to answer this with TweenGMS in GameMaker: Studio .

Here I, the pitiful epigone, was waiting for the first catch: before, I had never animated through this library. She connected easily, but it took some time to learn the nuances. That night, for some reason, I remembered that a colleague's application was automatically adapted to any screen sizes.

My girlfriend has an iPhone and an iPad mini, which means you need to adjust the game to all permissions at all costs. You ask where is the logic? Three nights. I go to the jungle of scaling, sit on the hook of the anchor, attach to the DPI. It is time to jealous. It's getting light ... Tony Wendis's first mistake.

Real detective


On working day, may the staff forgive me, I tried to understand what went wrong, repented the programmer, told me about the plans. My clone he blessed and set on the right path.

The next night was no time for jokes: the girl suspected that something was amiss. The weekend was near, but I desperately did not have time. It turned out that picking up twenty photos in three years of our life together is not so simple: they are scattered not only in folders, but also in devices. Even harder to know which one was shot before. EXIF data whistles frantically. “And the lamp is off, and the calendars are lying ...” I have to restore the course of events on her Instagram: I find posts in the same locations, write out the dates, compare myself. Is done. I'm McConaughey, damn it, I'm True Detective .


Weekends. Hiding a surprise is all the more dangerous. The girl looks at me, indignant. It is urgent to solve something. I decide that you can not just take and add photos, you need to do a design, so that each shot under the Polaroid. Looking for Polaroid templates for Photoshop, download a PSD plugin in Paint.NET , update Paint.NET. Goodnight, my Love!

In white slippers, shuffling cavalry gait, preventing my beloved from sleeping, late at night on the third day of development, I went to the kitchen with a laptop: in a hurry to make photo captions. I would like to add that “the sunset burned down on a gallery with a Chinese fan”, but my nerves burned out, and the deadlines burned to the ground, when I finally added the last line of code, launched the application on my FROF iFive mini android with iPad mini screen and ... 10 out of 10, Good lord 10 out of 10!


Good night and good luck


It remains a bit: quietly install the application on its iPad. VMware , it's your time. Virtual Mac swears on certificates. iPad is in her bag, bag - next to the bed. Night. Dark. I try to get it, my fingers are trembling, my heart is about to jump out of my chest, she started, I froze, she turned to the other side. iPad in my hands! I collect the application and fall down.

In the morning, when she is going to work, I give her an iPad and proudly inform you that here it is - her surprise. In order to somehow justify myself, I add that it has been above me that I've been blooming for the last two days and three nights. Cute heart icon:


The application starts. Sounds our song. Now the cards will fly out, so beautiful, just like us. Now ... Now ... Can I show on my tablet?

Before sunrise

His questionMy answerMy thoughts
How long did it take?Two days and three nights.Never again!
What kodil?Game Maker: Studio.Never.
She liked it?She looked and thanked.Never…
In two days, I will hear her say to her sister:

- Where did you go? Nowhere ... He spent the weekend at the computer, did not communicate with me. What did you give? Well, he made me a game ...

Our relationship is becoming more intense. I do not want to think more about this gift.
After a week, after rewriting part of the code, I will find out why the game worked on Android and did not work on iOS (TweenGMS did not have time to initialize).

And I will reveal the main reason for the failure of the clone: ​​the original was created based on the possibilities. My colleague correctly estimated the time, because I saw in my head not the result and reaction, but the process from and to. All photos were on the phone and easily sorted by date. He used LeanTween many times. Unity UI automatically adapts the image for any resolution. The girl has an Android phone. He remembered that time was short and did not dwell on design. She knew that he was a programmer, but did not know that he SO could. He did not spend their joint time on development. They are often chosen together somewhere, and this gift was something fundamentally new. Uniqueness, moment, marketing, audience. All this, of course, I did not take into account.

And then it dawned on me! This is game development, just like in the industry. You play Clash of Clans , read about three months for a prototype, consider someone else's earnings, and it seems that a clone is the best idea. After a year of development, when the moment of exit is missed, you realize that you spent a lot of time and money, and everything had to be different.

When I finally threw the working version on the girl's iPad, she looked at me, tired, understanding, with a kind glance:

- I liked ... Really. So nice that you remember everything!

Tomorrow is March 8th . I will no longer take into account. The poem is written. Table booked. I don’t know what I’ll give her, but I know for sure: we’ll sleep together tonight, in each other’s hands, where tablets used to be.

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


All Articles