Menu menu menu ...

Nov 09, 2018 20:11


Версия на русском языке

In a restaurant, a menu is a list of food and beverage offered to the customer. (с)Wikipedia.

Today I will write about an element, without which it is extremely difficult to imagine any application with which the user should interact - this is the menu: buttons, captions, various elements.



... and immediately the first version of the menu!



Immediately make a reservation about the context, since the development is not carried out on vcl or a ready-made engine, and the graphic component has self-written output methods, then the use of ready-made fonts, objects is not in question.

For primitives, such as rectangles or lines, functions have already been written, and the first version of the menu appears from them! I also tried, for the sake of experiment, to add to it the existing picture, this is the “bird” object, about which I wrote in the post “ A stick, a stick, a cucumber, and a little man

After calculating the positions of the coordinates of the letters: auto-height, auto-width, relative sizes, etc., everything is ready to start creating your own font:



Black rectangles - cells for letters

And for starters, I was limited to only letters that are in the menu and a set of numbers - to display the value of fps.



Some letters have already been done, the rest is not far off!

That is, the letters I draw from the available primitives - lines, points, etc.



And all the letters are ready!



Trying to paint the letters ...



... add volume and color style

Here, in parallel, the task of measuring performance arose, and I used the newly created object to display the fps value (fraps per second):



FPS - current fps max, min, sf - maximum, minimum and average fps respectively

Now add translucency! And our menu is complete!



A little later, I again used the menu object for one of the latest projects, which is now in active development ... And I already made a full set of letters, including Cyrillic, and changed the font style!



And so, for comparison, the updated font looks on the old menu:



Left-new, right-old

In conclusion, the video with a combination of two effects, partial drawing of the image, which creates a “pixel plume” and rising stones:

image Click to view



If you want to support my project, you can do it by link or by adding one of the WebMoney:

R163522901261

Z180352303030

X054099745452

I thank everyone, readers and those who leave their feedback!

Блог, Разработчик, pixelwalker, Пиксель Валкер, developer, Редактор, art, ПиксельВалкер, Рисование, Пиксель, Графика, pixel walker, game, walker, Валкер, Разработка, Игры, Меню, programming, games, Программирование, Арт, pixel

Previous post
Up