{"id":1095,"date":"2026-03-20T17:10:22","date_gmt":"2026-03-20T17:10:22","guid":{"rendered":"https:\/\/salvador.mata.com.mx\/blog\/?p=1095"},"modified":"2026-03-23T16:07:24","modified_gmt":"2026-03-23T16:07:24","slug":"tutorial-basico-en-range-movimiento-con-wsad-usando-python","status":"publish","type":"post","link":"https:\/\/salvador.mata.com.mx\/blog\/2026\/03\/20\/tutorial-basico-en-range-movimiento-con-wsad-usando-python\/","title":{"rendered":"\ud83d\udc0d\ud83c\udfae Tutorial b\u00e1sico en Range: Movimiento con WSAD usando Python"},"content":{"rendered":"<h3 data-section-id=\"1uaekfm\" data-start=\"5\" data-end=\"33\">\ud83c\udfaf Objetivo del tutorial<\/h3>\n<p data-start=\"35\" data-end=\"221\">El objetivo de este tutorial es darte una introducci\u00f3n clara y pr\u00e1ctica a la programaci\u00f3n en Range, para que puedas comenzar a crear comportamientos interactivos dentro de tus proyectos.<\/p>\n<p data-start=\"223\" data-end=\"500\">A lo largo del contenido, aprender\u00e1s los conceptos b\u00e1sicos necesarios para trabajar con scripts, entender c\u00f3mo se ejecuta la l\u00f3gica en tiempo real y c\u00f3mo controlar objetos dentro del motor. Esto te permitir\u00e1 dar el salto de escenas est\u00e1ticas a sistemas din\u00e1micos y funcionales.<\/p>\n<p data-start=\"502\" data-end=\"647\" data-is-last-node=\"\" data-is-only-node=\"\">Al finalizar, contar\u00e1s con las bases necesarias para seguir desarrollando tus propias mec\u00e1nicas y profundizar en la programaci\u00f3n dentro de Range.<\/p>\n<hr \/>\n<p>Cuando comienzas en Range Engine, uno de los primeros pasos es aprender a mover objetos dentro de la escena. En este tutorial veremos c\u00f3mo controlar un cubo usando <strong>W, A, S, D<\/strong> mediante <strong>Python<\/strong>.<\/p>\n<h2>\ud83e\uddf1 Paso 1: Preparar la escena<\/h2>\n<ol>\n<li><span style=\"color: #99cc00;\">Abre Range<\/span><\/li>\n<li><span style=\"color: #99cc00;\">Usa la escena por defecto<\/span><\/li>\n<li><span style=\"color: #99cc00;\">Selecciona el cubo<\/span><\/li>\n<\/ol>\n<hr \/>\n<h2>\u2699\ufe0f Paso 2: Crear el script en Python<\/h2>\n<p>Ve al <span style=\"color: #008000;\"><strong>Text Editor<\/strong><\/span> y crea un script llamado <code>movimiento.py<\/code>:<\/p>\n<p><em>Y copia y pega el siguiente script:<\/em><\/p>\n<pre><code class=\"language-python\"><span style=\"color: #99cc00;\">import Range  <span style=\"color: #ff9900;\"># M\u00f3dulo principal del motor<\/span>\r\n\r\ndef main():\r\n<span style=\"color: #008000;\">    # Obtenemos el controlador actual<\/span>\r\n    cont = Range.logic.getCurrentController()\r\n    \r\n<span style=\"color: #008000;\">    # Objeto due\u00f1o del script (el cubo)<\/span>\r\n    own = cont.owner\r\n    \r\n<span style=\"color: #008000;\">    # Acceso al teclado<\/span>\r\n    keyboard = Range.logic.keyboard\r\n\r\n<span style=\"color: #008000;\">    # Velocidad de movimiento<\/span>\r\n    speed = 0.1\r\n\r\n<span style=\"color: #008000;\">    # Estado de las teclas<\/span>\r\n    keys = keyboard.events\r\n<span style=\"color: #008000;\">\r\n    # --------------------------------------------------\r\n    # Movimiento hacia adelante (W)\r\n    # --------------------------------------------------<\/span>\r\n    if keys[Range.events.WKEY] == Range.logic.KX_INPUT_ACTIVE:\r\n  <span style=\"color: #008000;\">      # Movimiento en eje local Y positivo<\/span>\r\n        own.applyMovement((0, speed, 0), True)\r\n\r\n<span style=\"color: #008000;\">    # --------------------------------------------------\r\n    # Movimiento hacia atr\u00e1s (S)\r\n    # --------------------------------------------------<\/span>\r\n    if keys[Range.events.SKEY] == Range.logic.KX_INPUT_ACTIVE:\r\n<span style=\"color: #008000;\">        # Movimiento en eje local Y negativo<\/span>\r\n        own.applyMovement((0, -speed, 0), True)\r\n<span style=\"color: #008000;\">\r\n    # --------------------------------------------------\r\n    # Movimiento hacia la izquierda (A)\r\n    # --------------------------------------------------<\/span>\r\n    if keys[Range.events.AKEY] == Range.logic.KX_INPUT_ACTIVE:\r\n<span style=\"color: #008000;\">        # Movimiento en eje local X negativo<\/span>\r\n        own.applyMovement((-speed, 0, 0), True)\r\n\r\n<span style=\"color: #008000;\">    # --------------------------------------------------\r\n    # Movimiento hacia la derecha (D)\r\n    # --------------------------------------------------<\/span>\r\n    if keys[Range.events.DKEY] == Range.logic.KX_INPUT_ACTIVE:\r\n<span style=\"color: #008000;\">        # Movimiento en eje local X positivo<\/span>\r\n        own.applyMovement((speed, 0, 0), True)<\/span><\/code><\/pre>\n<p><strong>El procedimiento ser\u00eda as\u00ed:<\/strong><\/p>\n<p style=\"text-align: center;\"><code>\n<div class=\"wp-block-presto-player-reusable-edit\"><!--presto-player:video_id=21--><figure class=\"wp-block-video presto-block-video  presto-provider-youtube\" style=\"--plyr-color-main: var(--presto-player-highlight-color, #18b103); --presto-player-logo-width: 150px; \">\n\t<presto-player \n\t\tpreset='{&quot;id&quot;:1,&quot;name&quot;:&quot;Default&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;icon&quot;:&quot;format-video&quot;,&quot;skin&quot;:&quot;modern&quot;,&quot;play-large&quot;:true,&quot;rewind&quot;:true,&quot;play&quot;:true,&quot;fast-forward&quot;:true,&quot;progress&quot;:true,&quot;current-time&quot;:true,&quot;mute&quot;:true,&quot;volume&quot;:true,&quot;speed&quot;:false,&quot;pip&quot;:false,&quot;fullscreen&quot;:true,&quot;captions&quot;:false,&quot;reset_on_end&quot;:true,&quot;auto_hide&quot;:true,&quot;show_time_elapsed&quot;:false,&quot;captions_enabled&quot;:false,&quot;save_player_position&quot;:true,&quot;sticky_scroll&quot;:false,&quot;sticky_scroll_position&quot;:&quot;bottom right&quot;,&quot;on_video_end&quot;:&quot;select&quot;,&quot;play_video_viewport&quot;:false,&quot;hide_youtube&quot;:false,&quot;lazy_load_youtube&quot;:false,&quot;hide_logo&quot;:false,&quot;border_radius&quot;:0,&quot;caption_style&quot;:&quot;&quot;,&quot;caption_background&quot;:&quot;&quot;,&quot;is_locked&quot;:true,&quot;cta&quot;:[&quot;&quot;],&quot;watermark&quot;:[&quot;&quot;],&quot;search&quot;:[&quot;&quot;],&quot;email_collection&quot;:[&quot;&quot;],&quot;action_bar&quot;:[&quot;&quot;],&quot;created_by&quot;:1,&quot;created_at&quot;:&quot;2025-10-24 15:24:09&quot;,&quot;updated_at&quot;:&quot;2025-10-24 15:24:09&quot;,&quot;deleted_at&quot;:&quot;&quot;}'\n\t\tbranding='{&quot;logo&quot;:&quot;&quot;,&quot;logo_width&quot;:150,&quot;color&quot;:&quot;#18b103&quot;,&quot;player_css&quot;:&quot;&quot;}'\n\t\tchapters='[]'\n\t\toverlays='[]'\n\t\ttracks='[]'\n\t\tblock-attributes='{&quot;playsInline&quot;:true,&quot;id&quot;:21,&quot;src&quot;:&quot;https:\\\/\\\/youtu.be\\\/lECn11FXGeI&quot;,&quot;preset&quot;:1,&quot;video_id&quot;:&quot;lECn11FXGeI&quot;,&quot;visibility&quot;:&quot;public&quot;,&quot;color&quot;:&quot;#00b3ff&quot;,&quot;mutedPreview&quot;:{&quot;enabled&quot;:false,&quot;captions&quot;:false},&quot;mutedOverlay&quot;:{&quot;enabled&quot;:false,&quot;src&quot;:&quot;&quot;,&quot;width&quot;:200,&quot;focalPoint&quot;:{&quot;x&quot;:0.5,&quot;y&quot;:0.5}},&quot;mutedOverlayType&quot;:&quot;text&quot;,&quot;mutedOverlayText&quot;:&quot;Click to play&quot;,&quot;mutedOverlayImageWidth&quot;:200,&quot;chapters&quot;:[],&quot;overlays&quot;:[],&quot;tracks&quot;:[],&quot;title&quot;:&quot;https:\\\/\\\/youtu.be\\\/lECn11FXGeI&quot;}'\n\t\tanalytics=''\n\t\tautomations\t\tprovider='youtube'\n\t\t\t\tid=\"presto-player-1\"\n\t\tsrc=\"\/\/www.youtube.com\/embed\/lECn11FXGeI?iv_load_policy=3&amp;modestbranding=1&amp;playinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1\"\n\t\tmedia-title=\"https:\/\/youtu.be\/lECn11FXGeI\"\n\t\tcss=\"\"\n\t\tclass=\"presto-video-id-21 presto-preset-id-1 skin-modern\"\n\t\tskin=\"modern\" \n\t\ticon-url=\"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/plugins\/presto-player\/img\/sprite.svg\" \n\t\tpreload=\"\" \n\t\tposter=\"\"\n\t\tyoutube=\"{&quot;noCookie&quot;:false,&quot;channelId&quot;:&quot;&quot;,&quot;show_count&quot;:false}\"\n\t\tprovider-video-id=\"lECn11FXGeI\"\n\t\tvideo-id=\"21\"\n\t\t\t\tplaysinline \n\t\t\t\t>\n\t\t\n    <div class=\"presto-iframe-fallback-container\">\n        <iframe style=\"width: 100%\" title=\"Youtube Video\" class=\"presto-fallback-iframe\" id=\"presto-iframe-fallback-1\" data-src=\"https:\/\/www.youtube.com\/embed\/lECn11FXGeI?iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1\" allowfullscreen allowtransparency allow=\"autoplay\"><\/iframe>\n    <\/div>\n\n\t<\/presto-player>\n<\/figure><\/div>\n<\/code><\/p>\n<h2 data-section-id=\"14erm5j\" data-start=\"90\" data-end=\"111\">\ud83e\udde9 Sobre el c\u00f3digo<\/h2>\n<p data-start=\"113\" data-end=\"227\">Si al ver este <span style=\"color: #008000;\"><strong>script<\/strong> <\/span>sientes que hay partes que no entiendes del todo, <span style=\"color: #ff9900;\"><strong>no te preocupes<\/strong><\/span> \u2014 es completamente normal.<\/p>\n<p data-start=\"229\" data-end=\"443\">Cuando se empieza a programar en <strong><span class=\"hover:entity-accent entity-underline inline cursor-pointer align-baseline\"><span class=\"whitespace-normal\">Range Engine<\/span><\/span><\/strong>, es muy com\u00fan trabajar primero con c\u00f3digo que uno no escribi\u00f3. Esto no solo es v\u00e1lido, sino que forma parte natural del proceso de aprendizaje.<\/p>\n<p data-start=\"445\" data-end=\"589\">\ud83d\udc49 Lo importante en esta etapa no es memorizar todo, sino <span style=\"color: #008000;\"><strong data-start=\"503\" data-end=\"588\">familiarizarte poco a poco con los comandos, la estructura y la l\u00f3gica del c\u00f3digo<\/strong><\/span>.<\/p>\n<p data-start=\"591\" data-end=\"637\">Con el tiempo, empezar\u00e1s a reconocer patrones:<\/p>\n<ul data-start=\"638\" data-end=\"723\">\n<li data-section-id=\"191khte\" data-start=\"638\" data-end=\"670\">\n<p data-start=\"640\" data-end=\"670\"><span style=\"color: #99cc00;\">c\u00f3mo se accede a los objetos<\/span><\/p>\n<\/li>\n<li data-section-id=\"igt23v\" data-start=\"671\" data-end=\"694\">\n<p data-start=\"673\" data-end=\"694\"><span style=\"color: #99cc00;\">c\u00f3mo se leen inputs<\/span><\/p>\n<\/li>\n<li data-section-id=\"v2iznv\" data-start=\"695\" data-end=\"723\">\n<p data-start=\"697\" data-end=\"723\"><span style=\"color: #99cc00;\">c\u00f3mo se aplican acciones<\/span><\/p>\n<\/li>\n<\/ul>\n<p data-start=\"725\" data-end=\"802\"><span style=\"color: #008000;\"><strong>Y sin darte cuenta, muchos de estos elementos se ir\u00e1n quedando en tu memoria.<\/strong><\/span><\/p>\n<p data-start=\"809\" data-end=\"956\">\ud83d\udca1 Con pr\u00e1ctica constante, experimentar y hacer peque\u00f1os cambios por tu cuenta, la programaci\u00f3n comenzar\u00e1 a sentirse cada vez m\u00e1s natural y fluida.<\/p>\n<hr \/>\n<h2>\ud83d\udd17 Paso 3: Conectar el script<\/h2>\n<p>Con el cubo seleccionado:<\/p>\n<ul>\n<li>\ud83d\udfe3<span style=\"color: #99cc00;\"> Sensor: <strong>Always<\/strong><\/span>\n<ul>\n<li><span style=\"color: #008000;\">Activa <strong>True Level Triggering (Pulse)<\/strong><\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"color: #99cc00;\">\u2699\ufe0f Controller: <strong>Python (Module)<\/strong><\/span>\n<ul>\n<li><span style=\"color: #008000;\">Escribe: <\/span><code><span style=\"color: #99cc00;\"><span style=\"color: #008000;\">movimiento.main<\/span><\/span><\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Conecta el sensor al controlador.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1085\" src=\"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/uploads\/2026\/01\/RangeEngine_oykQeZ1ahO.gif\" alt=\"\" width=\"827\" height=\"253\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\ud83e\udde0 \u00bfC\u00f3mo funciona el sensor <em>Always<\/em>?<\/h2>\n<p>Esta combinaci\u00f3n de bloques de l\u00f3gica se puede interpretar de la siguiente manera:<\/p>\n<p>El sensor <span style=\"color: #008000;\"><strong>Always<\/strong> <\/span>es, literalmente, un sensor que se activa constantemente. Esto significa que ejecutar\u00e1 en cada frame todo lo que est\u00e9 conectado a \u00e9l, ya sea un <span style=\"color: #008000;\"><strong>script en un controlador<\/strong><\/span> o un <span style=\"color: #008000;\"><strong>actuador<\/strong> <\/span>a trav\u00e9s de un controlador.<\/p>\n<hr \/>\n<h3>\ud83d\udd01 True Level Triggering<\/h3>\n<p>Aqu\u00ed es donde entra uno de los puntos m\u00e1s importantes:<\/p>\n<ul>\n<li><span style=\"color: #99cc00;\">\u2705 <strong>Activado (True Level Triggering)<\/strong><\/span><br \/>\n<span style=\"color: #008000;\">El sensor se ejecuta continuamente en cada frame.<\/span><\/li>\n<li><span style=\"color: #99cc00;\">\u274c <strong>Desactivado<\/strong><\/span><br \/>\n<span style=\"color: #008000;\">El sensor se ejecuta <strong>solo una vez<\/strong>.<\/span><\/li>\n<\/ul>\n<p>\ud83d\udc49 En otras palabras, este bot\u00f3n define si el comportamiento es <span style=\"color: #008000;\"><strong>continuo<\/strong> <\/span>o <span style=\"color: #99cc00;\"><strong>puntual<\/strong><\/span>.<\/p>\n<hr \/>\n<h3>\u23f1\ufe0f Par\u00e1metro <em>Skip<\/em><\/h3>\n<p>El par\u00e1metro <strong>Skip<\/strong> controla la frecuencia con la que se env\u00eda la se\u00f1al de activaci\u00f3n.<\/p>\n<ul>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\"><code>Skip = 0<\/code> <\/span>\u2192 Se ejecuta en <strong>cada frame<\/strong> (m\u00e1xima fluidez)<\/span><\/li>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\"><code>Skip = 1<\/code><\/span> \u2192 Se salta un frame entre ejecuciones<\/span><\/li>\n<li><span style=\"color: #99cc00;\"><code><span style=\"color: #008000;\">Skip = 60<\/span><\/code> \u2192 Aproximadamente <strong>una ejecuci\u00f3n por segundo<\/strong> (dependiendo del framerate)<\/span><\/li>\n<\/ul>\n<p>\ud83d\udc49 Es una forma sencilla de \u201cdosificar\u201d la ejecuci\u00f3n sin necesidad de c\u00f3digo adicional.<\/p>\n<hr \/>\n<h3>\u2699\ufe0f \u00bfPor qu\u00e9 usamos esta configuraci\u00f3n?<\/h3>\n<p>En este tutorial buscamos un movimiento <strong>fluido y continuo<\/strong>, por lo tanto usamos:<\/p>\n<ul>\n<li>\u2705 <span style=\"color: #008000;\"><strong>True Level Triggering activado<\/strong><\/span><\/li>\n<li><span style=\"color: #008000;\">\u2705 <strong>Skip = 0<\/strong><\/span><\/li>\n<\/ul>\n<p>Esto asegura que el script se ejecute en cada frame, permitiendo una respuesta inmediata al input del jugador.<\/p>\n<hr \/>\n<h3>\ud83d\udca1 Ejemplo pr\u00e1ctico<\/h3>\n<p>Estos detalles son importantes para entender cu\u00e1ndo usar cada configuraci\u00f3n.<\/p>\n<p><span style=\"color: #008000;\">Por ejemplo:<\/span><\/p>\n<p><span style=\"color: #99cc00;\">\ud83d\udc49 Si conectas un sensor <strong>Always<\/strong> a un actuador de tipo <strong>Motion<\/strong> <strong>sin controlar la frecuencia<\/strong>, el objeto se mover\u00e1 constantemente sin detenerse.<\/span><\/p>\n<p><span style=\"color: #99cc00;\">\ud83d\udc49 Pero si desactivas <em>True Level Triggering<\/em>, el movimiento solo ocurrir\u00e1 una vez.<\/span><\/p>\n<p>Este tipo de configuraciones son fundamentales para comprender c\u00f3mo fluye la l\u00f3gica dentro de Range Engine y c\u00f3mo se sincroniza con el <strong>game loop<\/strong> del motor.<\/p>\n<hr \/>\n<h2>\u25b6\ufe0f Paso 4: Ejecutar<\/h2>\n<p>Presiona <strong>P<\/strong> para iniciar.<\/p>\n<p>Ahora puedes mover el cubo:<\/p>\n<ul>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\">W<\/span> \u2192 adelante<\/span><\/li>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\">S<\/span> \u2192 atr\u00e1s<\/span><\/li>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\">A<\/span> \u2192 izquierda<\/span><\/li>\n<li><span style=\"color: #99cc00;\"><span style=\"color: #008000;\">D<\/span> \u2192 derecha<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1086\" src=\"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/uploads\/2026\/01\/RangeEngine_b6FS5OH5zK.gif\" alt=\"\" width=\"615\" height=\"345\" \/><\/p>\n<hr \/>\n<h2>\ud83e\udde0 \u00bfQu\u00e9 est\u00e1 pasando?<\/h2>\n<p>Cada frame:<\/p>\n<ol>\n<li><span style=\"color: #99cc00;\">El sensor <span style=\"color: #008000;\"><strong>Always<\/strong> <\/span>ejecuta el script<\/span><\/li>\n<li><span style=\"color: #99cc00;\">Se detecta<span style=\"color: #008000;\"> la entrada del teclado<\/span><\/span><\/li>\n<li><span style=\"color: #99cc00;\">Se aplica movimiento al objeto<\/span><\/li>\n<\/ol>\n<p>Esto ocurre dentro del famoso <strong>game loop<\/strong> del motor.<\/p>\n<hr \/>\n<h2>\ud83c\udf0d vs \ud83e\udded Coordenadas globales y locales<\/h2>\n<p>Este punto es clave \ud83d\udc47<\/p>\n<h3>\ud83c\udf0d Coordenadas globales (world)<\/h3>\n<pre><code class=\"language-python\">own.worldPosition.x += 0.1\r\n<\/code><\/pre>\n<ul>\n<li><span style=\"color: #99cc00;\">Basadas en los ejes del mundo<\/span><\/li>\n<li><span style=\"color: #99cc00;\">No dependen de la rotaci\u00f3n del objeto<\/span><\/li>\n<li><span style=\"color: #99cc00;\">\u00datiles para l\u00f3gica simple<\/span><\/li>\n<\/ul>\n<p>\ud83d\udc49<strong> Problema<\/strong>: si el objeto gira, el movimiento puede sentirse incorrecto<\/p>\n<hr \/>\n<h3>\ud83e\udded Coordenadas locales (local)<\/h3>\n<pre><code class=\"language-python\">own.applyMovement((0, 0.1, 0), True)\r\n<\/code><\/pre>\n<ul>\n<li><span style=\"color: #99cc00;\">Relativas al objeto<\/span><\/li>\n<li><span style=\"color: #99cc00;\">Se adaptan a su rotaci\u00f3n<\/span><\/li>\n<li><span style=\"color: #99cc00;\">Son las m\u00e1s usadas en videojuegos<\/span><\/li>\n<\/ul>\n<p>\ud83d\udc49 Resultado:<br \/>\n<span style=\"color: #008000;\"><strong>W siempre mueve hacia \u201cadelante\u201d del objeto<\/strong><\/span>, sin importar su orientaci\u00f3n<\/p>\n<p>Para comprobarlo vamos a a\u00f1adir un sensor <strong><span style=\"color: #008000;\">Mouse y cambia el tipo de sensor a &#8220;Movement&#8221;<\/span>, <\/strong>despu\u00e9s conecta con un controlador <strong>And<\/strong> y un <strong>Actuador Mouse<\/strong> y veremos el resultado<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1087\" src=\"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/uploads\/2026\/01\/RangeEngine_Ju6SeGY4R3.gif\" alt=\"\" width=\"804\" height=\"318\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1088\" src=\"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/uploads\/2026\/01\/RangeEngine_pd9n3CiW55.gif\" alt=\"\" width=\"614\" height=\"345\" \/><\/p>\n<p>Aqui tienes<span style=\"color: #008000;\"><strong> el archivo resultante del tutorial<\/strong><\/span>, en caso de que prefieras estudiarlo directamente y aprender de el.<\/p>\n<p><span class=\"shared-files-shortcode-admin-list shared-files-shortcode-admin-list-file shared-files-shortcode-1091\" title=\"&lt;div class=&quot;shared-files-embed-69d97ca0aaa6c shared-files-main-container&quot; data-elem-class=&quot;shared-files-embed-69d97ca0aaa6c&quot; data-search-type=&quot;0&quot; data-post-id=&quot;1095&quot;&gt;&lt;div class=&quot;shared-files-search&quot;&gt;&lt;ul class=&quot;shared-files-main-file-list&quot;&gt;&lt;li class=&quot;shared-files-card-1091&quot;&gt;&lt;div class=&quot;shared-files-main-elements&quot;&gt;&lt;div class=&quot;shared-files-main-elements-left&quot; style=&quot;background-image: url(https:\/\/salvador.mata.com.mx\/blog\/wp-content\/plugins\/shared-files\/img\/2020\/zip.svg);&quot;&gt;&lt;\/div&gt;&lt;div class=&quot;shared-files-main-elements-right&quot;&gt;&lt;a class=&quot;shared-files-file-title&quot;  data-file-type=&quot;&quot;  data-file-url=&quot;\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip&quot;  data-external-url=&quot;&quot;  data-image-url=&quot;&quot; href=&quot;\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip&quot; target=&quot;_blank&quot;&gt;WASD- Python&lt;\/a&gt;&lt;span class=&quot;shared-file-size&quot;&gt;84.92 KB&lt;\/span&gt;&lt;span class=&quot;shared-file-date&quot;&gt;March 19, 2026&lt;\/span&gt;&lt;div class=&quot;shared-files-download-counter&quot;&gt;&lt;span&gt;Downloads: 35&lt;\/span&gt;&lt;\/div&gt;&lt;div class=&quot;shared-files-download-button-container&quot;&gt;&lt;a href=&quot;\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip&amp;download=1&quot; class=&quot;shared-files-download-button&quot;  download&gt;Download&lt;\/a&gt;&lt;\/div&gt;&lt;div class=&quot;shared-files-edit-actions&quot;&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/li&gt;&lt;\/ul&gt;&lt;\/div&gt;&lt;\/div&gt;\"><div class=\"shared-files-embed-69d97ca0b0dd1 shared-files-main-container\" data-elem-class=\"shared-files-embed-69d97ca0b0dd1\" data-search-type=\"0\" data-post-id=\"1091\"><div class=\"shared-files-search\"><ul class=\"shared-files-main-file-list\"><li class=\"shared-files-card-1091\"><div class=\"shared-files-main-elements\"><div class=\"shared-files-main-elements-left\" style=\"background-image: url(https:\/\/salvador.mata.com.mx\/blog\/wp-content\/plugins\/shared-files\/img\/2020\/zip.svg);\"><\/div><div class=\"shared-files-main-elements-right\"><a class=\"shared-files-file-title\"  data-file-type=\"\"  data-file-url=\"\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip\"  data-external-url=\"\"  data-image-url=\"\" href=\"\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip\" target=\"_blank\">WASD- Python<\/a><span class=\"shared-file-size\">84.92 KB<\/span><span class=\"shared-file-date\">March 19, 2026<\/span><div class=\"shared-files-download-counter\"><span>Downloads: 35<\/span><\/div><div class=\"shared-files-download-button-container\"><a href=\"\/blog\/uploads\/shared-files\/1091\/?WASD_Python.zip&download=1\" class=\"shared-files-download-button\"  download>Download<\/a><\/div><div class=\"shared-files-edit-actions\"><\/div><\/div><\/div><\/li><\/ul><\/div><\/div><\/span><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2>\ud83d\udca1 Conclusi\u00f3n<\/h2>\n<p data-start=\"3664\" data-end=\"3935\">Este es un ejercicio <strong data-start=\"3685\" data-end=\"3695\">b\u00e1sico<\/strong>, donde ya se te proporciona el script listo para usar. La intenci\u00f3n no es que memorices el c\u00f3digo, sino que comiences a entender c\u00f3mo est\u00e1 estructurado y c\u00f3mo se conecta dentro del flujo de trabajo en <span class=\"hover:entity-accent entity-underline inline cursor-pointer align-baseline\"><span class=\"whitespace-normal\">Range Engine<\/span><\/span>.<\/p>\n<p data-start=\"3937\" data-end=\"4168\">A partir de aqu\u00ed, es importante que poco a poco te adentres en la <a href=\"https:\/\/rangeengine.tech\/rangeapi\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"4003\" data-end=\"4020\">API del motor<\/strong><\/a>, ya que existen muchas otras formas de manipular objetos: desde f\u00edsicas, rotaciones, inputs m\u00e1s avanzados, hasta sistemas completos de interacci\u00f3n.<\/p>\n<p data-start=\"4170\" data-end=\"4353\">\ud83d\udc49 Este tipo de ejercicios son el primer paso para pasar de usar l\u00f3gica visual a <strong data-start=\"4251\" data-end=\"4271\">pensar en c\u00f3digo<\/strong>, que es donde realmente tienes mayor control sobre el comportamiento de tu juego.<\/p>\n<hr \/>\n<h2>\ud83e\udde0 \u00bfY ahora qu\u00e9?<\/h2>\n<p>Bienvenido al desarrollo real con <strong>Range Game Engine<\/strong> \ud83d\ude04:<\/p>\n<ul>\n<li><span style=\"color: #99cc00;\">\ud83d\udcd6 Leer documentaci\u00f3n<\/span><\/li>\n<li><span style=\"color: #99cc00;\">\ud83d\udc0c Optimizar c\u00f3digo<\/span><\/li>\n<li><span style=\"color: #99cc00;\">\ud83d\udda8\ufe0f Usar <code>print()<\/code> para depurar<\/span><\/li>\n<li><span style=\"color: #99cc00;\">\ud83d\ude35\u200d\ud83d\udcab Desesperarte un poco<\/span><\/li>\n<\/ul>\n<p>Pero <strong>Range + Python<\/strong> te permite hacer <strong>MUCH\u00cdSIMAS cosas<\/strong> \ud83c\udfae\ud83d\udd25.<\/p>\n<p>No es f\u00e1cil \u274c<br \/>\nPero <strong>vale totalmente la pena<\/strong> \u2705<\/p>\n<p>La programaci\u00f3n es un juego de <strong>paciencia y perseverancia<\/strong> \ud83e\uddd8\u200d\u2642\ufe0f\ud83d\udcbb.<\/p>\n<p><a href=\"https:\/\/salvador.mata.com.mx\/blog\/2026\/03\/23\/sensores-actuadores-desde-python\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #008000;\"><strong>En el siguiente tutorial con python<\/strong><\/span><\/a> usaremos c\u00f3digo para mandar llamar actuadores y sensores para activarlos o desactivarlos en tiempo real.<\/p>\n<p>\ud83c\udf40 <strong>\u00a1Buena suerte y feliz scripting en Range!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udfaf Objetivo del tutorial El objetivo de este tutorial es darte una introducci\u00f3n clara y pr\u00e1ctica a la programaci\u00f3n en Range, para que puedas comenzar a crear comportamientos interactivos dentro de tus proyectos. A lo largo del contenido, aprender\u00e1s los conceptos b\u00e1sicos necesarios para trabajar con scripts, entender c\u00f3mo se ejecuta la l\u00f3gica en tiempo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1089,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[136],"tags":[181,84],"class_list":["post-1095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-python","tag-range"],"jetpack_featured_media_url":"https:\/\/salvador.mata.com.mx\/blog\/wp-content\/uploads\/2026\/01\/cubeMove.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/comments?post=1095"}],"version-history":[{"count":5,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/posts\/1095\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/posts\/1095\/revisions\/1125"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/media\/1089"}],"wp:attachment":[{"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/media?parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/categories?post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salvador.mata.com.mx\/blog\/wp-json\/wp\/v2\/tags?post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}