{"id":298395,"date":"2020-02-08T15:00:10","date_gmt":"2020-02-08T15:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298395"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298395","title":{"rendered":"3D \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435 \u0441 (\u043f\u043e\u0447\u0442\u0438) \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487550\/\">\u041c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/post\/439698\/\">\u0432\u043e\u0442 \u044d\u0442\u0443<\/a>, \u0433\u0434\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0432\u0435\u0449\u0438 \u043d\u0430 C++, \u0441 \u043f\u0440\u0438\u0446\u0435\u043b\u043e\u043c \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u042f \u0437\u043d\u0430\u043a\u043e\u043c \u0441 C++, \u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u043d\u0435\u043c \u0441\u043a\u043e\u043b\u044c-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044f python. \u0412\u043e\u0442 \u0442\u0443\u0442 \u0438 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2014 \u044f \u0431\u044b\u043b \u043f\u043e\u0447\u0442\u0438 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043f\u0430\u0440\u0430-\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0435\u043b \u0434\u043b\u044f python. \u042f \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rl\/da\/y4\/rlday4jrxollwpqikmsvgjrsvr0.png\" alt=\"image\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gw\/dm\/yh\/gwdmyhq06z52q1f9eib7blqfszy.png\" alt=\"image\" \/><\/div>\n<p><a name=\"habracut\"><\/a><br \/>  \u041f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/SomeAnonimCoder\/raycaster\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0422\u0443\u0442 \u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u043f\u043e\u043b\u043d\u043e\u043c, \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u0443 <a href=\"https:\/\/habr.com\/ru\/users\/haqreu\/\" class=\"user_link\">haqreu<\/a>. \u0418 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f O(n^2) \u2014 \u043f\u043e \u0441\u0443\u0442\u0438, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b \u043f\u043e \u0443\u0433\u043b\u0443 \u0438 \u043f\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e:<\/p>\n<pre><code class=\"python\">         # iterating alpha         alpha = player.view - player.fov \/ 2         mapFB.drawRectangle(player.y - 1, player.x - 1, player.y + 1, player.x + 1, Color(255, 0, 0))         rayNum = 0         while alpha &lt; player.fov \/ 2 + player.view:             # iterating distance             dist = 0             x = player.x             y = player.y             while 0 &lt; x &lt; mapFB.w - 1 and 0 &lt; y &lt; mapFB.h - 1:                   ... <\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439(\u043c\u0435\u043d\u0435\u0435 3-4 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u0434\u0443 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 intel core i5 8-\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f). <\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u2014 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0446\u0438\u043a\u043b \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u0443\u0433\u043b\u043e\u043c \u0437\u0440\u0435\u043d\u0438\u044f, \u0438 \u0431\u043b\u043e\u043a\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c(\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c, \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b). \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u043f\u0435\u0440\u0435\u0447\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e. \u041d\u0438\u0436\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434(\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/github.com\/SomeAnonimCoder\/raycasterv2\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"python\">def block_cross(i, j, k, y_0, alpha, player):     # cell coordinates     x_cell = i * H     y_cell = j * H     # find collision points     collisions = []      if k != 0:         x = (y_cell - y_0) \/ k         y = y_cell         if x_cell &lt;= x &lt;= x_cell + H and (x - player.x) \/ cos(alpha) &lt; 0:             collisions.append((x, y))      if k != 0:         x = (y_cell + H - y_0) \/ k         y = y_cell + H         if x_cell &lt;= x &lt;= x_cell + H and (x - player.x) \/ cos(alpha) &lt; 0:             collisions.append((x, y))      x = x_cell     y = y_0 + x * k     if y_cell &lt;= y &lt;= y_cell + H and (x - player.x) \/ cos(alpha) &lt; 0:         collisions.append((x, y))      x = x_cell + H     y = y_0 + (x) * k     if y_cell &lt;= y &lt;= y_cell + H and (x - player.x) \/ cos(alpha) &lt; 0:         collisions.append((x, y))      # select the closest collision for the block     dist = 1000 * H     x = None     y = None     for collision in collisions:         tmp = sqrt((collision[0] - player.x) ** 2 + (collision[1] - player.y) ** 2)         if tmp &lt; dist:             dist = tmp;             x = collision[0]             y = collision[1]      return x, y, dist <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 10 \u0441\u0442\u0440\u043e\u043a \u0434\u0430\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432\u0434\u0432\u043e\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043a\u043e\u043b\u043e 5-6 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0440\u0432\u044b\u043a\u0438, \u0430 \u0434\u0432\u0438\u0436\u0443\u0449\u0430\u044f\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f. <br \/>  \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0438\u0434\u0435\u0439 \u043e\u0431 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 <a href=\"http:\/\/cython.org\">Cython<\/a>. \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u0434\u0430\u0442\u044c python-\u043a\u043e\u0434\u0443 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0433\u043e \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041a\u0440\u0430\u0442\u043a\u043e \u043e \u043d\u0435\u043c \u2014 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0442\u044b\u0446<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> cpdef int fun(int num, float val):     cdef int result     # do some stuff     return result <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e result \u0442\u0438\u043f\u0430 int(\u0440\u0435\u0430\u043b\u044c\u043d\u043e int, \u0430 \u043d\u0435 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u044a\u0435\u043a\u0442). \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0442\u044c \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0432 python-\u043a\u043e\u0434\u0435, \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0435 \u0441 \u043a\u0435\u0439\u0432\u043e\u0440\u0434\u043e\u043c cdef \u2014 \u043e\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0438\u0437 python, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 cython. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0442\u0438\u043f\u044b, \u043d\u0435\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0435 \u0432 python \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438:<\/p>\n<pre><code class=\"python\"> cpdef int fun(int num, float val):     cdef int result     # do some stuff     return result   cdef int fun2(int *arr, float* arr_2):     cdef int arr_3[10][10]     # do some stuff     return result <\/code><\/pre>\n<p>  \u0418\u043c\u043f\u043e\u0440\u0442 fun2 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 python, \u0430 \u0432\u043e\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0435 \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 fun \u2014 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e.  <\/div>\n<\/div>\n<p>  Cython \u0434\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435, \u0445\u043e\u0442\u044c \u0438 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u2014 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043c\u0430\u043b\u043e \u2014 8-9 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0442\u043e \u0435\u0441\u0442\u044c +40% \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443 \u043d\u0430 python \u0438 +200% \u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443 \u0441 \u043d\u0430\u0438\u0432\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c. \u042d\u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u0434\u0435\u0440\u0433\u0430\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0443 \u043d\u0430\u0441 \u0446\u0435\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0433\u0440\u044b \u043f\u0440\u043e\u0449\u0435 \u0432\u0437\u044f\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432\u0440\u043e\u0434\u0435 pygame, \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u043b\u043e\u0436\u0438\u0442\u044c python \u0438 \u0432\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435.<\/p>\n<p>  P.S. \u0411\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/487550\/\"> https:\/\/habr.com\/ru\/post\/487550\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487550\/\">\u041c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/post\/439698\/\">\u0432\u043e\u0442 \u044d\u0442\u0443<\/a>, \u0433\u0434\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0432\u0435\u0449\u0438 \u043d\u0430 C++, \u0441 \u043f\u0440\u0438\u0446\u0435\u043b\u043e\u043c \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u042f \u0437\u043d\u0430\u043a\u043e\u043c \u0441 C++, \u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u043d\u0435\u043c \u0441\u043a\u043e\u043b\u044c-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044f python. \u0412\u043e\u0442 \u0442\u0443\u0442 \u0438 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2014 \u044f \u0431\u044b\u043b \u043f\u043e\u0447\u0442\u0438 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043f\u0430\u0440\u0430-\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0435\u043b \u0434\u043b\u044f python. \u042f \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rl\/da\/y4\/rlday4jrxollwpqikmsvgjrsvr0.png\" alt=\"image\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gw\/dm\/yh\/gwdmyhq06z52q1f9eib7blqfszy.png\" alt=\"image\" \/><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298395","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298395"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298395\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}