Skip to main content

Sergey Malenkov

Sergey Malenkov is an engineer on the Swing team from Saint-Petersburg, Russia. He is responsible engineer for JavaBeans technologies: introspection, customization and long term persistence. Also he is interested in game development.

 

malenkov's blog

For Those About To Rock

Posted by malenkov on February 27, 2009 at 12:00 PM PST

(We Salute You): This simple example produces the firework effect using JavaFX Script. The active use of random numbers brings variety to each firework volley.

Hexagonal tile map

Posted by malenkov on February 26, 2009 at 1:00 AM PST

To supplement the posts about the triangular and square tilings, let's consider the third type - the hexagonal tiling. This is my favorite one.

Triangular tile map

Posted by malenkov on February 25, 2009 at 4:00 AM PST

Recall from the previous post there are only three regular polygons that can be used as tiles. Let's have a look at triangles now. Such tiles are practically not used in games because there is no direct path on the map and the game unit should be turned at each tile.

Square tile map

Posted by malenkov on February 24, 2009 at 1:00 AM PST

Many games use graphical maps based in iterative tiles. There are only three regular polygons that can be used as tiles: triangles, squares, and hexagons. Consider the square tiling first. Such tiles are most often used in games because of their ease of processing.

How to format a string?

Posted by malenkov on January 26, 2009 at 6:00 AM PST

Sometimes users need to prepare their data for output. Java provides support for layout justification and alignment, common formats for numeric, string, and date/time data, and locale-specific output.

Strange Sequences

Posted by malenkov on January 13, 2009 at 2:00 AM PST

If you come across square brackets in JavaFX script, do not think that JavaFX supports arrays. These are sequences. Sequences are not arrays although they are similar.

Baby, you can drive my car

Posted by malenkov on December 29, 2008 at 6:00 AM PST

Let's steal a car, repaint it, and do this quickly. What is more, do this in JavaFX and consider several programming hints by the way.

How to drag nodes and windows?

Posted by malenkov on December 24, 2008 at 11:11 AM PST

Every JavaFX node is able to process mouse movement events. Thanks to this ability the user can easily drag nodes on the scene or move windows. However, there are some nuances worth mentioning...

How to lay out FX nodes?

Posted by malenkov on December 19, 2008 at 12:00 AM PST

It is typical to use absolute coordinates to position nodes in a simple JavaFX application. But what if your application becomes more complex? It is quite annoying to change the coordinates of several nodes if one of them changes its size.

How to rock around the clock?

Posted by malenkov on December 18, 2008 at 12:00 AM PST

JavaFX has been released recently and now many beginners google on how to start programming. Let us consider a very simple example of drawing a clock face in JavaFX.